Note: This feature is available in Web Workers.
The WebGL2RenderingContext.bindVertexArray() method of the WebGL 2 API binds a passed WebGLVertexArrayObject object to the buffer.
bindVertexArray(vertexArray)vertexArrayA WebGLVertexArrayObject (VAO) object to bind.
None (undefined).
const vao = gl.createVertexArray();
gl.bindVertexArray(vao);
// …
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// …