WebGLRenderingContext.isBuffer()
Baseline Widely available
This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
WebGLRenderingContext.isBuffer()
是 WebGL API 的方法之一。如果传递的 WebGLBuffer
有效则返回 true,否则返回 false。
句法
GLboolean gl.isBuffer(buffer);
参数
- buffer (缓冲区)
-
需要检查的
WebGLBuffer
。
返回值
GLboolean
指示 buffer 是否可用。
示例
创建一个缓冲区 (buffer)
js
var canvas = document.getElementById("canvas");
var gl = canvas.getContext("webgl");
var buffer = gl.createBuffer();
gl.isBuffer(buffer);
规范
Specification |
---|
WebGL Specification # 5.14.5 |
浏览器兼容性
Report problems with this compatibility data on GitHubdesktop | mobile | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
isBuffer |
Legend
Tip: you can click/tap on a cell for more information.
- Full support
- Full support
The compatibility table on 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.