Sign in to follow this  
Muncher

Whats the difference between these functions?

Recommended Posts

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

Share this post


Link to post
Share on other sites
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?

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this