Thank you very much. The code above works

On Tuesday, May 19, 2020 at 4:07:19 PM UTC+8, Robert Osfield wrote:
>
> I have moved this posted from vsg-users to osg-users as this is the 
> correct forum for OSG support.
>
> In the OSG to do multi-pass effect that require clearing of the 
> depth/color/stencil buffers you use an osg::Camera.  The osghud example has 
> a code path that illustrates the use of osg::Camera to clear the depth 
> buffer only.  The part that controls the clearing is the line:
>
>     // only clear the depth buffer
>     camera->setClearMask(GL_DEPTH_BUFFER_BIT);
>
> For you needs you'd use the GL_STENCIL_BUFFER_BIT.
>

-- 
You received this message because you are subscribed to the Google Groups 
"OpenSceneGraph Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to osg-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osg-users/032f2dc8-65e4-4c05-8558-fd8ec86c26a8o%40googlegroups.com.
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to