Hi John,

Have a look into discussion on osg-users about positional state.
LightSource is what positions Light in the scene.  You can't have one
GL light in more than one place at a time, and the light has to be
positioned by a specific modelview matrix, not one artificially
inherited, so LightSource's role is to place the light.

Robert.

On Mon, Mar 22, 2010 at 11:52 AM, PCJohn <[email protected]> wrote:
> Gurus,
>
> What is the reason for keeping LightSource in OSG?
>
> I successfully removed all osg::LightSources from my scene graph and used
> just osg::Light - it is well placed and follows the transformation of the
> parent node (f.ex. locomotive) as it moves. Except absolute reference frame,
> is there any reason for LightSource existence in OSG? I think yes, but
> missing arguments.
>
> Thx for explanation,
> John
>
> Thrall, Bryan wrote:
>>
>> You place the LightSource in the scene graph where you want the light to
>> be positioned. I don't think it is necessary for directional lights (they
>> are infinitely far away, so don't have a position), but say you want a
>> spotlight attached to a train locomotive. You could update osg::Light's
>> position every time the locomotive moves, or you could attach a LightSource
>> to the locomotive's scene graph and have the light placed correctly
>> automatically.
>>
>
> _______________________________________________
> 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