Hi Wojciech, On Fri, May 9, 2008 at 2:16 PM, Wojciech Lewandowski <[EMAIL PROTECTED]> wrote: > Problem could be relaxed when wglMakeCurrent gets called before each frame > rendering. I noticed that artifacts appeared when wglMakeCurrent was called > only once while worker rendering thread initialization . When wglMakeCurrent > was called every frame artifacts did not appear.
wglMakeCurrent "shouldn't" be required if one has a thread per context, one a thread does a wglMakeCurrent() it shouldn't release the context till this thread calls release context (done with wglMakeCurrent(_hdc, NULL)). As you are finding that the wglMakeCurrent() per frame is required, this either suggests that the OpenGL driver is playing fast and loose with the graphics context behind the scenes so the app looses the context being current, in which case this is very much a driver bug, or that the OSG itself is doing makeCurrent on the context from another thread or releasing the context when it shouldn't. Could you put some debug output into GraphicsWindowWin32.cpp's makeCurrentImplementation(..) and relaseContextImplementation(..) to see if there are being called when you wouldn't expect, printing out the pointer to the current thread would be useful as well. Robert. _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org