WebGL2RenderingContext: phương thức getUniformIndices()
Baseline
Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.
Note: This feature is available in Web Workers.
Phương thức WebGL2RenderingContext.getUniformIndices() của WebGL 2 API truy xuất các chỉ mục của một số uniform trong một WebGLProgram.
Cú pháp
js
getUniformIndices(program, uniformNames)
Tham số
program-
Một
WebGLProgramchứa các uniform mà chỉ mục sẽ được truy vấn. uniformNames-
Một
Arraychuỗi chỉ định tên của các uniform sẽ truy vấn.
Giá trị trả về
Ví dụ
js
const uniformIndices = gl.getUniformIndices(program, [
"UBORed",
"UBOGreen",
"UBOBlue",
]);
Đặc tả kỹ thuật
| Specification |
|---|
| WebGL 2.0 Specification> # 3.7.16> |