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
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to