aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/api/webglactiveinfo/index.html
blob: 18a7b022da373eb1ff28f4bb02c5b27227e9c9f8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
---
title: WebGLActiveInfo
slug: Web/API/WebGLActiveInfo
translation_of: Web/API/WebGLActiveInfo
---
<div>{{APIRef("WebGL")}}</div>

<p><strong>WebGLActiveInfo</strong><a href="/en-US/docs/Web/API/WebGL_API">WebGL API</a> 的一部分,并且代表了调用 {{domxref("WebGLRenderingContext.getActiveAttrib()")}}{{domxref("WebGLRenderingContext.getActiveUniform()")}} 这两个方法后传回的信息。</p>

<h2 id="属性值">属性值</h2>

<dl>
 <dt>{{domxref("WebGLActiveInfo.name")}}</dt>
 <dd>请求变量的只读名称。</dd>
 <dt>{{domxref("WebGLActiveInfo.size")}}</dt>
 <dd>请求变量的只读尺寸。</dd>
 <dt>{{domxref("WebGLActiveInfo.type")}}</dt>
 <dd>请求变量的只读类型。</dd>
</dl>

<h2 id="示例">示例</h2>

<p><code>WebGLActiveInfo</code> 对象可以通过以下方式返回:</p>

<ul>
 <li>{{domxref("WebGLRenderingContext.getActiveAttrib()")}}</li>
 <li>{{domxref("WebGLRenderingContext.getActiveUniform()")}} </li>
 <li>{{domxref("WebGL2RenderingContext.getTransformFeedbackVarying()")}}</li>
</ul>

<pre class="brush: js">WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index);
WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index);
WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram? program, GLuint index)
</pre>

<h2 id="规范">规范</h2>

<table class="standard-table">
 <tbody>
  <tr>
   <th scope="col">规范</th>
   <th scope="col">状态</th>
   <th scope="col">备注</th>
  </tr>
  <tr>
   <td>{{SpecName('WebGL', "#5.11", "WebGLActiveInfo")}}</td>
   <td>{{Spec2('WebGL')}}</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.WebGLActiveInfo.WebGLActiveInfo")}}</p>

<h2 id="另请参见">另请参见</h2>

<ul>
 <li>{{domxref("WebGLRenderingContext.getActiveAttrib()")}}</li>
 <li>{{domxref("WebGLRenderingContext.getActiveUniform()")}}</li>
</ul>