Hello Christian,

The solution was to store and restore the matrix stack as well as the
openGL state, and to call getState()->reset() on the
osgViewer::GraphicsWindowEmbedded object.

I now have an OSG Viewer running on QT 4.5 with overlaid
semi-transparent Qt controls and widgets. I am planning to put
together an osgViewerQTAdvanced sample with a few interactive features
(buttons to click on, etc). This code will be submitted to
osg-submissions when done.

I would suggest using a different name than osgViewerQTAdvanced, because the fact that you're using GraphicsWindowEmbedded tells me that it's not really that advanced, just eye candy... You're missing out on OSG's multithreading capabilities by using GraphicsWindowEmbedded.

Then again, doing what you want using something *other* than GraphicsWindowEmbedded would be difficult if not impossible, because OSG has its own graphics threads that decide when they render, so your overlaid semi-transparent Qt widgets would probably just get rendered over at any time. But if you can find a way to do it, I would be very interested in seeing it!

In any case, it's an interesting development, thanks for sharing!

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

Reply via email to