Hi Hesicong,

On Mon, Mar 31, 2008 at 9:39 AM, hesicong2006 <[EMAIL PROTECTED]> wrote:
> Hi eveyone:
>  I'm now trying to render a scene with Depth function set to
>  osg::Depth::Function::GREATER, and I get an empty screen. I have found
>  that the viewer set glClearDepth to 1. Because no fragment will be
>  greater than 1, so I get an empty screen.
>
>  I'm using osgViewer::Viewer, but I found I can't set the glClearDepth
>  value. All I can found is the osgUtil::RenderStage::setClearDepth()
>  function. Is there any way to set clear depth value to another value in
>  a simple way? Thanks in advanced!

One could grab the SceneView's RenderStage from via the
Camera->getRenderer() but this is rather convoluted.

The better solution would be to extend osg::Camera to include a
s/etClearDepth() in addition to the present setClearMask and
setClearColor as logically they all belong together.  The same should
apply to the other parts of the clear operation.

The OSG is developed on a need be basis, this means that things are
only added when their is a real need, this is good for keeping the API
minimal and focused on real users needs, but.. it does mean that if
you push the envelope by needing a feature that has yet been added
then it's time to highlight it and discuss what to do about it.  So...
we've already ticked most of these boxes, all is left now is to code
the solution!

Changes to osg::Camera, osgUtil::SceneView and possibly
osg::CullSettings will be required but these aren't too extensive.

Robert.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to