Hi Robert,

As Paul suggests CullVisitor::apply(osg::Camera&) handles in scene
graph camera's, so will not handle the viewer level scene graph
correctly so _camera->accept(*cullVisitor) won't behave correctly.

Perhaps you could try replacing the for loop with
_camera->traverse(*cullVisitor) as this will call the cull callback
and avoid the CullVisitor::applyOsg::Camera&) method.   If this works
fine let me know as I can make this change to SceneView.cpp.

I had a similar question about update callbacks. Reading the code (can't recall where, but I suspect it's in SceneView.cpp as well) the update visitor is being passed to the Scene objects, and not to the cameras. The effect of this is that update callbacks on cameras are not called, and more importantly, update callbacks on nodes that are children of the camera but not part of the view's SceneData will not be called either.

We frequently add nodes directly under a camera (instead of under a scene root that's the scene data of a given view) so that the nodes are only visible to that camera. But with the present behavior, update callbacks on those nodes are never called.

If, instead of passing the update visitor to the scene data's root, we passed it to the camera's children, then we're sure all visible nodes would be visited, even those in the scene data...

Thanks,

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

Reply via email to