Hi John,

You can update the scene graph from your main frame loop, or assign an
custom UpdateOperation to the viewer.

// the expanding frame loop (equivilant to viewer.run())
while(!viewer.done())
{
    viewer.advance();
    // do you stuff here.
    viewer.eventTraversal();
    // or here...
    viewer.updateTraversal();
    viewer.renderingTraversals();
}


Robert.

On Thu, Jul 16, 2009 at 6:36 AM,
[email protected]<[email protected]> wrote:
> I have a Switch node with a child tree that can change from frame to frame.
>  It may add or delete geometry, drawables, etc.  Given that I am running a
> multi-threaded, multi-osgViewer application, when is the proper time to
> update this node?  Is there a callback on the top-level scene, or camera, or
> view, or ?? that should be responsible for triggering these updates?  The
> problem is, right now, from time to time as I manipulate the underlying node
> structure, the program crashes.  I "believe" this is because I am removing
> geometry when another thread is trying to access that geometry.  Any help
> would be appreciated!
> - John
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to