Hi, Christian

Use of glsl in osg is pretty straitforward.
You create osg::Program (wrapper around gl program), osg::Shader(s) (wrapper 
around gl shader), set shader source with one of interface functions (or load 
from file), add them to program and set this stuff to stateset. If you use 
custom vertex attributes in your shaders - you should call 
addBindAttribLocation(..) of osg program with correct parameters. Uniforms 
passed to program through stateset with addUniform().
This is almost all you need to know about using glsl in osg. If you need to 
learn glsl itself you should look for glsl books, this stuff not related to osg 
in any way.

Cheers,
Sergey.

02.09.2011, 14:40, "Christian Buchner" <[email protected]>:
> Thanks I will look into osgreflect.
>
> regarding osgShader, I think it is a bit too crowded to be used for starters.
>
> A lot of OpenGL ES books start with minimal samples that just render a
> triangle with shaders.
> Essentially I am looking for an OSG based equivalent.
>
> Christian
> _______________________________________________
> 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