[osg-users] OpenSceneGraph with Qt multiple windowing problem
aluaces at udc.es
Thu Sep 20 08:30:07 PDT 2007
El Wednesday 19 September 2007 20:58:00 Robert Osfield escribió:
> For apps that have multiple windows and mulitple views on to one or
> more scenes that CompositeViewer is the most apporpriate tool.
> There is but though, running with multiple graphics context is not
> possible when one use GraphicsWindowEmbedded - only single threaded,
> single context per Viewer/CompositeViewer is possible. If you have
> multiple Windows then you need a separate Viewer/CompositeViewer for
> each one.
I'm a bit confused about the naming. What do you mean by "graphics context"?
An OpenGL one or an osg::GraphicsContext?
I ask because currently I have a wxWidgets application with two views of the
same scene. Each view is attached to an osgViewer::GraphicsWindow which in
turn controls its wxGLcanvas. The two wxGLcanvas were created with a common
OpenGL context, so all the GL objects as display lists, textures... are
shared. Each osgViewer::GraphicsWindow has one osg::State.
In summary I have
2 wxGLCanvas ( sharing GL objects, one only common wxGLContext)
2 osgViewer::GraphicsWindow ( which are in fact 2 osg::GraphicContext)
2 osgViewer::View (I'm using osgViewer::CompositeViewer)
2 osg::State (not sure if only one would do)
If, in addition, I wanted to show two more views of a new different scene,
should I do the same as before (creating 2 GraphicsWindows, 2 Views, 2 States
and connect them to the 2 wxGLCanvas with a new shared OpenGL context) and
attaching the Views to the existing CompositeViewer or should I create a new
CompositeViewer and attach the 2 new Views there?
Thanks for the tips,
More information about the osg-users