files/en-us/web/api/webgl2renderingcontext/getactiveuniformblockparameter/index.md
{{APIRef("WebGL")}}{{AvailableInWorkers}}
The
WebGL2RenderingContext.getActiveUniformBlockParameter()
method of the WebGL 2 API retrieves
information about an active uniform block within a {{domxref("WebGLProgram")}}.
getActiveUniformBlockParameter(program, uniformBlockIndex, pname)
program
uniformBlockIndex
pname
gl.UNIFORM_BLOCK_BINDING
gl.UNIFORM_BLOCK_DATA_SIZE
gl.UNIFORM_BLOCK_ACTIVE_UNIFORMS
gl.UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES
gl.UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER
gl.UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER
Depends on which information is requested using the pname parameter. If an
error occurs, null is returned.
const blockSize = gl.getActiveUniformBlockParameter(
program,
blockIndex,
gl.UNIFORM_BLOCK_DATA_SIZE,
);
{{Specifications}}
{{Compat}}