Help with shared context in OpenGL, please


#1

Hi, I'm really really struggling with this, and there is no information about this on the forums or anywhere on the internet. In the latest Juce, I'm trying to set up an app that has the top level component attached to an opengl context (fine so far), with an opengl subcomponent that renders on a separate thread (problems start here). I need the subcomponent to be on a another thread so that I can do big shader compilation and glReadPixels without freezing the main thread. I need the top level component to be opengl for performance reasons, and so that I can render over the sub component.

How, how, how the hell to do this? I'm fairly sure I need a shared context, but I've tried every combination of setNativeSharedContext and my 2nd context can't compile any shaders because the extensions are all bogus pointers. If I call extensions.initialise() that doesn't help either.

Can anyone help me? I'm at the point of giving up. I just need a 3 sentence answer. 

Thanks,

Rob