GLError

View source

Describes the error codes returned by WebGLRenderingContext#getError.

Read the returned number and compare it with a member to identify the WebGL error condition.

Examples

import { GLError } from '@wimaengine/render-webgl'

if (gl.getError() !== GLError.None) {
  console.warn('WebGL reported an error')
}

Variants


None

View source

Indicates that no WebGL error is pending (0x0000, NO_ERROR).

InvalidEnum

View source

Indicates that an unsupported enum value was supplied (0x0500, INVALID_ENUM).

InvalidValue

View source

Indicates that an argument value was outside the accepted range (0x0501, INVALID_VALUE).

InvalidOperation

View source

Indicates that a call was invalid for the current WebGL state (0x0502, INVALID_OPERATION).

OutOfMemory

View source

Indicates that WebGL could not allocate enough memory (0x0505, OUT_OF_MEMORY).

ContextLost

View source

Indicates that the WebGL context was lost (0x9242, CONTEXT_LOST_WEBGL).