OpenGL bug in juce_win32_Windowing.cpp

Hi There,
Been using Juce a whil now for creating an opengl application.
All is going well.
Just found a little error in the juce_createOpenGLContext function in the juce_win32_Windowing.cpp file.

When you create a new OpenGlComponent you can choose wether you want to share the lists with this new context with an existing one.
This works fine as long as you only create two different contexes. If you create more the added contexts will not have their lists shared.

The error is in the following line:

wglShareLists (oc->renderContext, ((OpenGLContextInfo*) sharedContext)->renderContext);

it should be vice versa:

wglShareLists (((OpenGLContextInfo*) sharedContext)->renderContext, oc->renderContext);

check out the msdn doc:


Ah, right. Thanks for that one!