WebGL
The WebGL2RenderingContext.bindVertexArray() method of
the WebGL 2 API binds a
passed WebGLVertexArrayObject object to the buffer.
Syntax
bindVertexArray(vertexArray)
Parameters
vertexArray- : A WebGLVertexArrayObject (VAO) object to bind.
Return value
None (undefined).
Examples
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);
// …
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// …
Specifications
Browser compatibility
See also
- WebGLVertexArrayObject
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
