[osg-users] dinamically getting uniforms
u.hertlein at sandbox.de
Thu Oct 4 17:47:10 PDT 2007
Quoting Mihai Radu <radu at cm-labs.com>:
> If you are using shaders written by other people, parsing the source is
> the way to go.
You can ask the osg::Progam to give you a list of active uniforms.
osg::Program::getActiveUniforms(unsigned int context);
This gives you a map of names and a struct containing location, type, and size
of the Uniform. Enough to put up a nice UI ;-)
More information about the osg-users