Hi Daniele,

The best to implement multi-thread updates of the scene graph is to
prepare your new scene graphs in the separate thread then merge these
with the main scene graph during the update phase, this way you avoid
modifying anything that is being currently traversed.   This is how
the DatabasePager manages multi-threading loading and expiry of
subgraphs.

In svn/trunk and 2.9.11 there is also an new osganalsyis example that
has a simple example of custom paging in a background thread that adds
and removes subgraphs from the main scene graph in the main viewer
thread.

Robert.

On Fri, Feb 4, 2011 at 11:58 AM, daniele argiolas <arj...@gmail.com> wrote:
> Hi,
> in my application I have an external thread that makes addChild, removeChild 
> (and updateCallback) over the scene.
> Now I make simple operations and sometimes it happens that the program 
> crashes (in the RenderingTraversal).
> What means "create a command operation that you pass to the viewer"? How?
> Or to set a mutex in update traversal do I need to modify the osg source?
>
> I try to use "getGlobalReferencedMutex()" but I don't understand how I have 
> to use it.
>
> Thank you
> daniele
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=36362#36362
>
>
>
>
>
> _______________________________________________
> 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