EN
Данное содержимое не доступно на вашем языке, используйте версию на английском языке.

uniformMatrix4fv method

Sets values for a 4x4 floating point vector matrix into a uniform location as a matrix or a matrix array.

IE11

 

Syntax

WebGLRenderingContext.uniformMatrix4fv(location, transpose, value);

Parameters

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 4x4 matrices.

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_OPERATION
  • 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.
gl.INVALID_VALUE
  • 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

WebGLRenderingContext

 

 

Показ:
© 2014 Microsoft