table of contents
other versions
GLGETACTIVEUNIFORMSI(3G) | [FIXME: manual] | GLGETACTIVEUNIFORMSI(3G) |
NAME¶
glGetActiveUniformsiv - Returns information about several active uniform variables for the specified program objectC SPECIFICATION¶
void
glGetActiveUniformsiv(GLuint program,
GLsizei uniformCount,
const GLuint *uniformIndices,
GLenum pname,
GLint *params);
PARAMETERS¶
programSpecifies the program object to be queried.
uniformCount
Specifies both the number of elements in the array of
indices uniformIndices and the number of parameters written to
params upon successful return.
uniformIndices
Specifies the address of an array of uniformCount
integers containing the indices of uniforms within program whose
parameter pname should be queried.
pname
Specifies the property of each uniform in
uniformIndices that should be written into the corresponding element of
params.
params
Specifies the address of an array of uniformCount
integers which are to receive the value of pname for each uniform in
uniformIndices.
DESCRIPTION¶
glGetActiveUniformsiv queries the value of the parameter named pname for each of the uniforms within program whose indices are specified in the array of uniformCount unsigned integers uniformIndices. Upon success, the value of the parameter for each uniform is written into the corresponding entry in the array whose address is given in params. If an error is generated, nothing is written into params. If pname is GL_UNIFORM_TYPE, then an array identifying the types of uniforms specified by the corresponding array of uniformIndices is returned. The returned types can be any of the values from the following table:Returned Symbolic Contant | Shader Uniform Type |
GL_FLOAT | float |
GL_FLOAT_VEC2 | vec2 |
GL_FLOAT_VEC3 | vec3 |
GL_FLOAT_VEC4 | vec4 |
GL_DOUBLE | double |
GL_DOUBLE_VEC2 | dvec2 |
GL_DOUBLE_VEC3 | dvec3 |
GL_DOUBLE_VEC4 | dvec4 |
GL_INT | int |
GL_INT_VEC2 | ivec2 |
GL_INT_VEC3 | ivec3 |
GL_INT_VEC4 | ivec4 |
GL_UNSIGNED_INT | unsigned int |
GL_UNSIGNED_INT_VEC2 | uvec2 |
GL_UNSIGNED_INT_VEC3 | uvec3 |
GL_UNSIGNED_INT_VEC4 | uvec4 |
GL_BOOL | bool |
GL_BOOL_VEC2 | bvec2 |
GL_BOOL_VEC3 | bvec3 |
GL_BOOL_VEC4 | bvec4 |
GL_FLOAT_MAT2 | mat2 |
GL_FLOAT_MAT3 | mat3 |
GL_FLOAT_MAT4 | mat4 |
GL_FLOAT_MAT2x3 | mat2x3 |
GL_FLOAT_MAT2x4 | mat2x4 |
GL_FLOAT_MAT3x2 | mat3x2 |
GL_FLOAT_MAT3x4 | mat3x4 |
GL_FLOAT_MAT4x2 | mat4x2 |
GL_FLOAT_MAT4x3 | mat4x3 |
GL_DOUBLE_MAT2 | dmat2 |
GL_DOUBLE_MAT3 | dmat3 |
GL_DOUBLE_MAT4 | dmat4 |
GL_DOUBLE_MAT2x3 | dmat2x3 |
GL_DOUBLE_MAT2x4 | dmat2x4 |
GL_DOUBLE_MAT3x2 | dmat3x2 |
GL_DOUBLE_MAT3x4 | dmat3x4 |
GL_DOUBLE_MAT4x2 | dmat4x2 |
GL_DOUBLE_MAT4x3 | dmat4x3 |
GL_SAMPLER_1D | sampler1D |
GL_SAMPLER_2D | sampler2D |
GL_SAMPLER_3D | sampler3D |
GL_SAMPLER_CUBE | samplerCube |
GL_SAMPLER_1D_SHADOW | sampler1DShadow |
GL_SAMPLER_2D_SHADOW | sampler2DShadow |
GL_SAMPLER_1D_ARRAY | sampler1DArray |
GL_SAMPLER_2D_ARRAY | sampler2DArray |
GL_SAMPLER_1D_ARRAY_SHADOW | sampler1DArrayShadow |
GL_SAMPLER_2D_ARRAY_SHADOW | sampler2DArrayShadow |
GL_SAMPLER_2D_MULTISAMPLE | sampler2DMS |
GL_SAMPLER_2D_MULTISAMPLE_ARRAY | sampler2DMSArray |
GL_SAMPLER_CUBE_SHADOW | samplerCubeShadow |
GL_SAMPLER_BUFFER | samplerBuffer |
GL_SAMPLER_2D_RECT | sampler2DRect |
GL_SAMPLER_2D_RECT_SHADOW | sampler2DRectShadow |
GL_INT_SAMPLER_1D | isampler1D |
GL_INT_SAMPLER_2D | isampler2D |
GL_INT_SAMPLER_3D | isampler3D |
GL_INT_SAMPLER_CUBE | isamplerCube |
GL_INT_SAMPLER_1D_ARRAY | isampler1DArray |
GL_INT_SAMPLER_2D_ARRAY | isampler2DArray |
GL_INT_SAMPLER_2D_MULTISAMPLE | isampler2DMS |
GL_INT_SAMPLER_2D_MULTISAMPLE_ARRAY | isampler2DMSArray |
GL_INT_SAMPLER_BUFFER | isamplerBuffer |
GL_INT_SAMPLER_2D_RECT | isampler2DRect |
GL_UNSIGNED_INT_SAMPLER_1D | usampler1D |
GL_UNSIGNED_INT_SAMPLER_2D | usampler2D |
GL_UNSIGNED_INT_SAMPLER_3D | usampler3D |
GL_UNSIGNED_INT_SAMPLER_CUBE | usamplerCube |
GL_UNSIGNED_INT_SAMPLER_1D_ARRAY | usampler2DArray |
GL_UNSIGNED_INT_SAMPLER_2D_ARRAY | usampler2DArray |
GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE | usampler2DMS |
GL_UNSIGNED_INT_SAMPLER_2D_MULTISAMPLE_ARRAY | usampler2DMSArray |
GL_UNSIGNED_INT_SAMPLER_BUFFER | usamplerBuffer |
GL_UNSIGNED_INT_SAMPLER_2D_RECT | usampler2DRect |
NOTES¶
The double types, GL_DOUBLE, GL_DOUBLE_VEC2, GL_DOUBLE_VEC3, GL_DOUBLE_VEC4, GL_DOUBLE_MAT2, GL_DOUBLE_MAT3, GL_DOUBLE_MAT4, GL_DOUBLE_MAT2x3, GL_DOUBLE_MAT2x4, GL_DOUBLE_MAT3x2, GL_DOUBLE_MAT3x4, GL_DOUBLE_MAT4x2, and GL_DOUBLE_MAT4x3 are only available if the GL version is 4.1 or higher. GL_UNIFORM_ATOMIC_COUNTER_BUFFER_INDEX is only accepted by pname if the GL version is 4.2 or higher.ERRORS¶
GL_INVALID_VALUE is generated if program is not a value generated by OpenGL. GL_INVALID_OPERATION is generated if program is not a program object. GL_INVALID_VALUE is generated if uniformCount is greater than or equal to the value of GL_ACTIVE_UNIFORMS for program. GL_INVALID_ENUM is generated if pname is not an accepted token.ASSOCIATED GETS¶
glGet() with argument GL_MAX_VERTEX_UNIFORM_COMPONENTS, GL_MAX_TESS_CONTROL_UNIFORM_COMPONENTS, GL_MAX_TESS_EVALUATION_UNIFORM_COMPONENTS, GL_MAX_GEOMETRY_UNIFORM_COMPONENTS, GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, or GL_MAX_COMBINED_UNIFORM_COMPONENTS. glGetProgram() with argument GL_ACTIVE_UNIFORMS or GL_ACTIVE_UNIFORM_MAX_LENGTH. glIsProgram()VERSION SUPPORT¶
OpenGL Version | ||||||||||||
Function / Feature Name | 2.0 | 2.1 | 3.0 | 3.1 | 3.2 | 3.3 | 4.0 | 4.1 | 4.2 | 4.3 | 4.4 | 4.5 |
glGetActiveUniformsiv | - | - | - | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ | ✔ |
SEE ALSO¶
glGetUniform(), glGetActiveUniform(), glGetUniformLocation(), glLinkProgram(), glUniform(), glUseProgram()COPYRIGHT¶
Copyright © 2011-2014 Khronos Group This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.COPYRIGHT¶
Copyright © 2011-2014 Khronos Group08/26/2014 | [FIXME: source] |