What does the iv
at the end of glGetShaderiv()
stand for?
It describes the parameters returned, in this case a vector of ints. The same nomenclature is used for glTexParameteriv
and glTexParameterfv
for example, which updates a vector of ints or floats respectively.
OpenGL
has some organized naming conventions regarding the routines they have in the libraries.
Prefixes
All routines have a gl
before them. Similar thing you must have observed with glu
and glut
. Some vender libraries also have prefixes like NVidia
guys have put up a NV_
prefix in the hardware feature flags.
Suffixes
Suffixes usually are an indicator to what kind of arguments does the method take.
Some specifying the context of the function. e.g. 1D
, 2D
or 3D
e.g. glTexCoord2D
Kind of value types is a function's argument taking. e.g. glTranslatef
takes GLfloat
arguments (observe that even the data types follow the same naming convention) and glTranslated
take GLdouble
.
The source of the vertices (usually when there are too many vertices and you store them in a single array) taking the method you have mentioned:
glGetShaderiv
is a function, takes the parameters for shaders
, where datatype is GLint
and the source of data is a vector
(v
).
You can take such kind of conventions to easily identify that what method takes what kind of arguments.
It indicates you want to get a value that is an array of integers. The function reference can be found here, and as you can see, the return param is a GLint *
. This is in contrast to functions such as glGetInternalFormati64v
, which has a return param of GLint64 *
. I believe, but can't locate at the moment, that there have been functions using the fv
suffix to denote floats, and possibly others.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With