Hello, This is my first post, so please forgive any breech of etiquette.
I'm trying to use stencil buffers to achieve outlines around my objects, as described in the following article: http://www.codeproject.com/KB/openGL/Outline_Mode.aspx I want to be able to display the outlines of objects regardless of whether they are behind another object or not. For example, say I have two objects: A and B. If Object A is partially occluded by Object B, I want to display the entire outline of Object A, even the occluded part. The problem I'm running into is that when Object B is rendered first, the silhouette for Object B is in the stencil buffer, which prevents the outline surrounding the occluded parts of Object A from being drawn. Similarly, if Object A is rendered first, a part of the outline for Object B will not be drawn because the silhouette of Object A is in the stencil buffer. This is a long way of saying: How do I clear the stencil buffer in the middle of rendering? I took a look at osg::ClearNode, but when I set its clear mask to GL_STENCIL_BUFFER_BIT, it had an effect as if I had cleared the GL_COLOR_BUFFER_BIT instead. I am aware of the polygon offset method of outlining objects, but have found the stencil buffer method to be much more accurate in my application. Thanks, -Chris
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

