Hi Peter, On 25 January 2013 14:24, Peter Bako <[email protected]> wrote: > I want to remove and add a child from/to a group runtime, while rendering is > running, moreover, I am doing this from a different thread. What is the > thread safe way to do it? Which callback should I use, or how would you do it? > > If I remove the node in the update callback I get crashes. On adding, it > works.
You need to do the update of the scene during the update phase and can't be safely done multi-threaded without mutexing access to the whole scene graph. If using an update callback you have to be careful about invalidating iterators for the thread calling the update callback. Robert. _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

