Is this implemented yet? My own OpenGL code is working, and it uses CGL mainly - AGL only where I needed to match with juce & carbon, but now I see that you chose NSOpenGLContext as the native format.
That seems to be a wrapper around the more (non cocoa) friendly CGLContextObject which is what I picked to work with a CGL created full screen context.
Are there options here? Could the share use CGL, so it’s not quite such a cocoa lock-in?
Here’s the situation. My shared context inherits from OpenGLContext so it can share, but it does it’s own context creation, ending up with an AGL and CGLContext. Another class is a subclass of OpenGLComponent. It, and the fullscreen CGL class, need to share the context.
So, it seems like I’ll have to change my shared context to make an offscreen NSOpenGLContext then? From which I could get a CGL, I’d think. Does that sound right?
In that case, it looks like there’s just some holes on the juce mac side. I think you need to do something like this, instead of just making the NSOpenGLView:
[code]sharedContext = [[NSOpenGLContext alloc] initWithFormat:[NSOpenGLView defaultPixelFormat] shareContext:nil];
[self setOpenGLContext:[[[NSOpenGLContext alloc] initWithFormat:[NSOpenGLView defaultPixelFormat] shareContext:sharedContext] autorelease]];[/code]