i´m having some problems with a simple calculation in the vertex shader suppose this:
uniform vec4 a;
uniform vec4 b;
uniform vec4 c;
varying vec4 result;
void main(){
// …the usual stuff here…then
res = a + b + c ;
}
and for some reason that i don´t know why i can´t get the uniform location for any of those uniforms…how can i work around this !!! when ever i try to get the locations i always get “-1”…so no locations is compiled…
yeah i now , i am checking for erros,the thing was that in the middle of the code i wasn´t using one of the uniforms and it was the cause for the location problem…
Incidentally you can group uniforms in a buffer backed block, and in so doing any single uniform referenced will drag in the whole enchilada. ARB_uniform_buffer_object is a core feature of OpenGL 3.1.
i haven´t read the Opengl 3.0 , 3.1 & 3.2 spec , i´m still using the old 2.0, and as soon as i finish this opengl project i´m in, i will go to 3.1 asap , then i will have to evaluate every object made for openGL 2.0 and make it 3.1 usable, like Fbo and so on…
That feature seems pretty cool, can´t wait to learn about the new spec, and so to use them