Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-16 Thread Robert Osfield
Hi J-S, Viewer::updateTraversal() and CompositeViewer::updateTraversal() both traverse the scene graph and explictly camera's update callbacks. What these updateTraversal() methods do is switch of the traversal of the camera's subgraph when the camera subgraphs are traversed, so the children

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-16 Thread Jean-Sébastien Guay
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

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-16 Thread Jean-Sébastien Guay
Hi Robert, What these updateTraversal() methods do is switch of the traversal of the camera's subgraph when the camera subgraphs are traversed, so the children won't be traversed. This is done so that the scene graphs aren't traversed multiple times per frame, but... I believe in your case

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-16 Thread Robert Osfield
Hi Colin, Your analysis of the what is required is spot on, the only little change I've made to it is to remove the (osg::Node node = *_camera.get()); as one can simple use the _camera ref pointer directly thus: // traverse the scene graph to generate the rendergraph. // If the camera

[osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Colin Branch
Greetings All, I added a CullCallback to the camera of a view. I found it was not getting hit. After much searching I believe it is due to the implementation in the SceneView: Specifically at line 957: // traverse the scene graph to generate the rendergraph. for(unsigned int

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Paul Martz
Colin Branch wrote: // traverse the scene graph to generate the rendergraph. for(unsigned int childNo=0; childNo_camera-getNumChildren(); ++childNo) { _camera-getChild(childNo)-accept(*cullVisitor); } Is there a reason that it is simply not replace that

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Robert Osfield
Hi Colin, 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

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Jean-Sébastien Guay
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

Re: [osg-users] Question regarding Culling issue in the SceneView

2009-12-15 Thread Colin Branch
J-S, 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) -Colin On 12/15/2009 2:10 PM, Jean-Sébastien Guay wrote: Hi Robert, As Paul