WebGLVertexArrayObject

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: OES_vertex_array_object extension allows you to use vertex array objects in a WebGL 1 context.

范例

var vao = gl.createVertexArray();
gl.bindVertexArray(vao);
// ...
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// ...
					

规范

规范 状态 Comment
WebGL 2.0
The definition of 'WebGLVertexArrayObject' in that specification.
编者草案 初始定义。

浏览器兼容性

更新 GitHub 上的兼容性数据
Desktop Mobile
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
WebGLVertexArrayObject Chrome 56 Edge 79 Firefox 51 IE No Opera 43 Safari No WebView Android 58 Chrome Android 58 Firefox Android 51 Opera Android 43 Safari iOS No Samsung Internet Android 7.0

图例

完整支持
完整支持
不支持
不支持

另请参阅