Hi Martin,

On 5/20/07, Martin Aumueller <[EMAIL PROTECTED]> wrote:
just to clarify some points for me. This means:

- setDataVariance is a no-op for osg::Node and derived classes

Not quite a no-op, the Optimizer uses the DataVariance to know whether
it can do certain optimizations of the scene graph - you can apply
things like FlattenStaticTransforms on STATIC transforms, but not
DYNAMIC for instance.

In terms of of cull and draw multi-threading the DataVariance on nodes
has no effect.

- with all ThreadingModels, I am allowed to modify all scene graph data except
non-DYNAMIC Drawables and StateSet's after Viewer::frame() has returned

Yes, but subtle point to add is the end of
Viewer::renderingTraversals(), but since Viewer::frame() calls
renderingTraversals(), frame() obviously won't return till its done.
Some users might not call frame, but call the individual parts of
frame.

- for best performance, I should try to put all DYNAMIC Drawables and
StateSets in a special RenderBin which has a very low number

I personally wouldn't complicate life by going this extra mile, but
yes this would be one way of ensure that all DYNAMIC stuff is dealt
with as soon as possible.

- the OSG Quick Start Guide (section 3.2.1/pages 88/89) is a bit more
conservative than necessary in its explanation when it is allowable to modify
the scene graph: there, even classes derived from Nodes are marked as DYNAMIC
and they are only modified during the update traversal via an update callback

Your are right its overly conservative, or in fact not quite correct
w.r.t how the OSG operates.  If you have an update callback it'll get
called no matter what, and it doesn't really affect the threading
anyway, DataVariance really doesn't come in to it.  DataVariance on
Nodes is really just a hint to traversersals that find the extra info
useful, in the case of update, event and cull traversals that don't
ever look at DataVariance.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to