Hi Deniz,

On 5 November 2013 15:26, Deniz Koçak <[email protected]> wrote:

> Is it mean that it is not necessary to set data variance to dynamic
> for nodes like osg::Group (and classes derived from it)?


The draw thread only looks at the DataVariance of the Drawable and StateSet
leveas, the setting on the nodes don't have any effect on the draw
traversal.

In the core OSG the DataVariance is currently only used by the
osgUtil::Optimizer to know which parts it is safe to optimize away.



> For example,
> what is the best practices to add a group (of course its children
> also) to our graph during runtime (is it okay to add/remove child to
> graph after returning from viewer.frame() ).


It is safe to remove children before or after Viewer::frame().  You might
actually just want to call the component of frame() directly rather than
the high level frame() method, have a look at the implementation of frame()
to see what it does.



> Moreover, how can we
> understand whether the cull traversal has completed or not?


When the Viewer::renderingTraversals() method, which is called from
Viewer::frame(), returns the cull is complete, and depending upon the
threading model the draw traversal may well also be complete.  There isn't
a specific callback/operation for tracking when the last cull traversal is
complete though.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to