Expand Minimize

uniform1f method

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

IE11

 

Syntax

WebGLRenderingContext.uniform1f(location, x);

Parameters

location [in]

Type: WebGLUniformLocation

ValueMeaning
null

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

location

Specifies the location of the uniform to modify. WebGLUniformLocation instance returned by getUniformLocation.

 

x [in]

Type: Number

The new floating point value for the uniform variable.

Return value

This method does not return a value.

Remarks

WebGL errorDescription
gl.INVALID_OPERATION
  • There's no active program object.
  • The size and type of the uniform variable doesn't match the size and type of the value loaded.

 

See also

WebGLRenderingContext
WebGLUniformLocation

 

 

Show:
© 2014 Microsoft