Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

glgetuniformfv(3g) [osx man page]

GLGETUNIFORM(3G)						    OpenGL 3.3							  GLGETUNIFORM(3G)

NAME
glGetUniformfv, glGetUniformiv - Returns the value of a uniform variable C SPECIFICATION
void glGetUniformfv(GLuint program, GLint location, GLfloat *params); void glGetUniformiv(GLuint program, GLint location, GLint *params); PARAMETERS
program Specifies the program object to be queried. location Specifies the location of the uniform variable to be queried. params Returns the value of the specified uniform variable. DESCRIPTION
glGetUniform returns in params the value(s) of the specified uniform variable. The type of the uniform variable specified by location determines the number of values returned. If the uniform variable is defined in the shader as a boolean, int, or float, a single value will be returned. If it is defined as a vec2, ivec2, or bvec2, two values will be returned. If it is defined as a vec3, ivec3, or bvec3, three values will be returned, and so on. To query values stored in uniform variables declared as arrays, call glGetUniform for each element of the array. To query values stored in uniform variables declared as structures, call glGetUniform for each field in the structure. The values for uniform variables declared as a matrix will be returned in column major order. The locations assigned to uniform variables are not known until the program object is linked. After linking has occurred, the command glGetUniformLocation() can be used to obtain the location of a uniform variable. This location value can then be passed to glGetUniform in order to query the current value of the uniform variable. After a program object has been linked successfully, the index values for uniform variables remain fixed until the next link command occurs. The uniform variable values can only be queried after a link if the link was successful. NOTES
If an error is generated, no change is made to the contents of params. 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_OPERATION is generated if program has not been successfully linked. GL_INVALID_OPERATION is generated if location does not correspond to a valid uniform variable location for the specified program object. ASSOCIATED GETS
glGetActiveUniform() with arguments program and the index of an active uniform variable glGetProgram() with arguments program and GL_ACTIVE_UNIFORMS or GL_ACTIVE_UNIFORM_MAX_LENGTH glGetUniformLocation() with arguments program and the name of a uniform variable glIsProgram() SEE ALSO
glCreateProgram(), glLinkProgram(), glUniform() COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. 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/. OpenGL 3.3 03/08/2011 GLGETUNIFORM(3G)

Check Out this Related Man Page

GLGETUNIFORMLOCATION(3G)					    OpenGL 3.3						  GLGETUNIFORMLOCATION(3G)

NAME
glGetUniformLocation - Returns the location of a uniform variable C SPECIFICATION
GLint glGetUniformLocation(GLuint program, const GLchar *name); PARAMETERS
program Specifies the program object to be queried. name Points to a null terminated string containing the name of the uniform variable whose location is to be queried. DESCRIPTION
glGetUniformLocation returns an integer that represents the location of a specific uniform variable within a program object. name must be a null terminated string that contains no white space. name must be an active uniform variable name in program that is not a structure, an array of structures, or a subcomponent of a vector or a matrix. This function returns -1 if name does not correspond to an active uniform variable in program or if name starts with the reserved prefix "gl_". Uniform variables that are structures or arrays of structures may be queried by calling glGetUniformLocation for each field within the structure. The array element operator "[]" and the structure field operator "." may be used in name in order to select elements within an array or fields within a structure. The result of using these operators is not allowed to be another structure, an array of structures, or a subcomponent of a vector or a matrix. Except if the last part of name indicates a uniform variable array, the location of the first element of an array can be retrieved by using the name of the array, or by using the name appended by "[0]". The actual locations assigned to uniform variables are not known until the program object is linked successfully. After linking has occurred, the command glGetUniformLocation can be used to obtain the location of a uniform variable. This location value can then be passed to glUniform() to set the value of the uniform variable or to glGetUniform() in order to query the current value of the uniform variable. After a program object has been linked successfully, the index values for uniform variables remain fixed until the next link command occurs. Uniform variable locations and values can only be queried after a link if the link was successful. 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_OPERATION is generated if program has not been successfully linked. ASSOCIATED GETS
glGetActiveUniform() with arguments program and the index of an active uniform variable glGetProgram() with arguments program and GL_ACTIVE_UNIFORMS or GL_ACTIVE_UNIFORM_MAX_LENGTH glGetUniform() with arguments program and the name of a uniform variable glIsProgram() SEE ALSO
glLinkProgram(), glUniform() COPYRIGHT
Copyright (C) 2003-2005 3Dlabs Inc. Ltd. 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/. OpenGL 3.3 03/08/2011 GLGETUNIFORMLOCATION(3G)
Man Page