Hello,

As part of the investigation in the "Hidden Viewer" thread, Juan Hernando found out that the PixelBufferX11 class does not do a makeCurrentImplementation() in its realizeImplementation() function, but the PixelBufferWin32 class does. In order to be able to makeCurrent() from another thread after doing realize(), the context has to be released. So this adds a releaseContextImplementation() at the end of PixelBufferWin32::realizeImplementation().

I wonder if the makeCurrentImplementation() is really necessary, another way to fix it would be to remove it which removes the need for a releaseContextImplementation(), but I made this change under the assumption that that line was there for a reason and didn't even try it. Some other OpenGL expert might be able to answer the question more decisively.

Please credit Juan for the fix, I only executed it and confirmed it worked.

J-S
--
______________________________________________________
Jean-Sebastien Guay    [email protected]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to