Hi Paul,
Hi all -- I've finally had a chance to review the ShaderGen code. If I
understand correctly, this was added as a step towards eventual support
for OpenGL 3. However, I'm surprised by the OpenGL 2 / GLSL 1.20 nature
of the shader code, specifically the extensive dependency on built-in
uniforms and predefined vertex attributes that were deprecated with
OpenGL 3 / GLSL 1.30 -- even use of ftransform().
Was the author assuming the code would be ported to OpenGL 3 / GLSL 1.30
in the future? Or was the author assuming that the host would set up
uniforms and vertex attributes with names identical to the old GLSL 1.20
uniform and vertex attribute names (that would be a mistake in my
opinion, as uniforms and vertex attributes starting with "gl_" are
reserved)? Or have a simply misunderstood the point of this code?
Well, I wonder, if the author had used OpenGL 3 functionality, how would
he have tested the code? OSG currently has no way to create an OpenGL
3.x context...
It's pretty simple to change uniform names and switch from using
ftransform() to using vertex * modelViewProjection... ShaderGen was more
a proof of concept of generating shaders from the accumulated state. I
think this, along with the VirtualProgram example that Wojtek did, are
good steps toward a possible solution for OpenGL 3 support.
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org