Hi all, If anyone finds this useful, my current solution, combining help from this thread and Paul Martz at http://forum.openscenegraph.org/viewtopic.php?t=13877, looks like the following:
Code: osg::StateSet* state = _rootGroup->getOrCreateStateSet(); if (op == 1) { state->removeAttribute(osg::StateAttribute::BLENDCOLOR); state->removeAttribute(osg::StateAttribute::BLENDFUNC); state->setRenderingHint(osg::StateSet::DEFAULT_BIN); } else { osg::BlendColor* bc = new osg::BlendColor(osg::Vec4(1.0, 1.0, 1.0, op)); osg::BlendFunc *bf = new osg::BlendFunc(); state->setAttributeAndModes(bf, osg::StateAttribute::ON); state->setAttributeAndModes(bc, osg::StateAttribute::ON); bf->setSource(osg::BlendFunc::CONSTANT_ALPHA); bf->setDestination(osg::BlendFunc::ONE_MINUS_CONSTANT_ALPHA); state->setRenderingHint(osg::StateSet::TRANSPARENT_BIN); } Next I'll try to see if I can set a material so that the blend settings are ignored for a part of the sub-tree. Thanks for all the help that carried me this far! Claudio ------------------ Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=75790#75790 _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org