Firefox Tomorrow

web api instance method

WebGLRenderingContext: isBuffer() method

View on MDN ↗

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

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