I'm looking for some advice having OSG running in one own thread and modifying the scene graph in another.
By this, I mean I've called viewer.run() in a separate thread. While it's running, I need to add, remove, and update nodes. From reading the quick start guide (a fantastic resource btw) I understand that the data variance must be set to dynamic and changes can be made in the update traversal. It seems like one way to do this would be to use the update callback. Is there another way that doesn't involve me manually looping and calling viewer.frame()? Assuming the callback is the right way to proceed, I'm curious how others have synchronized access and managed changes that can drastically alter the structure of the scene graph. I'm starting to think that perhaps I should be swapping out the scene data entirely when a change is made. By that I mean preparing an entirely new scene graph that represents the current state of my model then calling viewer.setSceneData(). When is it safe to call this method? Any advice or pointers to relevant demos? Cory _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

