[osg-users] How to clean up Stencil Buffer between two nodes in OSG

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Thu Jun 18 18:23:25 PDT 2020

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+unsubscribe at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200618/65a0c61e/attachment.html>

More information about the osg-users mailing list