diff options
author | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
---|---|---|
committer | Peter Bengtsson <mail@peterbe.com> | 2020-12-08 14:40:17 -0500 |
commit | 33058f2b292b3a581333bdfb21b8f671898c5060 (patch) | |
tree | 51c3e392513ec574331b2d3f85c394445ea803c6 /files/zh-cn/web/api/webglvertexarrayobject/index.html | |
parent | 8b66d724f7caf0157093fb09cfec8fbd0c6ad50a (diff) | |
download | translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.gz translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.tar.bz2 translated-content-33058f2b292b3a581333bdfb21b8f671898c5060.zip |
initial commit
Diffstat (limited to 'files/zh-cn/web/api/webglvertexarrayobject/index.html')
-rw-r--r-- | files/zh-cn/web/api/webglvertexarrayobject/index.html | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/webglvertexarrayobject/index.html b/files/zh-cn/web/api/webglvertexarrayobject/index.html new file mode 100644 index 0000000000..21a2ce0d0a --- /dev/null +++ b/files/zh-cn/web/api/webglvertexarrayobject/index.html @@ -0,0 +1,65 @@ +--- +title: WebGLVertexArrayObject +slug: Web/API/WebGLVertexArrayObject +tags: + - API + - Reference + - WebGL + - WebGL2 +translation_of: Web/API/WebGLVertexArrayObject +--- +<div>{{APIRef("WebGL")}}</div> + +<p><strong><code>WebGLVertexArrayObject</code></strong>接口是<a href="/en-US/docs/Web/API/WebGL_API">WebGL 2 API</a>的一部分,顶点数组对象(VAOs)指向顶点数组数据,并提供不同顶点数据集合的名称。</p> + +<p>当使用<code>WebGLVertexArrayObject</code>对象时,这些方法会很有用:</p> + +<ul> + <li>{{domxref("WebGL2RenderingContext.createVertexArray()")}}</li> + <li>{{domxref("WebGL2RenderingContext.deleteVertexArray()")}}</li> + <li>{{domxref("WebGL2RenderingContext.isVertexArray()")}}</li> + <li>{{domxref("WebGL2RenderingContext.bindVertexArray()")}}</li> +</ul> + +<div class="note"> +<p><strong>WebGL 1:</strong> {{domxref("OES_vertex_array_object")}} 扩展允许你在WebGL 1 上下文环境中使用顶点数组对象。</p> +</div> + +<h2 id="示例">示例</h2> + +<pre class="brush: js">var vao = gl.createVertexArray(); +gl.bindVertexArray(vao); + +// ... +// calls to bindBuffer or vertexAttribPointer +// which will be "recorded" in the VAO +// ...</pre> + +<h2 id="规范">规范</h2> + +<table class="standard-table"> + <tbody> + <tr> + <th scope="col">Specification</th> + <th scope="col">Status</th> + <th scope="col">Comment</th> + </tr> + <tr> + <td>{{SpecName('WebGL2', "#3.6", "WebGLVertexArrayObject")}}</td> + <td>{{Spec2('WebGL2')}}</td> + <td>Initial definition.</td> + </tr> + </tbody> +</table> + +<h2 id="浏览器兼容性">浏览器兼容性</h2> + +<p class="hidden">The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> and send us a pull request.</p> + +<p>{{Compat("api.WebGLVertexArrayObject")}}</p> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>{{domxref("OES_vertex_array_object")}}</li> +</ul> |