Hello Renan,

Can is probably right, blending is probably not enabled on your node. If you enable it, setting the transparency through the material will probably work.

You will probably also need to give OSG a hint that your node contains transparency:

    stateset->setMode(GL_BLEND,osg::StateAttribute::ON);
    stateset->setRenderingHint(osg::StateSet::TRANSPARENT_BIN);

The stateSet whose mode you are setting is from the drawable or the geode? And how exactly can I do that without destroying my previous settings? (geode -> getOrCreateStateSet() -> setAttributeAndModes(this->material.get(), osg::StateAttribute::ON);)

The stateset will contain different settings without losing them. When you set a material, it doesn't affect anything else in the stateset. The only case where you'll lose something is if your stateset already had a material (the new one will replace the old one).

Hope this helps,

J-S
--
______________________________________________________
Jean-Sebastien Guay    [EMAIL PROTECTED]
                               http://www.cm-labs.com/
                        http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to