WebGL2RenderingContext: vertexAttribI4[u]i[v]() 方法
注意:此功能在 Web Workers 中可用。
WebGL2RenderingContext.vertexAttribI4[u]i[v]() 方法是 WebGL 2 API 的一部分,用於為通用頂點屬性指定整數值。
語法
js
vertexAttribI4i(index, v0, v1, v2, v3)
vertexAttribI4ui(index, v0, v1, v2, v3)
vertexAttribI4iv(index, value)
vertexAttribI4uiv(index, value)
引數
index-
一個
GLuint,指定要修改的頂點屬性的位置。 v0,v1,v2,v3-
一個整數
Number,表示頂點屬性的值。 value-
一個
Uint32Array/Int32Array或一系列GLuint/GLint,用於整數向量頂點屬性值。
返回值
無(undefined)。
示例
js
gl.vertexAttribI4i(a_foobar, 10);
規範
| 規範 |
|---|
| WebGL 2.0 規範 # 3.7.8 |
瀏覽器相容性
載入中…