On 8/14/07, Amal <[EMAIL PROTECTED]> wrote:
>
> Suppose if I want to set the near and far plane for the scene to some
> specific values , how should i go about doing this ?
>
> Iam doing
> viewer->getCamera()->setProjectionMatrixAsFrustum() just
> before the viewer.run() . Is it fine ?

This would be fine, but by default the OSG computes the near and far
planes optimizing them for each new frame.  If you do want this
computation you can switch it off via:

viewer->getCamera()->setComputeNearFarMode(osg::CullSettings::DO_NOT_COMPUTE_NEAR_FAR);

Prior to running the main frame loop.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to