Export (0) Print
Expand All
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

uniformMatrix2fv method

Sets values for a 2x2 floating point vector matrix into a uniform location as a matrix or a matrix array.




WebGLRenderingContext.uniformMatrix2fv(location, transpose, value);


location [in]

Type: WebGLUniformLocation

The location of uniform variable to be updated. Locate set by getUniformLocation.

transpose [in]

Type: boolean

Sets whether to transpose the matrix as the values are loaded into the uniform variable. Must be set to gl.FALSE.

value [in]

Type: Float32Array

An array of float values representing one or more 2x2 matrices.

Return value

This method does not return a value.


WebGL errorDescription
  • The location doesn't belong to the current program.
  • There is no active program.
  • The passed in uniform location isn't a matrix of the required dimensions.
  • The length of value array isn't a multople of the required matrix element count.
  • If transpose equals gl.TRUE.


If the location is null, no uniforms are updated and no error code is generated.

See also




© 2015 Microsoft