Hi Sajjad, In OpenGL 2.0 or OpenGL 3.x in compatibility mode the light position will be available via the gl_Light uniform.
Robert. On Sat, Nov 20, 2010 at 2:03 AM, Sajjad <[email protected]> wrote: > Hello forum, > I have a scene where i am animating the light position using the animation > path(picked up from an example). > Now i want to implement the per-pixel lighting to a certain node in the > scene. I need to end the light position > as uniform variable to the vertex shader program. > I think i need to retrieve the current model-view matrix and multiply it > with the initial light position so that i get the current light position(as > changed by the animation path) and send it to the shader > Please let me know if i am thinking in the right track. > How to get the OpenGL model-view matrix from the OpenSceneGraph? > > Thanks > Sajjad > _______________________________________________ > 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

