On 5/10/2011 2:59 AM, Duan Linghao wrote:
Hi,
How can the light node only affect the node which I specified?
The structure of my scene is:
               root
                /  \
child1_group    child2_group
          /
      light
I hope the light can only affect the child1_group,but the child2_group also be 
influence by the light node.How can I deal with that?

Enable the light in child1_group, and disable it in child2_group.

  osg::StateSet::setMode( GL_LIGHT0 + index, osg::StateAttribute::ON (or OFF) );

   -Paul


_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to