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

OpenSceneGraph Users osg-users at lists.openscenegraph.org
Tue May 19 01:07:19 PDT 2020


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/13f788ed-c4ae-490e-bbab-c893dd815fb6%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20200519/eda4a6f9/attachment.html>


More information about the osg-users mailing list