WebGLActiveInfo是WebGL API 的一部分,并且代表了调用 WebGLRenderingContext.getActiveAttrib()
和WebGLRenderingContext.getActiveUniform()
这两个方法后传回的信息。
属性值
WebGLActiveInfo.name
- 请求变量的只读名称。
WebGLActiveInfo.size
- 请求变量的只读尺寸。
WebGLActiveInfo.type
- 请求变量的只读类型。
示例
WebGLActiveInfo
对象可以通过以下方式返回:
WebGLRenderingContext.getActiveAttrib()
WebGLRenderingContext.getActiveUniform()
WebGL2RenderingContext.getTransformFeedbackVarying()
WebGLActiveInfo? getActiveAttrib(WebGLProgram? program, GLuint index); WebGLActiveInfo? getActiveUniform(WebGLProgram? program, GLuint index); WebGLActiveInfo? getTransformFeedbackVarying(WebGLProgram? program, GLuint index)
规范
规范 | 状态 | 备注 |
---|---|---|
WebGL 1.0 WebGLActiveInfo |
Recommendation | Initial definition. |
浏览器兼容性
The compatibility table in this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
Feature | Chrome | Edge | Firefox | Internet Explorer | Opera | Safari |
---|---|---|---|---|---|---|
Basic Support | 9 | 12 | 4.0 | 11 | 12 | 5.1 |
Available in workers | No | No | 44.01 | No | No | No |
Feature | Android | Chrome for Android | Edge mobile | Firefox for Android | IE mobile | Opera Android | iOS Safari |
---|---|---|---|---|---|---|---|
Basic Support | (Yes) | 25 | (Yes) | (Yes) | 11 | 12 | 8.1 |
Available in workers | No | No | No | No | No | No | No |
1. From version 44.0, this feature is behind the gfx.offscreencanvas.enabled
preference (needs to be set to true
). To change preferences in Firefox, visit about:config.