Hi Tugkan, On 2/20/07, Tugkan Calapoglu <[EMAIL PROTECTED]> wrote:
I've tried it. It doesn't work.Just to be sure I've tried it inside osgviewer.cpp as follows . viewer.setSceneData( loadedModel.get() ); viewer.getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); printf("nf mode:%i\n" , viewer.getCamera()->getComputeNearFarMode()); return viewer.run(); . It didn't work here also. printf prints 0 which is CullSettings::DO_NOT_COMPUTE_NEAR_FAR.
It should work, so if it isn't there must be some code missing or wrong in osgViewer. The CullSettings should be inherited from the Viewers master Camera down to any slave Camera, and the SceneView's created internally should inhert their Cull Settings down from the Slave or master Camera they are associated with. A quick scan of the code in src/osgViewer/Viewer.cpp and src/osgUtil/SceneView.cpp doesn't reveal any code for forcing the inhertance of the CullSetting like there is in osgProducer/OsgCameraGroup.cpp. The right place to add it in osgViewer will probably the ViewerDoubleBufferedRenderingOperation class just before the cull traversal. Robert. Robert. _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
