WebGL2RenderingContext:bindVertexArray() 方法
注意:此功能在 Web Workers 中可用。
WebGL2RenderingContext.bindVertexArray() 方法是 WebGL 2 API 的一部分,用于将传入的 WebGLVertexArrayObject 对象绑定到缓冲区。
语法
js
bindVertexArray(vertexArray)
参数
vertexArray-
要绑定的
WebGLVertexArrayObject(VAO) 对象。
返回值
无(undefined)。
示例
js
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);
// …
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// …
规范
| 规范 |
|---|
| WebGL 2.0 规范 # 3.7.17 |
浏览器兼容性
加载中…