HI Wu, You only need to set the Node DataVariance as a hint to the osgUtil::Optimizer that is typically only used after loading a new model, the Node DataVariance is not used during the update, event, cull or draw traversals.
However, when using DrawThreadPerContext or CullThreadPerCameraDrawThreadPerContext threading models the StateSet and Drawable DataVariance is used to prevent dynamic leaves of the scene graph being updated and rendered at the same time - the draw traversal holds back the main thread till all the dynamic objects have been dispatched. Robert. On 6 March 2014 03:35, ttaw <[email protected]> wrote: > There's a saying on internet that setDataVariance(DYNAMIC) must be called > to a group node which is to be changed while updating. But in my opinion, > it's unnecessary because the child drawable pointers and stateset pointers > are saved in ReaderLeaf as a ref_ptr if OSGUTIL_RENDERBACKEND_USE_REF_PTR > is defined. In fact, this macro is defined in the begining of the file > "RenderLeaf".Even if one or more child nodes were removed while updating, > the drawables wouldn't be deleted and no crash would happen. We must set > a node dynamic only when its stateset is to be changed or its drawables are > to be changed. But I'm not sure of this and want to know if I'm right.Could > anybody tell me the truth?Thanks. > ------------------ > Failure is the mother of success. > Wu Zhicheng > > > _______________________________________________ > 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

