这是一个实验中的功能
此功能某些浏览器尚在开发中,请参考浏览器兼容性表格以得到在不同浏览器中适合使用的前缀。由于该功能对应的标准文档可能被重新修订,所以在未来版本的浏览器中该功能的语法和行为可能随之改变。
WebGL 2 API 的 WebGL2RenderingContext.bindBufferBase()
方法将一个 WebGLBuffer
绑定到某个点 (target
) 的特定的 index
上。
语法
void gl.bindBufferBase(target, index, buffer);
参数
target
Glenum
指定绑定操作的目标。可能的值:gl.TRANSFORM_FEEDBACK_BUFFER
gl.UNIFORM_BUFFER
index
GLuint
指定目标(target
)的 index 。buffer
- 绑定到目标点(
target
)的WebGLBuffer
。
返回值
无。
示例
gl.bindBufferBase(gl.TRANSFORM_FEEDBACK_BUFFER, 0, buffer);
规范
Specification | Status | Comment |
---|---|---|
WebGL 2.0 bindBufferBase |
Editor's Draft | WebGL中初次定义。 |
OpenGL ES 3.0 glBindBufferBase |
Standard | OpenGL API 页面。 |
浏览器兼容性
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.
Update compatibility data on GitHub
Desktop | Mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
bindBufferBase | Chrome Full support 56 | Edge No support No | Firefox Full support 51 | IE No support No | Opera Full support 43 | Safari No support No | WebView Android Full support 58 | Chrome Android Full support 58 | Firefox Android Full support 51 | Opera Android Full support 43 | Safari iOS No support No | Samsung Internet Android Full support 7.0 |
Legend
- Full support
- Full support
- No support
- No support