Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Collapse the table of content
Expand the table of content

uniform1fv method

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




WebGLRenderingContext.uniform1fv(location, value);


location [in]

Type: WebGLUniformLocation


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


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.


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
  • 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




© 2015 Microsoft