Domanda

I'm trying to add modern OS X support to OpenTK framework. Mac OS Lion supports OpenGL 3.2 Core context. I can successfully obtain it by using CGL. However, I can't find a straight way to bind the context to a Carbon window.

Previous OpenTK implementation used aglSetDrawable method. CGL doesn't publicly have an alternative, even though it has a similar undocumented CGLSetSurface. Any attempts to use it return error code 1001, which I can't find a description for.

Any help of getting GL 3.2 on a Carbon window?

È stato utile?

Soluzione

I can't say I have tried this, but you might be able to get it to work by using a HICocoaView containing an NSOpenGLView (which will take an NSOpenGLContext that can be created froma CGLContext).

AGL itself is deprecated and unlikely to receive any further updates from Apple. CGL is not intended for windowed contexts. In the long run, using Cocoa is the best route on OS X.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top