OpenGL bug in juce_win32_Windowing.cpp


#1

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:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/opengl/ntopnglr_6flf.asp

Cheers
Edwin


#2

Ah, right. Thanks for that one!


#3