[osg-users] How do I obtain calculated zNear / zFar from an osg::Camera ?

Daniel Holz osgforum at tevs.eu
Fri Mar 13 11:43:19 PDT 2009


An update:

I forgot to say that I am rendering to a texture.

So basically what I do is the following:

Code:

osg::Camera* camera = new osg::Camera;
...
camera->setComputeNearFarMode(osg::CullSettings::COMPUTE_NEAR_FAR_USING_BOUNDING_VOLUMES);
...
camera->attach(.... , texture);




When stepping through my application I noticed that for this camera no culling is performed. This is why the zNear / zFar is not changed.

Now my new question:
Is it possible to have automatic near / far plane computation for a render to texture pass somehow?

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=8467#8467








More information about the osg-users mailing list