EN
Ce contenu n’est pas disponible dans votre langue. Voici la version anglaise.

uniform1fv method

Assigns a floating point vector array to a uniform vector variable for the current program object.

IE11

 

Syntax

WebGLRenderingContext.uniform1fv(location, value);

Parameters

location [in]

Type: WebGLUniformLocation

ValueMeaning
null

Data passed will fail silently, no uniform variables will be changed.

string

Location of uniform variable to be changed.

 

value [in]

Type: Float32Array

The new floating point vector array for the uniform variable.

Return value

This method does not return a value.

Remarks

the expected behavior when the uniform being updated is an array, the length of 'values' is a multiple of the number of required vector components, and the length of 'values' is either greater than or less than the number of elements in the uniform array (the elements in the uniform array which contain corresponding elements in the 'value' array are updated and no error is generated)

WebGL errorDescription
gl.INVALID_OPERATION
  • The location doesn't belong to the current program.
  • There is no active program.
  • Length of the value array is greater than 1 and the uniform pointed to by location isn't a uniform array.
  • value references a typed array instance other than Float32Array.
  • Uniform specified by location isn't a float type.
gl.INVALID_VALUEThe length of value array isn't a multiple of the number of required components.

 

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

See also

WebGLRenderingContext

 

 

Afficher:
© 2014 Microsoft