Hi Robert,
I've encountered some small problem in the shader composition example.
You are using GL_LIGHTING which per defintion is not allowed for macros.
Some glsl compilers will ignore this, but on my Quadro card it produces
an error:
0(1) : error C0118: macros prefixed with 'GL_' are reserved
Cheers
Sebastian
Hi All,
I have now checked in core OSG support for a new form of shader
composition that leverages #pragma's to extended GLSL shaders to
specify which #define's that it requires from the scene graph. The
scene graph passes these to the shaders via StateSet::setDefine(..)
and provides full support for the OSG's state override/protected options.
I have modified the osgshadercomposition example to illustrate a very
simple example that utlizes three shaders checked into
OpenSceneGraph-Data/shaders trunk. So on the code look for
OpenSceneGraph/examples/osgshadercomposition.cpp and on the shader
from look at OpenSceneGraph-Data/shaders/osgshadercompostion.vert,
osgshadercomposition.frag and lighting.vert.
I will write more later about how to use this new capability. It's
gotta be one of the coolest features added to the OSG for quite a few
years :-)
Cheers,
Robert.
_______________________________________________
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