interface WebGLDebug {
    checkShaderErrors: boolean;
    onShaderError: null | ((gl, program, glVertexShader, glFragmentShader) => void);
}

Properties

checkShaderErrors: boolean

Enables error checking and reporting when shader programs are being compiled.

onShaderError: null | ((gl, program, glVertexShader, glFragmentShader) => void)

A callback function that can be used for custom error reporting. The callback receives the WebGL context, an instance of WebGLProgram as well two instances of WebGLShader representing the vertex and fragment shader. Assigning a custom function disables the default error reporting.

Type declaration

    • (gl, program, glVertexShader, glFragmentShader): void
    • Parameters

      • gl: WebGLRenderingContext
      • program: WebGLProgram
      • glVertexShader: WebGLShader
      • glFragmentShader: WebGLShader

      Returns void

Default

null