Hi J.S; Thanks for reply, It works. I have known this rule but for some reason forgot so I have been trying to PROTECT child's stateSet :D
Regards. Ümit Uzun 2009/12/3 Jean-Sébastien Guay <jean-sebastien.g...@cm-labs.com> > Hi Ümit, > > > I have a shader and try implement to the ParentNode but I don't want to >> effect ChildNode with this shader. I want render ParentNode with Shader and >> render ChildNode with FixedFunction without any effect from it's parent's >> shader. I have tried to use osg::StateAttribute::PROTECTED but which >> osg::Attribute should I set to PROTECTED? >> I mean ChildNode->getOrCreateStateSet()->setAttributeAndModes( ????, >> osg::StateAttribute::PROTECTED | osg::StateAttribute::OFF); >> What should I assign to ???? Or Does this way wrong or not? >> > > This is an FAQ... > > ChildNode->getOrCreateStateSet()->setAttributeAndModes( > new osg::Program, osg::StateAttribute::ON); > > Empty osg::Program without any shaders attached means fixed pipeline. You > don't even need Protected, unless you're using Override on the parent node. > > J-S > -- > ______________________________________________________ > Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com > 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 >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org