Hi Colin,
I tried adding an update callback to the top level camera and that did
work. I checked the code and it does call accept:
346:
_camera->accept(*_updateVisitor.get());
So it should work correctly (as of 2.8.2)
Sorry, I was mistaken in saying that the cameras did not get the update
visitor. They do as you point out.
I did some checking, and what I was talking about is in
src/osgviewer/Viewer.cpp
void Viewer::updateTraversal()
{
// ...
_scene->updateSceneGraph(*_updateVisitor);
//...
_scene is the scene graph that's passed to the view when you call
setSceneData(). A bit lower, you can see where the update visitor is
passed to the cameras too, but it does not traverse to its children.
That means that anything that's a child of the cameras but not in the
scene data will not be traversed in the update traversal. That's what I
was talking about.
I really wonder why the camera can't just let the update visitor
traverse its children, instead of traversing the _scene separately as
above. The _scene's nodes are under the camera anyways, or else they
would not be visible...
J-S
--
______________________________________________________
Jean-Sebastien Guay [email protected]
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org