Seems like a lot of Open GL talk here lately! Got a small problem…
(OS 10.5.6)
If you use the Juce DEMO (from the TIP)
And goto OpenGL demo and try to resize the window, its quite ugly as the context flickers and goes a little nuts.
I tend to prefer the native titlebar’s anyway, so we toggle that and…hmmm…blank screen. Reselecting the OpenGL brings everything back to normal, and resizing is lovely, no flicker…
Problem methinks is the whole generation of the NSOpenGLContexts and assignment without the view being on the screen at the time(just a stab, but when I did some stuff with Ogre I had to create my NSView put it in my window, wait for the window to come onscreen and THEN assign the view to the context)
Yes, when you add or remove the title bar it has to move everything to a new window, so there’s probably an issue with re-using the old context. It’s unlikely that many apps apart from the juce demo would ever hit this, so I think I’ll leave it up to them to refresh their gl components if necessary!
But it appears right now there is no way to create a native window WITHOUT setting the gl component/context twice!
If you look at my example again, the OpenGLComponent isn’t created until after the window is created. Its probably something subtle that is missed, but I think its worth mentioning here in case it comes up for someone.
PS - The browser plugin wrappers sound cool and very useful!
Sorry, but an answer to exactly what question? This thread is ancient and has a lot of different things in it - can you give us a code example of what doesn’t work that we could try?