Hi, I'm new to this forum, however I know OSG and Qt from some time ago. I am very interested in the current topic since I need to run Qt 5.1 and OSG 3.2 with multithreading enabled.
I have not tried the patch suggested by Martin since I'd prefer to not modify the OSG core. The problem I am experiencing is "simply" the following runtime error: "Cannot make QOpenGLContext current in a different thread" that crashes my application (which, in turn, is the osgearth_qt_windows.cpp example of osgEarth). This fatal error happens inside GraphicsWindowQt::makeCurrentImplementation() whenever _widget->makeCurrent() is called. I have noticed that this function is called twice: - the first time is called by the main thread (which the widget belongs to) and everything works fine; - the second time, instead, is called by another thread (I guess this is the "right" rendering thread) but it crashes because the widget's thread and the current thread are different. I have tried to place doneCurrent() and makeCurrent() almost everywhere inside GraphicsWindowQt::makeCurrentImplementation() both for _widget and _widget->context()...but the above problem still happens. Is there a way to solve this problem with OSG 3.2 + Qt 5.1 without affecting the OSG core? Thank you! Cheers, andrea ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=55797#55797 _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
