Hi Erico, You have given the answer, from my experience the best way is to have some common names 'baseTexture' etc ...
If you are using shaders written by other people, parsing the source is the way to go. If you're writing them, you could have a common block with the uniform declarations included for every shader. Cheers Mihai Radu Enrico Villani wrote: > > Hi to all! > in the app i'm developing there's a section where, in a little > words, i should load any kind of shader GLSL .vert and .frag (such > these in orange book) and apply them to any of the nodes of my loaded > model... > the problem is that i can't know what kinds of uniform need to be > defined to the shader... is there a way (a part from parsing manually > the vert and frag files) to get the name and the type of the uniform > that the shader need? > > Many many thanks in advance.. > Enrico > ------------------------------------------------------------------------ > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org