HI Sebastian,

osgDB::Registry is written to handle multi-threading, not all plugins are
thread safe but the mains one will be with the latest rev of the OSG.

As a general approach, if you want multiple View's which have their own or
share Scene's then the appropriate class to use is CompositeViewer as it's
written specifically for this purpose.

When sharing a scene graph the osgViewer library automatically assigns an
osgViewer::Scene for each unique scene graph, while sharing the Scene if
you assign that scene graph to multiple View's.  The Scene holds the
DatabasePager for that scene graph so there isn't any overlap with multiple
pagers trying to load stuff for the scene graph in an uncoordinated way.

One way that could break this mechanism is sharing portions of the scene
graph and assigning the subgraph to each View as the Scene won't pick up on
the fact that it's the same overall scene graph.  If you have this
situationist then sharing the same complete scene graph and use a
combination of NodeMask and TraversalMask for each View to make sure on the
part you want visible in each View is seen.

Robert.


On 7 March 2016 at 15:04, Sebastian Messerschmidt <
sebastian.messerschm...@gmx.de> wrote:

> Hi,
>
> I've got some abnormal usage-pattern of viewers and scenes in one
> application.
>
> There is some Qt-based application using OSG to render different scenes
> into individual widgets(which use an osgViewer::Viewer), which kind of
> works.
> The problem is mainly due to osgDB::Registry being a singleton and
> therefore some facilities* shared between the viewers.
> I was thinking about moving to a CompositeViewer, but I'm uncertain if I
> should with having totally different scenes in the viewers. Is there some
> better way to display multiple widgets with different scenes in one
> OSG-application?
>
> *For instance the ReadFileCallbacks and the DatabasePager seem to be
> affected.
>
> Cheers
> Sebastian
> _______________________________________________
> osg-users mailing list
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to