PDA

View Full Version : OpenGL and Carbon Controls in the same Window


Hasty
2006.09.01, 03:26 PM
Hey folks, can anyone direct me to some information that can get me on my way to mix an OpenGL view and Carbon Controls in the same window? I've got the basis of my game set up in C++ and I want to build a simple editor so that I can add elements and modify values of my game elements.

I'm sure a few of you would recommend to use Cocoa, but is there a way I can use my static libs (some of them which use Carbon API calls) with a Cocoa application without having to modify the C++ lib?

t.

OneSadCookie
2006.09.02, 02:19 AM
You can use AGL_BUFFER_RECT to restrict your context to drawing only in a portion of the window.

Carbon and Cocoa mix happily in general terms, but not so happily in terms of GUI within a window. AGL contexts are also completely different beasts to NSGL contexts (though they each have a CGL context underneath).