WebGL2RenderingContext: bindVertexArray() method
WebGL
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, or
nullto bind the default vertex array object.
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