Ah! Infamously ambiguous as always.  

I meant that I have an osg::projection as the "background" for my HUD.  I 
managed to solve it about 2 minutes before you posted it.  

Like I mentioned I had two models playing animations on the HUD which is just a 
green 4 point rectangle geode I create with some opacity.  

The models were underneath that geode and I wasn't sure why.  Thought it might 
have something to do with the way an osg::projection was handled.

I fixed by altering its state set.  Before I had:

osg::ref_ptr<osg::StateSet> HUDStateSet = new osg::StateSet();
HUDgeode->setStateSet(HUDStateSet);
HUDStateSet->setMode(GL_BLEND, osg::StateAttribute::ON);
HUDStateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);
HUDStateSet->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
HUDStateSet->setRenderBinDetails(11, "RenderBin");

But I don't want everything to be rendered with transparency.  Just the actual 
Geode.

So I removed the renderingHint and the RenderDetails lines so I only had:

osg::ref_ptr<osg::StateSet> HUDStateSet = new osg::StateSet();
HUDgeode->setStateSet(HUDStateSet);
HUDStateSet->setMode(GL_BLEND, osg::StateAttribute::ON);
HUDStateSet->setMode(GL_DEPTH_TEST, osg::StateAttribute::OFF);

This fixed it and the models are now rendered OVER the transparent geode.

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





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

Reply via email to