Hi, i found another way to fix the threading problem without changing osg. However its quite more complex and still requires openthreads to be build with qt.
My solution uses a custom osgViewer::GraphicsWindow that derives from osgQt::GraphicsWindowQt. The makeCurrentImplementation method now first checks if the calling thread is the one that owns the OpenGL context. If not the main thread (which owns the context at this point) is instructed to move the context to the calling thread (usually the GraphicsThread) using a blocking connection. When moving the context to another thread the finished method of that thread is connected with a slot that moves the context back to the main thread using a direct connection this time. It is important that the main thread does not wait for the GraphicsThread before the context is moved, otherwise both threads deadlock. Hence osgViewer::realize() must be called before calling osgViewer::frame(). Cheers, Claus ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=60250#60250 _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

