Hi all,

I have another question about light sources (This may be more directed to 
Robert, but maybe someone has the answer):
Why does the LightSource::setLocalStateSetModes() call "_stateset->clear();"?

Just for info, I:
- set a root node that is a LightSource,
- call setLocalStateSetModes() (called on each frame) to illuminate its 
subgraph,
- and add another LightSource that illuminates the same subgraph.
When doing this, the call to setLocalStateSetModes() (on each frame) seem to 
remove the illumination from the second light source. I guess this is normal 
considering the "_stateset->clear();" statement.
I then have to call 
"lightSource->setStateSetModes(*lightSource->getOrCreateStateSet(), 
osg::StateAttribute::ON);" for this to work properly.

Sukender
PVLE - Lightweight cross-platform game engine - http://pvle.sourceforge.net/
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to