Trajce Nikolov wrote:
here was my case. and also this might have something to do with lazy
state update
the top node has 3 textures assigned
the children only one with setting 0 and protected
I was expecting the child to have only one texture, but it inherits
the additional textures from the top node as well. So I fixed it with
VirtualProgram for this case
Hi, Trajce,
Each texture unit is effectively a different state attribute/mode.
You'd have to set all three textures on the child's state to show only
the one...
childState->setTextureAttributeAndModes(0, childTex,
osg::StateAttribute::ON);
childState->setTextureMode(1, GL_TEXTURE_2D, osg::StateAttribute::OFF);
childState->setTextureMode(2, GL_TEXTURE_2D, osg::StateAttribute::OFF);
There shouldn't be any need for PROTECTED (unless the parent has
OVERRIDE turned on).
--"J"
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org