WebGL2RenderingContext:getUniformIndices() 方法
注意:此功能在 Web Workers 中可用。
WebGL2RenderingContext.getUniformIndices() 方法是 WebGL 2 API 的一部分,用於檢索 WebGLProgram 中一組 uniform 的索引。
語法
js
getUniformIndices(program, uniformNames)
引數
program-
包含要查詢其索引的 uniform 的
WebGLProgram。 uniformNames-
一個字串
Array,指定要查詢的 uniform 的名稱。
返回值
示例
js
const uniformIndices = gl.getUniformIndices(program, [
"UBORed",
"UBOGreen",
"UBOBlue",
]);
規範
| 規範 |
|---|
| WebGL 2.0 規範 # 3.7.16 |
瀏覽器相容性
載入中…