[osg-users] CompositeViewer, shared contexts, and multi-threading

148 views
Skip to first unread message

Glenn Waldron

unread,
Apr 30, 2012, 2:22:46 PM4/30/12
to OpenSceneGraph Users
Hi folks,
I've been laboriously reading archives today, and I'd like to know if the following configuration is legal:

* CompositeViewer
* Twoviews that share a single graphics context (one is an "inset" view)
* A shared scene graph
* DrawThreadPerContext mode
* adding and removing views at runtime.

I ask because this thread seems to imply that it's not OK:


..but I could be reading it wrong. I ask because I'm debugging such as setup and it only works consistently in SingleThreaded mode. I've read all the threads I can find on runtime add/remove of views but didn't get any satisfaction yet. Thanks for the insights.


Glenn Waldron / @glennwaldron

Robert Osfield

unread,
May 1, 2012, 5:11:41 AM5/1/12
to OpenSceneGraph Users
Hi Glenn,

If all your views share the same graphics context then it's only
possible to single thread the draw dispatch. With this usage you'll
be able to use DrawThreadPerContext which will allow the update and
cull traversals to overlap the previous frames draw traversal, but
overlap will only extend from the dispatch of the last dynamic object
in the draw traversal being dispatched. If you have a large static
scene then the overlap can be the whole frame, if you have lots of
StateSet and Geometry with a DataVariance of DYNAMIC then the scope
for threading is reduced, and at worst case will essentially be
serialized and equivilant to SingleThreaded.

Robert.
> _______________________________________________
> osg-users mailing list
> osg-...@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-...@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
Reply all
Reply to author
Forward
0 new messages