[osg-users] Finding the near and far plane.
Amal
raj.amal at gmail.com
Tue Aug 14 11:37:16 PDT 2007
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 ?
Amal.
On 8/14/07, Robert Osfield <robert.osfield at gmail.com> wrote:
>
> On 8/14/07, Amal <raj.amal at gmail.com> wrote:
> >
> >
> > I want to find them in a node which is attached to the scen graph. I
> need
> > them in a Shader code for calculating the depth.
>
>
> OpenGL provides built in uniform gl_ModelViewMatrix which is directly
> available from in the shader. You'll need to compute the near/far
> from this yourself.
>
> Robert.
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070815/fca07c82/attachment.html
More information about the osg-users
mailing list