Hello Anders,

Oups.. Tried setComputeNearFarMode instead but it still computes near&  far 
plane.

I've recently had trouble with this myself. I'm using 2.8.3 (not sure which version you're using) and it seems something goes wrong in the inheritance of cull settings between Camera, SceneView and CullVisitor that results in CullVisitor still computing the near & far even if you disabled it in the Camera.

What I had to end up doing is setting the value directly on the SceneView myself.

camera->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

// In OSG 2.8.3, the compute near far mode was not properly inherited
// from the camera, so we set it explicitly on the SceneViews.
dynamic_cast<osgViewer::Renderer*>(
    camera->getRenderer())->getSceneView(0)->setComputeNearFarMode(
        osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);
dynamic_cast<osgViewer::Renderer*>(
    camera->getRenderer())->getSceneView(1)->setComputeNearFarMode(
        osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

The CullVisitor should inherit its cull settings from the SceneView and if its inheritance mask includes the near far setting (bit 0, value 0x1) then all should be well and the computation should hopefully really be disabled.

You can see this in action and could confirm if that's really the problem on your side by putting a breakpoint in SceneView::cull() and going from there.

I'm not sure if this is fixed in the SVN version. Perhaps you could make a small example that demonstrates the problem you see, and then we could more easily confirm the issue and fix it correctly (to avoid others having to make this kind of workaround in the future).

Hope this helps,

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