OES_vertex_array_object
拓展OES_vertex_array_object是WebGL API的一部分,它提供了顶点数组对象 (VAOs) 可以用来封装顶点数组的状态。These objects keep pointers to vertex data and provide names for different sets of vertex data.
WebGL extensions are available using the WebGLRenderingContext.getExtension()
method. 更多详细信息,参见 Using Extensions in the WebGL tutorial.
常量
这个拓展提供了一个新的常量,它可以在gl.getParameter()
当中作为一个参数传递:
ext.VERTEX_ARRAY_BINDING_OES
-
当作为
gl.getParameter()
中的pname
参数传递时,返回一个WebGLVertexArrayObject
对象。
函数
这个拓展提供了四个新的函数。
Examples
var oes_vao_ext = gl.getExtension('OES_vertex_array_object');
var vao = oes_vao_ext.createVertexArrayOES();
oes_vao_ext.bindVertexArrayOES(vao);
// ...
// calls to bindBuffer or vertexAttribPointer
// which will be "recorded" in the VAO
// ...
Specifications
Specification |
---|
WebGL OES_vertex_array_object Khronos Ratified Extension Specification |
Browser compatibility
BCD tables only load in the browser