Movatterモバイル変換


[0]ホーム

URL:


  1. 面向开发者的 Web 技术
  2. Web API
  3. OES_vertex_array_object

此页面由社区从英文翻译而来。了解更多并加入 MDN Web Docs 社区。

View in EnglishAlways switch to English

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_objectWebGL 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.

备注:Availability: 此拓展只在WebGL1中有效。在WebGL2当中,这些功能可以被直接使用,且去掉了前缀 "OES"。

常量

这个拓展提供了一个新的常量,它可以在gl.getParameter() 当中作为一个参数传递:

ext.VERTEX_ARRAY_BINDING_OES

当作为gl.getParameter()中的pname参数传递时,返回一个WebGLVertexArrayObject 对象。

函数

这个拓展提供了四个新的函数。

ext.createVertexArrayOES()

创建一个新的WebGLVertexArrayObject

ext.deleteVertexArrayOES()

删除一个给定的WebGLVertexArrayObject

ext.isVertexArrayOES()

如果参数是一个WebGLVertexArrayObject则返回true

ext.bindVertexArrayOES()

绑定一个给定的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

参见

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2025 Movatter.jp