A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/en-US/docs/Web/API/WebGL2RenderingContext/getUniformBlockIndex below:

WebGL2RenderingContext: getUniformBlockIndex() method - Web APIs

WebGL2RenderingContext: getUniformBlockIndex() method

Baseline Widely available

Note: This feature is available in Web Workers.

The WebGL2RenderingContext.getUniformBlockIndex() method of the WebGL 2 API retrieves the index of a uniform block within a WebGLProgram.

Syntax
getUniformBlockIndex(program, uniformBlockName)
Parameters
program

A WebGLProgram containing the uniform block.

uniformName

A string specifying the name of the uniform block to whose index to retrieve.

Return value

A GLuint indicating the uniform block index.

Examples
// Assuming a shader with the following declaration:
// uniform UBOData {
//   mat4 foo;
// } instanceName;

// use the block name, not the instance name:
const blockIndex = gl.getUniformBlockIndex(program, "UBOData");
Specifications Browser compatibility See also

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.3