Hi Cory, Sorry I came a bit late to this thread, but just in case you sill find it useful, I sent some code to the list about a year ago, that implements the stencil technique described in the red book. It is in this message:
http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2010-September/044664.html Regards, On Wed, Jul 20, 2011 at 5:48 PM, Cory Riddell <[email protected]> wrote: > I've been thinking about using a ClipNode to cut my model in two to > expose the inside details like a cutaway drawing. Just sticking a > ClipNode at the root of my model graph does remove half of it, but the > model ends up looking hollow rather than solid. I want to cap the open > side. For example, if a sphere is cut in two, I would cap the open side > with a circle. > > A bit of searching for how to do this with OpenGL turned up this page > (http://glbook.gamedev.net/moglgp/advclip.asp) that caps the open side > using the stencil buffer. Does the technique outlined in the article > look like a reasonable OSG-friendly approach? Any advice or pointers to > other examples? Grepping the example code turns up a bunch of stencil > code, but I'm still a little lost (OpenGL newbie). > > Thanks, > Cory > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Javier Taibo _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

