Hi

osg automatically convert gl_Vertex, gl_MultiTexCoordX, gl_Normal, 
gl_ModelViewProjectionMatrix, gl_ProjectionMatrix (+ inverse), 
gl_ModelViewMatrix (gl_NormalMatrix?, gl_FragColor?, iirc this is complete 
list) to osg builtins, ftransform() - to osg_ModelViewProjectionMatrix * 
osg_Vertex. It can be helpful for using same shaders in gl and gles, but you'd 
better check what's going under the hood.
Note that there are lack of inverse matrices, no lights, no materials, no 
gl_TexCoord[X], no fog, no texture matrices etc etc etc, so i'ts better to 
check spec about any other gl_* stuff you wanna use in shaders.

Cheers.

07.08.2012, 21:20, "John Moore" <[email protected]>:
> This is not completely true because I wrote some simple shaders for texture 
> mapping (without bump mapping) and they are working. I don't know precisely 
> how it works but it > seems openscenegraph is able to map these variables 
> such as gl_ModelViewProjectionMatrix, gl_Vertex, gl_Normal, gl_MultiTexCoord0 
> to openscenegraph built in variables like osg_ModelViewProjectionMatrix, 
> osg_Vertex, osg_Normal, osg_MultiTexCoord0.
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to