MDN self-hosted library · e01.org

WebGL2RenderingContext: uniformBlockBinding() method

WebGL

WebGL

The WebGL2RenderingContext.uniformBlockBinding() method of the WebGL 2 API assigns binding points for active uniform blocks.

Syntax

uniformBlockBinding(program, uniformBlockIndex, uniformBlockBinding)

Parameters

  • program
  • : A WebGLProgram containing the active uniform block whose binding to assign.
  • uniformBlockIndex
  • : A GLuint specifying the index of the active uniform block within the program.
  • uniformBlockBinding
  • : A GLuint specifying the binding point to which to bind the uniform block.

Return value

None (undefined).

Examples

gl.uniformBlockBinding(program, 0, 1);

Specifications

Browser compatibility

See also

  • WebGL2RenderingContext.getUniformIndices()