Hi Martin, Oh, good news! I'm working on Qt5, too. You may see something in the osgRecipes project. In just provided a simple example integrating OSG and Qt5 and draw Qt widgets in the scene graph. It is tested under Windows, but can't work in multithreaded mode.
Unfortunately this seems not an OSG related problem, but an issue in QGLContext that can't work under different threads even doneCurrent() is executed in time. In the following link I found that Qt expects have already noticed it: https://codereview.qt-project.org/#change,40644 I'd like to then use moveToThread() to move QGLContext to the rendering thread so that it could work (at present it will fail and say it can't make a context current on another thread). Maybe these information will help you, too. Cheers, Wang Rui 2012/11/29 Martin Scheffler <[email protected]> > Hi all, > > here is a rough first version of Qt5 running together with OSG. > > > It works fine on linux with Qt5 beta 2. On windows I get compile errors, a > conflict between the OpenGL defines in OSG and those in Qt. Maybe it may > become necessary to separate qt and osg even more so that their headers > don't collide. > > OSG is now rendered to an opengl context created by Qt. The context object > renders to a QWindow. Unfortunately there is not yet an easy way to add a > QWindow as a child to QWidget (this will come in Qt 5.1 I have heard). But > it is possible to add a QWindow to a QWidget by using the window handle. > > What's next: > * Render in a different thread - I just didn't come around to try it, I > don't expect that many problems > * Try to render Qt Quick over the OSG scene. Qt could then be used to make > HUDs. Maybe it is even possible to still keep OSG and Qt in different > threads? > > Thank you! > > Cheers, > Martin[/img] > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=51281#51281 > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > >
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

