> dirtyBound() is something that can be called multiple times, 
> but will only set a flag so is quite cheap.

I see what you mean when you say dirtyBound() could be called multiple times
per frame, so my idea of overriding it wouldn't produce a very efficient
solution.

> The 
> computeBounds() will just be called on demand and therefore 
> should only be called once per frame.
> computeBounds() is the place where I would stick my changes, 
> its virtual for a good reason.

Okay, but because computeBounds() is const, I have to cast away const in
order to perform operations on the scene graph within this function.
Furthermore, when I do this, I see crashes in multidisplay environments,
probably due to a thread collision caused by modifying the scene graph in
one thread while another accesses the same part of the scene graph.

Taking a look at CullVisitor, it's not clear to me how you ensure that
computeBounds() is only called once per frame in multidisplay environments
(where multiple cull traversals would be running concurrently). Can you
explain how this is handled?
   -Paul

_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to