web api instance method
WebGL2RenderingContext: getUniformIndices() method
Available in workers
The WebGL2RenderingContext.getUniformIndices() method of
the WebGL 2 API retrieves the indices of a
number of uniforms within a WebGLProgram.
Syntax
getUniformIndices(program, uniformNames)
Parameters
program- : A
WebGLProgramcontaining uniforms whose indices to query.
- : A
uniformNames- : An
Arrayof string specifying the names of the uniforms to query.
- : An
Return value
An Array of GLuint containing the uniform indices.
Examples
const uniformIndices = gl.getUniformIndices(program, [
"UBORed",
"UBOGreen",
"UBOBlue",
]);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.