web api instance method
WebGLRenderingContext: isTexture() method
Available in workers
The WebGLRenderingContext.isTexture() method of the WebGL API returns true if the
passed WebGLTexture is valid and false otherwise.
Syntax
isTexture(texture)
Parameters
texture- : A
WebGLTextureto check.
- : A
Return value
A GLboolean indicating whether or not the texture is valid.
Examples
Checking a texture
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const texture = gl.createTexture();
gl.isTexture(texture);
Specifications
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.