Examples
const program = createProgramFromSrc(gl, vertexSource, fragmentSource, attributes)
validateProgram(gl, program)Function
validateProgram(gl: WebGLRenderingContext, program: WebGLProgram): voidChecks and logs the link and validation status of a WebGL program.
The helper reads LINK_STATUS with
WebGLRenderingContext#getProgramParameter. When
the result is falsy, it logs Program could not be linked: together with
WebGLRenderingContext#getProgramInfoLog. It then
always calls WebGLRenderingContext#validateProgram,
reads VALIDATE_STATUS, and logs Program could not be validated: with the
same info-log API when that result is falsy.
Link or validation failure is reported only through console.log; the
helper does not throw, return a status, or skip validation after a failed
link. It returns undefined after both checks.
const program = createProgramFromSrc(gl, vertexSource, fragmentSource, attributes)
validateProgram(gl, program)