Hi Ben,

Can osgViewer::CompositeViewer be used to manage views in different QGLWidgets?

We use osgViewer::CompositeViewer with multiple instances of a widget similar to QOSGWidget (see the osgViewerQT example) to do what you're talking about.

We can either split one widget into 1x1, 1x2, 2x1 or 2x2 configuration, or we can spawn new floating widgets that are a Qt window with a QOSGWidget in them, with a view in the same CompositeViewer. Being separate views in the CompositeViewer, it automatically follows that each one has a separate camera manipulator, event handlers, etc. as you require.

The one thing we're having trouble with is the fact that OSG writes into its graphics context whenever it wants, and doesn't necessarily let QT know about it, so overlaying other widgets over the QOSGWidget doesn't work very well (they get erased and flicker). And you have to be careful to make sure OSG's threading and QT's threading don't trip each other up (make each other wait around doing nothing)...

But apart from those gotchas, it works well.

I don't have specific code to share, but it should be pretty easy to start with the osgViewerQT example and work it into a tech demo of what you're after.

Hope this helps,

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