I am porting a Windows app to MacOSX and have some code written in Cocoa that has an NSView that I need to attach an OpenGL rendering context to (via the aglFuncs...(...)). I am interfacing with a large, existing C++ code base so re-engineering everything for Cocoa is not an option, neither is using the "Cocoa friendly" OpenGL calls. What I am trying is:
However, I am getting the compile warning:
Warning: no "-windowRef" method found
2 questions... 1) Am I taking the correct path for what I want to do? 2) According to Apple's Cocoa reference docs (http://developer.apple.com/document...ow.html#//apple_ref/doc/uid/20000013-BCIJDAGE), the windowRef function exists (and I did check the NSWindow.h in the AppKit Framework)... any ideas why I am getting this and how I can remove the warning?
Thanks!
Dustin
Code:
NSView * pNSView = pSomeKnownNSView;
NSWindow * pNSWindow = [pNSView window];
WindowRef refWindow = (WindowRef)[pNSWindow windowRef]
Warning: no "-windowRef" method found
2 questions... 1) Am I taking the correct path for what I want to do? 2) According to Apple's Cocoa reference docs (http://developer.apple.com/document...ow.html#//apple_ref/doc/uid/20000013-BCIJDAGE), the windowRef function exists (and I did check the NSWindow.h in the AppKit Framework)... any ideas why I am getting this and how I can remove the warning?
Thanks!
Dustin