I have the following problem with the Cocoa implementation for OpenGL (Juce 1.50):
My program has two threads: the user-interface thread and an OpenGL thread. In my OpenGL thread, I call makeCurrentContextActive() once when the thread begins and makeCurrentContextInactive() once when the thread finishes. In this setting, resizing the OpenGL context fails.
I found that the problem comes from the ThreadSafeNSOpenGLView class, which waits a call to makeActive(), to update the GL context (through the needUpdates flag). makeActive() should thus be called before rendering each frame, which – in my thought – could slow down rendering (when the thread uses a single opengl context, and depending on the GL driver implementation).
Maybe, checking the needUpdates flag should be done during the swapBuffers() to fix this problem ?