[osg-users] Manipulating the diffuse color in the entire scene
Ofir Ofir
ofirosg at gmail.com
Mon Jul 23 06:24:08 PDT 2007
Hello!
I would like to use a node with a special StateSet, so I can force the
diffuse color in the entire scene (which is added as a child to the node) to
be (0,0,0,1).
I tried doing so with the attribute Material:
"
node->addChilde( entireSceneNode );
state = node->getOrCreateStateSet();
material->setDiffuse( Material::FRONT_AND_BACK, Vec4( 0, 0, 0, 1 ) );
state->setAttributeAndModes( material.get(), StateAttribute::ON |
StateAttribute::OVERRIDE);
"
But the result was that the ambient,specular,shinness etc. was changed as
well. How can I force the diffuse color alone on the entire scene?
Thanks!
Ofir
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20070723/b340df28/attachment.htm
More information about the osg-users
mailing list