Whats the difference between these functions?
Hello,
stupid question time :) I can't find any docs on what the difference is beween each of these functions...
glUniform1ivARB
glUniform2ivARB
glUniform3ivARB
glUniform3ivARB
also, what does the "iv" part of the function mean?
Cheers
Paul
http://developer.3dlabs.com/openGL2/slapi/UniformARB.htm iv means array of integers.
int nValues = {1,1,1,1}
glUniform4iv(x,nValues);
int nValues = {1,1,1,1}
glUniform4iv(x,nValues);
Yep, i've had a look at that :) thanks.
But for the life of me, i can't figure out what they do differently..... they are even used in the same manor.
More specifically, i want to know what the "1iv" means in the function name; ie the "3f" part of glVertex3f means there are three parameters of type float.... so how does "1iv" read?
But for the life of me, i can't figure out what they do differently..... they are even used in the same manor.
More specifically, i want to know what the "1iv" means in the function name; ie the "3f" part of glVertex3f means there are three parameters of type float.... so how does "1iv" read?
oops, sorry, read my previous post, I edited it in. glVertex3fv exists too, which would take the values from an array. You should bookmark that site, it's a good opengl reference, and easy to browse quickly.
http://developer.3dlabs.com/glmanpage_index.htm
http://developer.3dlabs.com/glmanpage_index.htm
what does the "4" mean in glUniform4iv(x,nValues);
obviously its not 4 parameters :)
thanks for the help so far!
obviously its not 4 parameters :)
thanks for the help so far!
Quote:Original post by Muncher
what does the "4" mean in glUniform4iv(x,nValues);
obviously its not 4 parameters :)
thanks for the help so far!
Yes, it's four parameters, but they come from the array. It's the same as calling glUniform4i(), except you have the values in an existing array.
Quote:The number specified in the name of the command indicates the number of components for each element in value , and it should match the number of components in the data type of the specified uniform variable (e.g., 1 for float, int, bool; 2 for vec2, ivec2, bvec2, etc.).
see link above!
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement