此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。
OES_vertex_array_object
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since 2018年4月.
拓展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 theWebGLRenderingContext.getExtension()
method. 更多详细信息,参见Using Extensions in theWebGL tutorial.
In this article
常量
这个拓展提供了一个新的常量,它可以在gl.getParameter()
当中作为一个参数传递:
ext.VERTEX_ARRAY_BINDING_OES
当作为
gl.getParameter()
中的pname
参数传递时,返回一个WebGLVertexArrayObject
对象。
函数
这个拓展提供了四个新的函数。
Examples
js
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
Loading…