Thanks for your reply. I have did that as you said. but that can bring on a new wrong about the culling .
My scene contains a terrain ground and a sky box , and part of the sky box is under the terrain. Before , I added the terrain's root node first and then added the sky box's root node, so the near plane' value of perspective was too big , that could bring on cutting part of my terrain when viewpoint move closely to the surface of the terrain. When I change the add sequence, everything comes ok. But I really don't know why? Thanks again! 2008/1/23, Robert Osfield <[EMAIL PROTECTED]>: > > Hi David, > > The OSG by default automatically computes the near and far planes > according to the scene that it traverses during rendering. > > To switch this automatic compute of near and far planes off simply use > the methods in osg::CullSettings that osg::Camera inherit from i.e. > > > > viewer->getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR); > > Then you'll be able to set the projection matrix without the OSG > recompute the near/far planes for you. > > Robert. > > On Jan 23, 2008 6:33 AM, ZHMW <[EMAIL PROTECTED]> wrote: > > Hi everyone! > > In my application, I have set the projection matrix (to set the near > > plane) of viewer's master as perspective (using > > viewer->getCamera->setProjectionMatrixAsPerspective(...)). I did this > after > > I set the scene's data. However, I don't know why my setting didn't > work. I > > have fetched the perspective later, It's not what I setted. > > Help me please! :-( > > > > Best wishes! > > > > _______________________________________________ > > osg-users mailing list > > osg-users@lists.openscenegraph.org > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org