Hi Andy,

Which version of the OSG are your using?

On 11/17/06, Andy Preece <[EMAIL PROTECTED]> wrote:
In my MFC application I create an osgUtilSceneView (shown below) and attach
a simple scene graph with a Switch node as the root. Initially all the
children of the Switch node are set off. When I execute the program, I get
the following message displayed every frame until I enable the Switch. The
scene displays correctly.

_clampProjectionMatrix not applied, invalid depth range, znear =
3.40282e+038 zfar = -3.40282e+038



If I add the line 'm_SceneView -> setComputeNearFarMode(
osgUtil::CullVisitor::DO_NOT_COMPUTE_NEAR_FAR ) ;' the
error message dissappears but some parts of the scene are missing (e.g.
Those bits of the scene that lie outside the clip range 0.0 to -1.0).

Can anyone explain this behaviour?

Its simply the cull traversal is finding an empty scene so unable to
set the near and far sensibly.  Later versions of the OSG handle this
case better.

How so I set the osgUtil::SceneView's near and far clip plane values and
prevent them from being auto-calculated for me?

Errrh the setComputeNearFarMode you used above switches off the auto
compute... :)

To set the near and far you simple use the
SceneView::setProjectionMatrix*() methods.

Robert.
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to