Hi Pjotr,

On 20 May 2014 16:09, Pjotr Svetachov <[email protected]> wrote:
> If you use the Drawable::setUpdateCallback method to add a 
> osg::Drawable::UpdateCallback it will not fire because a group does not 
> update it's NumChildrenRequiringUpdateTraversal variable when it has Drawable 
> nodes that have callbacks.

I have just reviewed the source code and the
Draw::setUpdateCallback(Drawable::UpdateCallback*) implementation
looks like it should iterator through the Drawable's parents to update
the list.  However, reviewing the Group::insertChild() method I see
that I doesn't know about the duality the old Drawable::UpdateCallback
and the NodeCallback also associated with UpdateCallback.  Rather
yucky C++ now. I will need to think how best to resolve this,
suggestions welcome.

> If you use the Node::setUpdateCallback method to add a osg::Nodecallback 
> instead it will not fire because the node visitor will stop visiting when 
> NodeVisitor::apply(Drawable& drawable) is fired.

I have just added an osgUtil::UpdateVisitor::apply(osg::Drawable&)
implementation that should at least make sure the
Drawable::UpdateCallback and it's update NodeCallback are called.

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

Reply via email to