Web G L Vertex Array Object
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:WebGL2RenderingContext.createVertexArray()
WebGL2RenderingContext.deleteVertexArray()
WebGL2RenderingContext.isVertexArray()
WebGL2RenderingContext.bindVertexArray()
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
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari | Servo |
---|---|---|---|---|---|---|---|
Basic Support | No support1 | No support | 51.0 | No support | No support | No support | No support |
1. To use an experimental implementation of WebGL 2 in Chrome, you have to start Chrome with the runtime flag --enable-unsafe-es3-apis.
0 comments:
Post a Comment