On 10/11/2011 2:00 PM, Joshua Cook wrote:
the wrong computer, fails to send the packet, or UDP just fails to make that left turn at Albuquerque
Ooo! A Bugs Bunny reference. :-)
Since the root node of the scene may constantly change I was just thinking of making its variance DYNAMIC. Of course that has been touted as very inefficient and I agree with that. I had looked at inheriting from osg::Drawable::UpdateCallback but figure that I'd have to make the varience DYNAMIC anyhow so it wouldn't matter. So, my question is, would there be a better way to make this thread safe other than setting the root node to DYNAMIC to avoid crashing when adding another node to the root?
Honestly it sounds like you have a lot worse things to worry about right now than efficiency. If I were in your shoes, I'd get it working and working right first, then tune later. I'm pretty sure that setting osgViewer::Viewer::setThreadingMode(osgViewer::ViewerBase::SingleThreaded) will allow the draw thread to complete before Viewer::frame() returns, which should allow you to add/remove nodes to/from your scene graph. Give that a try.
-Paul _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org