Hi Jason,

that is what I exactly did. I put the PROTECTED there becaouse the parent
has OVERRIDE set on it. Did not worked :-) ...


Nick

http://www.linkedin.com/in/tnick
Sent from Izmit, 41, Turkey

On Wed, Jan 20, 2010 at 6:23 PM, Jason Daly <jd...@ist.ucf.edu> wrote:

> 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
> osg-users@lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to