Skip to content

Instantly share code, notes, and snippets.

@rubber-duck
Created May 14, 2013 10:18
Show Gist options
  • Save rubber-duck/5575001 to your computer and use it in GitHub Desktop.
Save rubber-duck/5575001 to your computer and use it in GitHub Desktop.
module gl.gl;
enum : uint
{
MAX_TESS_CONTROL_OUTPUT_COMPONENTS = 0x8E83,
ONE_MINUS_SRC_ALPHA = 0x0303,
STENCIL_BACK_FUNC = 0x8800,
AND_REVERSE = 0x1502,
....
module gl.error;
import gl = gl.gl;
immutable string[uint] errorMessageMap = [
gl.NO_ERROR : "No error",
gl.INVALID_ENUM : "Invalid enum",
gl.INVALID_VALUE : "Invalid value",
gl.INVALID_OPERATION : "Invalid operation",
gl.STACK_OVERFLOW : "Stack overflow",
gl.STACK_UNDERFLOW : "Stack underflow",
gl.OUT_OF_MEMORY : "Out of memory"
];
render/gl/error.d(11): Error: non-constant expression [0u:"No error",1280u:"Invalid enum",1281u:"Invalid value",1282u:"Invalid operation",1283u:"Stack overflow",1284u:"Stack underflow",1285u:"Out of memory"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment