Hi, Shuiying

about first question:
osg::LightSource designed mainly to position light in scene. Light will affect 
nodes which have enabled GL_LIGHTx (with x same as light index in lightsource) 
in all scene.
LightSource have stateset which by default enables appropriate mode (GL_LIGHTx) 
for scene graph under it. This behaviour is controllable through public 
interface.

Cheers,
Sergey.

18.05.2012, 20:19, "wang shuiying" <[email protected]>:
> Hello,
>
> I have 2 questions about the lightSource node.
>
> (1) Does lightSource affect all the geode nodes in the scenedata  or
> only the ones that are under it in the sceneData structure?
> (2) In my application, a lightSource is attached to the main sceneNode,
> and this lightSource has a osg::group node (NodeA)as its child which
> contains several 3D models . There is also a pre render camera attached
> to the lightSource, and that pre render camera also has NodeA as child.
> When I set
> lightSource->setReferenceFrame(osg::LightSource::ABSOLUTE_RF), the color
> of the texture from the prerender camera varies as I use mouse to change
> the orientation of master camera displaying the 3D view. I don't know
> what is happening here. In my opinion, as the position and orientation
> of the pre render camera relative to the static 3D objects stay the
> same, the texture color should be the same too.
>
> When  Relative_RF is assigned, then the texture keeps the same however I
> change the master camera.
>
> Can anyone give me some hints on that?
>
> Thanks a lot in advance!
>
> Best regards
>
> Shuiying
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to