Never mind; I was able to figure out a solution by studying the 
osgpackeddepthstencil example and some OpenGL stencil buffer tutorials I found 
online.

What I did was add a node to the root where I created a geometry the same size 
as my video projection, and added a Stencil.  I also turned off depth testing 
and set the ColorMask to false.  This became my stencil mask.

Then, I added two more nodes to the root.  Each had a stencil.  One was set to 
draw if the stencil was equal to 1, the other if not equal to 1.  To the first 
node's StateSet I also added the texture I am projecting.  To each of these, I 
added the node which was the root of my model geometry.  This caused the video 
projection to be drawn inside the mask, and the rest of the scene without the 
projection outside the mask.

-Mike

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=45638#45638





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to