WebGLVertexArrayObject

The WebGLVertexArrayObject interface is part of the WebGL 2 API, represents vertex array objects (VAOs) pointing to vertex array data, and provides names for different sets of vertex data.

When working with WebGLVertexArrayObject objects, the following methods are useful:

WebGL 1: The OES_vertex_array_object extension allows you to use vertex array objects in a WebGL 1 context.

Examples

var vao = gl.createVertexArray();
gl.bindVertexArray(vao);

// ...
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// ...

Specifications

Specification Status Comment
WebGL 2.0
The definition of 'WebGLVertexArrayObject' in that specification.
Editor's Draft Initial definition.

Browser compatibility

DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidFirefox for AndroidOpera for AndroidSafari on iOSSamsung Internet
WebGLVertexArrayObjectChrome Full support 56Edge Full support 79Firefox Full support 51IE No support NoOpera Full support 43Safari No support NoWebView Android Full support 58Chrome Android Full support 58Firefox Android Full support 51Opera Android Full support 43Safari iOS No support NoSamsung Internet Android Full support 7.0

Legend

Full support
Full support
No support
No support

See also