WebGLRenderingContext: isFramebuffer() method
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.
Note: This feature is available in Web Workers.
Phương thức WebGLRenderingContext.isFramebuffer() của WebGL API trả về true nếu WebGLFramebuffer được truyền là hợp lệ và false nếu ngược lại.
Cú pháp
js
isFramebuffer(framebuffer)
Thông số
framebuffer-
A
WebGLFramebufferđể kiểm tra.
Giá trị trả về
GLboolean cho biết bộ đệm khung có hợp lệ hay không.
Ví dụ
>Kiểm tra bộ đệm khung
js
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const framebuffer = gl.createFramebuffer();
gl.isFramebuffer(framebuffer);
Thông số kỹ thuật
| Thông số kỹ thuật |
|---|
| WebGL Specification> # 5.14.6> |