WebGLRenderingContext: isProgram() method
WebGL
WebGL
The WebGLRenderingContext.isProgram() method of the WebGL API returns true if the
passed WebGLProgram is valid, false otherwise.
Syntax
isProgram(program)
Parameters
program- : A WebGLProgram to check. Passing
nullreturnsfalse.
Return value
A GLboolean indicating whether or not the program is valid.
Examples
Checking a program
const canvas = document.getElementById("canvas");
const gl = canvas.getContext("webgl");
const program = gl.createProgram();
// …
gl.isProgram(program);
Specifications
Browser compatibility
See also
- WebGLRenderingContext.createProgram()
- WebGLRenderingContext.deleteProgram()
- WebGLRenderingContext.linkProgram()
- WebGLRenderingContext.useProgram()
- WebGLRenderingContext.validateProgram()
- WebGLRenderingContext.getProgramParameter()
- WebGLRenderingContext.getProgramInfoLog()