web api instance method
WebGLRenderingContext: isBuffer() method
Available in workers
The WebGLRenderingContext.isBuffer() method of the WebGL API returns true if the
passed WebGLBuffer is valid and false otherwise.
Syntax
isBuffer(buffer)
Parameters
buffer- : A
WebGLBufferto check.
- : A
Return value
A GLboolean indicating whether or not the buffer is valid.
Examples
Creating a buffer
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const buffer = gl.createBuffer();
gl.isBuffer(buffer);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.
See also
bindBuffer()createBuffer()deleteBuffer()- Other buffers:
WebGLFramebuffer,WebGLRenderbuffer