WebGLVertexArrayObject

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since September 2021.

**WebGLVertexArrayObject**接口是WebGL 2 API的一部分,顶点数组对象 (VAOs) 指向顶点数组数据,并提供不同顶点数据集合的名称。

当使用WebGLVertexArrayObject对象时,这些方法会很有用:

备注: WebGL 1: OES_vertex_array_object 扩展允许你在 WebGL 1 上下文环境中使用顶点数组对象。

示例

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

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

规范

Specification
WebGL 2.0 Specification
# 3.6

浏览器兼容性

BCD tables only load in the browser

相关链接