Well, I Do have two cameras. See, this is a planning view and I'm trying to 
replicate an old Performer trick that I learned.  One camera is for the terrain 
and another camera for the object elements that has it clear mask set to 
GL_DEPTH_BUFFER_BIT - based on the HUD example.

Sort of like layers in photoshop!
 
I did this as a trick to avoid having the lines or anything else be covered 
behind terrain - so the objects always seem appear on top of the terrain - like 
a map. I figured that if could do it in Performer, it might work on Open Scene 
Graph.  Behind the grid I also have a phantom version of the terrain. I used 
the globe from the osglogo example and colored it black, then got the state set 
and set the color mask useing:

Code:

osg::ColorMask* cm = new osg::ColorMask(false,false,false,false);
state->setAttributeAndModes(cm,osg::StateAttribute::ON);



then set render bin details for that object:

Code:

state->setRenderBinDetails(-10000,"RenderBin",osg::StateSet::USE_RENDERBIN_DETAILS);



This makes a phantom globe for the grid to hide behind.


Well, you see the reason that I thought I might have to post some of the code 
so you might have a better understanding of whats going on. 

This may not matter, but this is all being done using QT window (using the 
osgQTveiwer example as a gide)  and it's running under Linux. 
... 
D Glenn

------------------------
D Glenn (a.k.a David Glenn) - Join the Navy and See the World ... from your 
Desk!

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





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

Reply via email to