glUniformMatrix4fv Function

Syntax

GL_APICALL void GL_APIENTRY glUniformMatrix4fv(
     GLint location,
     GLsizei count,
     GLboolean transpose,
     const GLfloat * value
);

Arguments

Name Description
in location Location of uniform variable
in count The number of elements in the GL_FLOAT_VEC4-type uniform variable array being configured.
in transpose Whether to load the transpose
in value Array storing the values to set

Return Values

No values are returned.

Description

Sets the value of GL_FLOAT_VEC4-type uniform variable arrays in the vertex shader or geometry shader.

This function changes the values of a (count × 4) number of arrays. Set transpose to GL_TRUE when taking the transpose. For value, specify an array of values to set in the uniform. Specify value using an array of (count × 16) GLfloat values.

Calls to this function are ignored when location is -1.

This function generates the following errors.

GL_INVALID_VALUEThe count argument is negative.
GL_INVALID_OPERATIONThe location argument is not a location in the current program.
GL_INVALID_OPERATIONThere is no current program object.
GL_INVALID_OPERATIONThis function was called on a location with a different data type or component count.
GL_INVALID_OPERATIONThe uniform array count is less than four times the sum of count and the offset added to the location obtained from glGetUniformLocation.

Revision History

2010/01/07
Initial version.

CONFIDENTIAL