Rabbi Robinson wrote:
Hi,
There are simple questions:

I was going to point to do some examples, but then I saw there really aren't good examples for these :-)


What do I need to do to make sure transparent object show up properly?

ss = node->getOrCreateStateSet();
ss->setMode(GL_BLEND, osg::StateAttribute::ON);
ss->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);
ss->setRenderBinDetails(1, "DepthSortedBin");



How do I cull the back face of polygon?

cull = new osg::CullFace();
cull->setMode(osg::CullFace::BACK);
ss->setAttributeAndModes(cull, osg::StateAttribute::ON);

Thank you!

You're welcome. In general, most OSG state works this way. You can either find an osg::StateAttribute descendant that handles it (as in CullFace), or if it's normally just a glEnable()/glDisable() setting, you can just set the mode directly (as in GL_BLEND above).

--"J"
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to