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/webgl2renderingcontext/bindbufferbase | |
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/webgl2renderingcontext/bindbufferbase')
-rw-r--r-- | files/zh-cn/web/api/webgl2renderingcontext/bindbufferbase/index.html | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/files/zh-cn/web/api/webgl2renderingcontext/bindbufferbase/index.html b/files/zh-cn/web/api/webgl2renderingcontext/bindbufferbase/index.html new file mode 100644 index 0000000000..353373c972 --- /dev/null +++ b/files/zh-cn/web/api/webgl2renderingcontext/bindbufferbase/index.html @@ -0,0 +1,78 @@ +--- +title: WebGL2RenderingContext.bindBufferBase() +slug: Web/API/WebGL2RenderingContext/bindBufferBase +tags: + - API + - WebGL + - WebGL2 + - 参考 + - 实验性 + - 方法 +translation_of: Web/API/WebGL2RenderingContext/bindBufferBase +--- +<div>{{APIRef("WebGL")}} {{SeeCompatTable}}</div> + +<p><a href="/en-US/docs/Web/API/WebGL_API">WebGL 2 API</a> 的 <strong><code>WebGL2RenderingContext.bindBufferBase()</code></strong> 方法将一个 {{domxref("WebGLBuffer")}} 绑定到某个点 (<code>target</code>) 的特定的 <code>index</code>上。</p> + +<h2 id="语法">语法</h2> + +<pre class="syntaxbox">void <var>gl</var>.bindBufferBase(<var>target</var>, <var>index</var>, <var>buffer</var>);</pre> + +<h3 id="参数">参数</h3> + +<dl> + <dt><code>target</code></dt> + <dd>{{domxref("Glenum")}} 指定绑定操作的目标。可能的值: + <ul> + <li><code>gl.TRANSFORM_FEEDBACK_BUFFER</code></li> + <li><code>gl.UNIFORM_BUFFER</code></li> + </ul> + </dd> + <dt><code>index</code></dt> + <dd>{{domxref("GLuint")}} 指定目标(<code>target</code>)的 index 。</dd> + <dt><code>buffer</code></dt> + <dd>绑定到目标点(<code>target</code>)的 {{domxref("WebGLBuffer")}} 。</dd> +</dl> + +<h3 id="返回值">返回值</h3> + +<p>无。</p> + +<h2 id="示例">示例</h2> + +<pre class="brush: js">gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, 0, buffer); +</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.7.16", "bindBufferBase")}}</td> + <td>{{Spec2('WebGL2')}}</td> + <td>WebGL中初次定义。</td> + </tr> + <tr> + <td>{{SpecName('OpenGL ES 3.0', "glBindBufferBase.xhtml", "glBindBufferBase")}}</td> + <td>{{Spec2('OpenGL ES 3.0')}}</td> + <td>OpenGL API 页面。</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.WebGL2RenderingContext.bindBufferBase")}}</p> + +<h2 id="相关链接">相关链接</h2> + +<ul> + <li>{{domxref("WebGL2RenderingContext.getIndexedParameter()")}}</li> +</ul> |