From 6779ad3cc4c48520b30f884d3852344f8490fe3a Mon Sep 17 00:00:00 2001 From: Vlad-Stefan Harbuz Date: Fri, 28 Jan 2022 17:17:46 +0100 Subject: [PATCH] initial commit --- .gitignore | 1 + LICENSE | 8 + README.md | 5 + gl/constants.ha | 860 ++++++++++++++++++++++++++++++++++++++++++++++++ gl/gl.ha | 25 ++ gl/types.ha | 15 + 6 files changed, 914 insertions(+) create mode 100644 .gitignore create mode 100644 LICENSE create mode 100644 README.md create mode 100644 gl/constants.ha create mode 100644 gl/gl.ha create mode 100644 gl/types.ha diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..424c745 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.h diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..69b6947 --- /dev/null +++ b/LICENSE @@ -0,0 +1,8 @@ +Copyright (c) 2022 Vlad-Stefan Harbuz + +Permission to use, copy, modify, and distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +The software is provided "as is" and the author disclaims all warranties +with regard to this software. diff --git a/README.md b/README.md new file mode 100644 index 0000000..35ab183 --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# hare-gl + +These are OpenGL bindings for [Hare]. + +[Hare]: https://harelang.org diff --git a/gl/constants.ha b/gl/constants.ha new file mode 100644 index 0000000..81fd1f7 --- /dev/null +++ b/gl/constants.ha @@ -0,0 +1,860 @@ +// Boolean values +export def FALSE: int = 0; +export def TRUE: int = 1; + +// Data types +export def BYTE: gl_enum = 0x1400; +export def UNSIGNED_BYTE: gl_enum = 0x1401; +export def SHORT: gl_enum = 0x1402; +export def UNSIGNED_SHORT: gl_enum = 0x1403; +export def INT: gl_enum = 0x1404; +export def UNSIGNED_INT: gl_enum = 0x1405; +export def FLOAT: gl_enum = 0x1406; +export def TWO_BYTES: gl_enum = 0x1407; +export def THREE_BYTES: gl_enum = 0x1408; +export def FOUR_BYTES: gl_enum = 0x1409; +export def DOUBLE: gl_enum = 0x140A; + +// Primitives +export def POINTS: gl_enum = 0x0000; +export def LINES: gl_enum = 0x0001; +export def LINE_LOOP: gl_enum = 0x0002; +export def LINE_STRIP: gl_enum = 0x0003; +export def TRIANGLES: gl_enum = 0x0004; +export def TRIANGLE_STRIP: gl_enum = 0x0005; +export def TRIANGLE_FAN: gl_enum = 0x0006; +export def QUADS: gl_enum = 0x0007; +export def QUAD_STRIP: gl_enum = 0x0008; +export def POLYGON: gl_enum = 0x0009; + +// Vertex Arrays +export def VERTEX_ARRAY: gl_enum = 0x8074; +export def NORMAL_ARRAY: gl_enum = 0x8075; +export def COLOR_ARRAY: gl_enum = 0x8076; +export def INDEX_ARRAY: gl_enum = 0x8077; +export def TEXTURE_COORD_ARRAY: gl_enum = 0x8078; +export def EDGE_FLAG_ARRAY: gl_enum = 0x8079; +export def VERTEX_ARRAY_SIZE: gl_enum = 0x807A; +export def VERTEX_ARRAY_TYPE: gl_enum = 0x807B; +export def VERTEX_ARRAY_STRIDE: gl_enum = 0x807C; +export def NORMAL_ARRAY_TYPE: gl_enum = 0x807E; +export def NORMAL_ARRAY_STRIDE: gl_enum = 0x807F; +export def COLOR_ARRAY_SIZE: gl_enum = 0x8081; +export def COLOR_ARRAY_TYPE: gl_enum = 0x8082; +export def COLOR_ARRAY_STRIDE: gl_enum = 0x8083; +export def INDEX_ARRAY_TYPE: gl_enum = 0x8085; +export def INDEX_ARRAY_STRIDE: gl_enum = 0x8086; +export def TEXTURE_COORD_ARRAY_SIZE: gl_enum = 0x8088; +export def TEXTURE_COORD_ARRAY_TYPE: gl_enum = 0x8089; +export def TEXTURE_COORD_ARRAY_STRIDE: gl_enum = 0x808A; +export def EDGE_FLAG_ARRAY_STRIDE: gl_enum = 0x808C; +export def VERTEX_ARRAY_POINTER: gl_enum = 0x808E; +export def NORMAL_ARRAY_POINTER: gl_enum = 0x808F; +export def COLOR_ARRAY_POINTER: gl_enum = 0x8090; +export def INDEX_ARRAY_POINTER: gl_enum = 0x8091; +export def TEXTURE_COORD_ARRAY_POINTER: gl_enum = 0x8092; +export def EDGE_FLAG_ARRAY_POINTER: gl_enum = 0x8093; +export def V2F: gl_enum = 0x2A20; +export def V3F: gl_enum = 0x2A21; +export def C4UB_V2F: gl_enum = 0x2A22; +export def C4UB_V3F: gl_enum = 0x2A23; +export def C3F_V3F: gl_enum = 0x2A24; +export def N3F_V3F: gl_enum = 0x2A25; +export def C4F_N3F_V3F: gl_enum = 0x2A26; +export def T2F_V3F: gl_enum = 0x2A27; +export def T4F_V4F: gl_enum = 0x2A28; +export def T2F_C4UB_V3F: gl_enum = 0x2A29; +export def T2F_C3F_V3F: gl_enum = 0x2A2A; +export def T2F_N3F_V3F: gl_enum = 0x2A2B; +export def T2F_C4F_N3F_V3F: gl_enum = 0x2A2C; +export def T4F_C4F_N3F_V4F: gl_enum = 0x2A2D; + +// Matrix Mode +export def MATRIX_MODE: gl_enum = 0x0BA0; +export def MODELVIEW: gl_enum = 0x1700; +export def PROJECTION: gl_enum = 0x1701; +export def TEXTURE: gl_enum = 0x1702; + +// Points +export def POINT_SMOOTH: gl_enum = 0x0B10; +export def POINT_SIZE: gl_enum = 0x0B11; +export def POINT_SIZE_GRANULARITY: gl_enum = 0x0B13; +export def POINT_SIZE_RANGE: gl_enum = 0x0B12; + +// Lines +export def LINE_SMOOTH: gl_enum = 0x0B20; +export def LINE_STIPPLE: gl_enum = 0x0B24; +export def LINE_STIPPLE_PATTERN: gl_enum = 0x0B25; +export def LINE_STIPPLE_REPEAT: gl_enum = 0x0B26; +export def LINE_WIDTH: gl_enum = 0x0B21; +export def LINE_WIDTH_GRANULARITY: gl_enum = 0x0B23; +export def LINE_WIDTH_RANGE: gl_enum = 0x0B22; + +// Polygons +export def POINT: gl_enum = 0x1B00; +export def LINE: gl_enum = 0x1B01; +export def FILL: gl_enum = 0x1B02; +export def CW: gl_enum = 0x0900; +export def CCW: gl_enum = 0x0901; +export def FRONT: gl_enum = 0x0404; +export def BACK: gl_enum = 0x0405; +export def POLYGON_MODE: gl_enum = 0x0B40; +export def POLYGON_SMOOTH: gl_enum = 0x0B41; +export def POLYGON_STIPPLE: gl_enum = 0x0B42; +export def EDGE_FLAG: gl_enum = 0x0B43; +export def CULL_FACE: gl_enum = 0x0B44; +export def CULL_FACE_MODE: gl_enum = 0x0B45; +export def FRONT_FACE: gl_enum = 0x0B46; +export def POLYGON_OFFSET_FACTOR: gl_enum = 0x8038; +export def POLYGON_OFFSET_UNITS: gl_enum = 0x2A00; +export def POLYGON_OFFSET_POINT: gl_enum = 0x2A01; +export def POLYGON_OFFSET_LINE: gl_enum = 0x2A02; +export def POLYGON_OFFSET_FILL: gl_enum = 0x8037; + +// Display Lists +export def COMPILE: gl_enum = 0x1300; +export def COMPILE_AND_EXECUTE: gl_enum = 0x1301; +export def LIST_BASE: gl_enum = 0x0B32; +export def LIST_INDEX: gl_enum = 0x0B33; +export def LIST_MODE: gl_enum = 0x0B30; + +// Depth buffer +export def NEVER: gl_enum = 0x0200; +export def LESS: gl_enum = 0x0201; +export def EQUAL: gl_enum = 0x0202; +export def LEQUAL: gl_enum = 0x0203; +export def GREATER: gl_enum = 0x0204; +export def NOTEQUAL: gl_enum = 0x0205; +export def GEQUAL: gl_enum = 0x0206; +export def ALWAYS: gl_enum = 0x0207; +export def DEPTH_TEST: gl_enum = 0x0B71; +export def DEPTH_BITS: gl_enum = 0x0D56; +export def DEPTH_CLEAR_VALUE: gl_enum = 0x0B73; +export def DEPTH_FUNC: gl_enum = 0x0B74; +export def DEPTH_RANGE: gl_enum = 0x0B70; +export def DEPTH_WRITEMASK: gl_enum = 0x0B72; +export def DEPTH_COMPONENT: gl_enum = 0x1902; + +// Lighting +export def LIGHTING: gl_enum = 0x0B50; +export def LIGHT0: gl_enum = 0x4000; +export def LIGHT1: gl_enum = 0x4001; +export def LIGHT2: gl_enum = 0x4002; +export def LIGHT3: gl_enum = 0x4003; +export def LIGHT4: gl_enum = 0x4004; +export def LIGHT5: gl_enum = 0x4005; +export def LIGHT6: gl_enum = 0x4006; +export def LIGHT7: gl_enum = 0x4007; +export def SPOT_EXPONENT: gl_enum = 0x1205; +export def SPOT_CUTOFF: gl_enum = 0x1206; +export def CONSTANT_ATTENUATION: gl_enum = 0x1207; +export def LINEAR_ATTENUATION: gl_enum = 0x1208; +export def QUADRATIC_ATTENUATION: gl_enum = 0x1209; +export def AMBIENT: gl_enum = 0x1200; +export def DIFFUSE: gl_enum = 0x1201; +export def SPECULAR: gl_enum = 0x1202; +export def SHININESS: gl_enum = 0x1601; +export def EMISSION: gl_enum = 0x1600; +export def POSITION: gl_enum = 0x1203; +export def SPOT_DIRECTION: gl_enum = 0x1204; +export def AMBIENT_AND_DIFFUSE: gl_enum = 0x1602; +export def COLOR_INDEXES: gl_enum = 0x1603; +export def LIGHT_MODEL_TWO_SIDE: gl_enum = 0x0B52; +export def LIGHT_MODEL_LOCAL_VIEWER: gl_enum = 0x0B51; +export def LIGHT_MODEL_AMBIENT: gl_enum = 0x0B53; +export def FRONT_AND_BACK: gl_enum = 0x0408; +export def SHADE_MODEL: gl_enum = 0x0B54; +export def FLAT: gl_enum = 0x1D00; +export def SMOOTH: gl_enum = 0x1D01; +export def COLOR_MATERIAL: gl_enum = 0x0B57; +export def COLOR_MATERIAL_FACE: gl_enum = 0x0B55; +export def COLOR_MATERIAL_PARAMETER: gl_enum = 0x0B56; +export def NORMALIZE: gl_enum = 0x0BA1; + +// User clipping planes +export def CLIP_PLANE0: gl_enum = 0x3000; +export def CLIP_PLANE1: gl_enum = 0x3001; +export def CLIP_PLANE2: gl_enum = 0x3002; +export def CLIP_PLANE3: gl_enum = 0x3003; +export def CLIP_PLANE4: gl_enum = 0x3004; +export def CLIP_PLANE5: gl_enum = 0x3005; + +// Accumulation buffer +export def ACCUM_RED_BITS: gl_enum = 0x0D58; +export def ACCUM_GREEN_BITS: gl_enum = 0x0D59; +export def ACCUM_BLUE_BITS: gl_enum = 0x0D5A; +export def ACCUM_ALPHA_BITS: gl_enum = 0x0D5B; +export def ACCUM_CLEAR_VALUE: gl_enum = 0x0B80; +export def ACCUM: gl_enum = 0x0100; +export def ADD: gl_enum = 0x0104; +export def LOAD: gl_enum = 0x0101; +export def MULT: gl_enum = 0x0103; +export def RETURN: gl_enum = 0x0102; + +// Alpha testing +export def ALPHA_TEST: gl_enum = 0x0BC0; +export def ALPHA_TEST_REF: gl_enum = 0x0BC2; +export def ALPHA_TEST_FUNC: gl_enum = 0x0BC1; + +// Blending +export def BLEND: gl_enum = 0x0BE2; +export def BLEND_SRC: gl_enum = 0x0BE1; +export def BLEND_DST: gl_enum = 0x0BE0; +export def ZERO: gl_enum = 0; +export def ONE: gl_enum = 1; +export def SRC_COLOR: gl_enum = 0x0300; +export def ONE_MINUS_SRC_COLOR: gl_enum = 0x0301; +export def SRC_ALPHA: gl_enum = 0x0302; +export def ONE_MINUS_SRC_ALPHA: gl_enum = 0x0303; +export def DST_ALPHA: gl_enum = 0x0304; +export def ONE_MINUS_DST_ALPHA: gl_enum = 0x0305; +export def DST_COLOR: gl_enum = 0x0306; +export def ONE_MINUS_DST_COLOR: gl_enum = 0x0307; +export def SRC_ALPHA_SATURATE: gl_enum = 0x0308; + +// Render Mode +export def FEEDBACK: gl_enum = 0x1C01; +export def RENDER: gl_enum = 0x1C00; +export def SELECT: gl_enum = 0x1C02; + +// Feedback +export def TWO_D: gl_enum = 0x0600; +export def THREE_D: gl_enum = 0x0601; +export def THREE_D_COLOR: gl_enum = 0x0602; +export def THREE_D_COLOR_TEXTURE: gl_enum = 0x0603; +export def FOUR_D_COLOR_TEXTURE: gl_enum = 0x0604; +export def POINT_TOKEN: gl_enum = 0x0701; +export def LINE_TOKEN: gl_enum = 0x0702; +export def LINE_RESET_TOKEN: gl_enum = 0x0707; +export def POLYGON_TOKEN: gl_enum = 0x0703; +export def BITMAP_TOKEN: gl_enum = 0x0704; +export def DRAW_PIXEL_TOKEN: gl_enum = 0x0705; +export def COPY_PIXEL_TOKEN: gl_enum = 0x0706; +export def PASS_THROUGH_TOKEN: gl_enum = 0x0700; +export def FEEDBACK_BUFFER_POINTER: gl_enum = 0x0DF0; +export def FEEDBACK_BUFFER_SIZE: gl_enum = 0x0DF1; +export def FEEDBACK_BUFFER_TYPE: gl_enum = 0x0DF2; + +// Selection +export def SELECTION_BUFFER_POINTER: gl_enum = 0x0DF3; +export def SELECTION_BUFFER_SIZE: gl_enum = 0x0DF4; + +// Fog +export def FOG: gl_enum = 0x0B60; +export def FOG_MODE: gl_enum = 0x0B65; +export def FOG_DENSITY: gl_enum = 0x0B62; +export def FOG_COLOR: gl_enum = 0x0B66; +export def FOG_INDEX: gl_enum = 0x0B61; +export def FOG_START: gl_enum = 0x0B63; +export def FOG_END: gl_enum = 0x0B64; +export def LINEAR: gl_enum = 0x2601; +export def EXP: gl_enum = 0x0800; +export def EXP2: gl_enum = 0x0801; + +// Logic Ops +export def LOGIC_OP: gl_enum = 0x0BF1; +export def INDEX_LOGIC_OP: gl_enum = 0x0BF1; +export def COLOR_LOGIC_OP: gl_enum = 0x0BF2; +export def LOGIC_OP_MODE: gl_enum = 0x0BF0; +export def CLEAR: gl_enum = 0x1500; +export def SET: gl_enum = 0x150F; +export def COPY: gl_enum = 0x1503; +export def COPY_INVERTED: gl_enum = 0x150C; +export def NOOP: gl_enum = 0x1505; +export def INVERT: gl_enum = 0x150A; +export def AND: gl_enum = 0x1501; +export def NAND: gl_enum = 0x150E; +export def OR: gl_enum = 0x1507; +export def NOR: gl_enum = 0x1508; +export def XOR: gl_enum = 0x1506; +export def EQUIV: gl_enum = 0x1509; +export def AND_REVERSE: gl_enum = 0x1502; +export def AND_INVERTED: gl_enum = 0x1504; +export def OR_REVERSE: gl_enum = 0x150B; +export def OR_INVERTED: gl_enum = 0x150D; + +// Stencil +export def STENCIL_BITS: gl_enum = 0x0D57; +export def STENCIL_TEST: gl_enum = 0x0B90; +export def STENCIL_CLEAR_VALUE: gl_enum = 0x0B91; +export def STENCIL_FUNC: gl_enum = 0x0B92; +export def STENCIL_VALUE_MASK: gl_enum = 0x0B93; +export def STENCIL_FAIL: gl_enum = 0x0B94; +export def STENCIL_PASS_DEPTH_FAIL: gl_enum = 0x0B95; +export def STENCIL_PASS_DEPTH_PASS: gl_enum = 0x0B96; +export def STENCIL_REF: gl_enum = 0x0B97; +export def STENCIL_WRITEMASK: gl_enum = 0x0B98; +export def STENCIL_INDEX: gl_enum = 0x1901; +export def KEEP: gl_enum = 0x1E00; +export def REPLACE: gl_enum = 0x1E01; +export def INCR: gl_enum = 0x1E02; +export def DECR: gl_enum = 0x1E03; + +// Buffers, Pixel Drawing/Reading +export def NONE: gl_enum = 0; +export def LEFT: gl_enum = 0x0406; +export def RIGHT: gl_enum = 0x0407; +// export def FRONT: gl_enum = 0x0404; +// export def BACK: gl_enum = 0x0405; +// export def FRONT_AND_BACK: gl_enum = 0x0408; +export def FRONT_LEFT: gl_enum = 0x0400; +export def FRONT_RIGHT: gl_enum = 0x0401; +export def BACK_LEFT: gl_enum = 0x0402; +export def BACK_RIGHT: gl_enum = 0x0403; +export def AUX0: gl_enum = 0x0409; +export def AUX1: gl_enum = 0x040A; +export def AUX2: gl_enum = 0x040B; +export def AUX3: gl_enum = 0x040C; +export def COLOR_INDEX: gl_enum = 0x1900; +export def RED: gl_enum = 0x1903; +export def GREEN: gl_enum = 0x1904; +export def BLUE: gl_enum = 0x1905; +export def ALPHA: gl_enum = 0x1906; +export def LUMINANCE: gl_enum = 0x1909; +export def LUMINANCE_ALPHA: gl_enum = 0x190A; +export def ALPHA_BITS: gl_enum = 0x0D55; +export def RED_BITS: gl_enum = 0x0D52; +export def GREEN_BITS: gl_enum = 0x0D53; +export def BLUE_BITS: gl_enum = 0x0D54; +export def INDEX_BITS: gl_enum = 0x0D51; +export def SUBPIXEL_BITS: gl_enum = 0x0D50; +export def AUX_BUFFERS: gl_enum = 0x0C00; +export def READ_BUFFER: gl_enum = 0x0C02; +export def DRAW_BUFFER: gl_enum = 0x0C01; +export def DOUBLEBUFFER: gl_enum = 0x0C32; +export def STEREO: gl_enum = 0x0C33; +export def BITMAP: gl_enum = 0x1A00; +export def COLOR: gl_enum = 0x1800; +export def DEPTH: gl_enum = 0x1801; +export def STENCIL: gl_enum = 0x1802; +export def DITHER: gl_enum = 0x0BD0; +export def RGB: gl_enum = 0x1907; +export def RGBA: gl_enum = 0x1908; + +// Implementation limits +export def MAX_LIST_NESTING: gl_enum = 0x0B31; +export def MAX_EVAL_ORDER: gl_enum = 0x0D30; +export def MAX_LIGHTS: gl_enum = 0x0D31; +export def MAX_CLIP_PLANES: gl_enum = 0x0D32; +export def MAX_TEXTURE_SIZE: gl_enum = 0x0D33; +export def MAX_PIXEL_MAP_TABLE: gl_enum = 0x0D34; +export def MAX_ATTRIB_STACK_DEPTH: gl_enum = 0x0D35; +export def MAX_MODELVIEW_STACK_DEPTH: gl_enum = 0x0D36; +export def MAX_NAME_STACK_DEPTH: gl_enum = 0x0D37; +export def MAX_PROJECTION_STACK_DEPTH: gl_enum = 0x0D38; +export def MAX_TEXTURE_STACK_DEPTH: gl_enum = 0x0D39; +export def MAX_VIEWPORT_DIMS: gl_enum = 0x0D3A; +export def MAX_CLIENT_ATTRIB_STACK_DEPTH: gl_enum = 0x0D3B; + +// Gets +export def ATTRIB_STACK_DEPTH: gl_enum = 0x0BB0; +export def CLIENT_ATTRIB_STACK_DEPTH: gl_enum = 0x0BB1; +export def COLOR_CLEAR_VALUE: gl_enum = 0x0C22; +export def COLOR_WRITEMASK: gl_enum = 0x0C23; +export def CURRENT_INDEX: gl_enum = 0x0B01; +export def CURRENT_COLOR: gl_enum = 0x0B00; +export def CURRENT_NORMAL: gl_enum = 0x0B02; +export def CURRENT_RASTER_COLOR: gl_enum = 0x0B04; +export def CURRENT_RASTER_DISTANCE: gl_enum = 0x0B09; +export def CURRENT_RASTER_INDEX: gl_enum = 0x0B05; +export def CURRENT_RASTER_POSITION: gl_enum = 0x0B07; +export def CURRENT_RASTER_TEXTURE_COORDS: gl_enum = 0x0B06; +export def CURRENT_RASTER_POSITION_VALID: gl_enum = 0x0B08; +export def CURRENT_TEXTURE_COORDS: gl_enum = 0x0B03; +export def INDEX_CLEAR_VALUE: gl_enum = 0x0C20; +export def INDEX_MODE: gl_enum = 0x0C30; +export def INDEX_WRITEMASK: gl_enum = 0x0C21; +export def MODELVIEW_MATRIX: gl_enum = 0x0BA6; +export def MODELVIEW_STACK_DEPTH: gl_enum = 0x0BA3; +export def NAME_STACK_DEPTH: gl_enum = 0x0D70; +export def PROJECTION_MATRIX: gl_enum = 0x0BA7; +export def PROJECTION_STACK_DEPTH: gl_enum = 0x0BA4; +export def RENDER_MODE: gl_enum = 0x0C40; +export def RGBA_MODE: gl_enum = 0x0C31; +export def TEXTURE_MATRIX: gl_enum = 0x0BA8; +export def TEXTURE_STACK_DEPTH: gl_enum = 0x0BA5; +export def VIEWPORT: gl_enum = 0x0BA2; + +// Evaluators +export def AUTO_NORMAL: gl_enum = 0x0D80; +export def MAP1_COLOR_4: gl_enum = 0x0D90; +export def MAP1_INDEX: gl_enum = 0x0D91; +export def MAP1_NORMAL: gl_enum = 0x0D92; +export def MAP1_TEXTURE_COORD_1: gl_enum = 0x0D93; +export def MAP1_TEXTURE_COORD_2: gl_enum = 0x0D94; +export def MAP1_TEXTURE_COORD_3: gl_enum = 0x0D95; +export def MAP1_TEXTURE_COORD_4: gl_enum = 0x0D96; +export def MAP1_VERTEX_3: gl_enum = 0x0D97; +export def MAP1_VERTEX_4: gl_enum = 0x0D98; +export def MAP2_COLOR_4: gl_enum = 0x0DB0; +export def MAP2_INDEX: gl_enum = 0x0DB1; +export def MAP2_NORMAL: gl_enum = 0x0DB2; +export def MAP2_TEXTURE_COORD_1: gl_enum = 0x0DB3; +export def MAP2_TEXTURE_COORD_2: gl_enum = 0x0DB4; +export def MAP2_TEXTURE_COORD_3: gl_enum = 0x0DB5; +export def MAP2_TEXTURE_COORD_4: gl_enum = 0x0DB6; +export def MAP2_VERTEX_3: gl_enum = 0x0DB7; +export def MAP2_VERTEX_4: gl_enum = 0x0DB8; +export def MAP1_GRID_DOMAIN: gl_enum = 0x0DD0; +export def MAP1_GRID_SEGMENTS: gl_enum = 0x0DD1; +export def MAP2_GRID_DOMAIN: gl_enum = 0x0DD2; +export def MAP2_GRID_SEGMENTS: gl_enum = 0x0DD3; +export def COEFF: gl_enum = 0x0A00; +export def ORDER: gl_enum = 0x0A01; +export def DOMAIN: gl_enum = 0x0A02; + +// Hints +export def PERSPECTIVE_CORRECTION_HINT: gl_enum = 0x0C50; +export def POINT_SMOOTH_HINT: gl_enum = 0x0C51; +export def LINE_SMOOTH_HINT: gl_enum = 0x0C52; +export def POLYGON_SMOOTH_HINT: gl_enum = 0x0C53; +export def FOG_HINT: gl_enum = 0x0C54; +export def DONT_CARE: gl_enum = 0x1100; +export def FASTEST: gl_enum = 0x1101; +export def NICEST: gl_enum = 0x1102; + +// Scissor box +export def SCISSOR_BOX: gl_enum = 0x0C10; +export def SCISSOR_TEST: gl_enum = 0x0C11; + +// Pixel Mode / Transfer +export def MAP_COLOR: gl_enum = 0x0D10; +export def MAP_STENCIL: gl_enum = 0x0D11; +export def INDEX_SHIFT: gl_enum = 0x0D12; +export def INDEX_OFFSET: gl_enum = 0x0D13; +export def RED_SCALE: gl_enum = 0x0D14; +export def RED_BIAS: gl_enum = 0x0D15; +export def GREEN_SCALE: gl_enum = 0x0D18; +export def GREEN_BIAS: gl_enum = 0x0D19; +export def BLUE_SCALE: gl_enum = 0x0D1A; +export def BLUE_BIAS: gl_enum = 0x0D1B; +export def ALPHA_SCALE: gl_enum = 0x0D1C; +export def ALPHA_BIAS: gl_enum = 0x0D1D; +export def DEPTH_SCALE: gl_enum = 0x0D1E; +export def DEPTH_BIAS: gl_enum = 0x0D1F; +export def PIXEL_MAP_S_TO_S_SIZE: gl_enum = 0x0CB1; +export def PIXEL_MAP_I_TO_I_SIZE: gl_enum = 0x0CB0; +export def PIXEL_MAP_I_TO_R_SIZE: gl_enum = 0x0CB2; +export def PIXEL_MAP_I_TO_G_SIZE: gl_enum = 0x0CB3; +export def PIXEL_MAP_I_TO_B_SIZE: gl_enum = 0x0CB4; +export def PIXEL_MAP_I_TO_A_SIZE: gl_enum = 0x0CB5; +export def PIXEL_MAP_R_TO_R_SIZE: gl_enum = 0x0CB6; +export def PIXEL_MAP_G_TO_G_SIZE: gl_enum = 0x0CB7; +export def PIXEL_MAP_B_TO_B_SIZE: gl_enum = 0x0CB8; +export def PIXEL_MAP_A_TO_A_SIZE: gl_enum = 0x0CB9; +export def PIXEL_MAP_S_TO_S: gl_enum = 0x0C71; +export def PIXEL_MAP_I_TO_I: gl_enum = 0x0C70; +export def PIXEL_MAP_I_TO_R: gl_enum = 0x0C72; +export def PIXEL_MAP_I_TO_G: gl_enum = 0x0C73; +export def PIXEL_MAP_I_TO_B: gl_enum = 0x0C74; +export def PIXEL_MAP_I_TO_A: gl_enum = 0x0C75; +export def PIXEL_MAP_R_TO_R: gl_enum = 0x0C76; +export def PIXEL_MAP_G_TO_G: gl_enum = 0x0C77; +export def PIXEL_MAP_B_TO_B: gl_enum = 0x0C78; +export def PIXEL_MAP_A_TO_A: gl_enum = 0x0C79; +export def PACK_ALIGNMENT: gl_enum = 0x0D05; +export def PACK_LSB_FIRST: gl_enum = 0x0D01; +export def PACK_ROW_LENGTH: gl_enum = 0x0D02; +export def PACK_SKIP_PIXELS: gl_enum = 0x0D04; +export def PACK_SKIP_ROWS: gl_enum = 0x0D03; +export def PACK_SWAP_BYTES: gl_enum = 0x0D00; +export def UNPACK_ALIGNMENT: gl_enum = 0x0CF5; +export def UNPACK_LSB_FIRST: gl_enum = 0x0CF1; +export def UNPACK_ROW_LENGTH: gl_enum = 0x0CF2; +export def UNPACK_SKIP_PIXELS: gl_enum = 0x0CF4; +export def UNPACK_SKIP_ROWS: gl_enum = 0x0CF3; +export def UNPACK_SWAP_BYTES: gl_enum = 0x0CF0; +export def ZOOM_X: gl_enum = 0x0D16; +export def ZOOM_Y: gl_enum = 0x0D17; + +// Texture mapping +export def TEXTURE_ENV: gl_enum = 0x2300; +export def TEXTURE_ENV_MODE: gl_enum = 0x2200; +export def TEXTURE_1D: gl_enum = 0x0DE0; +export def TEXTURE_2D: gl_enum = 0x0DE1; +export def TEXTURE_WRAP_S: gl_enum = 0x2802; +export def TEXTURE_WRAP_T: gl_enum = 0x2803; +export def TEXTURE_MAG_FILTER: gl_enum = 0x2800; +export def TEXTURE_MIN_FILTER: gl_enum = 0x2801; +export def TEXTURE_ENV_COLOR: gl_enum = 0x2201; +export def TEXTURE_GEN_S: gl_enum = 0x0C60; +export def TEXTURE_GEN_T: gl_enum = 0x0C61; +export def TEXTURE_GEN_R: gl_enum = 0x0C62; +export def TEXTURE_GEN_Q: gl_enum = 0x0C63; +export def TEXTURE_GEN_MODE: gl_enum = 0x2500; +export def TEXTURE_BORDER_COLOR: gl_enum = 0x1004; +export def TEXTURE_WIDTH: gl_enum = 0x1000; +export def TEXTURE_HEIGHT: gl_enum = 0x1001; +export def TEXTURE_BORDER: gl_enum = 0x1005; +export def TEXTURE_COMPONENTS: gl_enum = 0x1003; +export def TEXTURE_RED_SIZE: gl_enum = 0x805C; +export def TEXTURE_GREEN_SIZE: gl_enum = 0x805D; +export def TEXTURE_BLUE_SIZE: gl_enum = 0x805E; +export def TEXTURE_ALPHA_SIZE: gl_enum = 0x805F; +export def TEXTURE_LUMINANCE_SIZE: gl_enum = 0x8060; +export def TEXTURE_INTENSITY_SIZE: gl_enum = 0x8061; +export def NEAREST_MIPMAP_NEAREST: gl_enum = 0x2700; +export def NEAREST_MIPMAP_LINEAR: gl_enum = 0x2702; +export def LINEAR_MIPMAP_NEAREST: gl_enum = 0x2701; +export def LINEAR_MIPMAP_LINEAR: gl_enum = 0x2703; +export def OBJECT_LINEAR: gl_enum = 0x2401; +export def OBJECT_PLANE: gl_enum = 0x2501; +export def EYE_LINEAR: gl_enum = 0x2400; +export def EYE_PLANE: gl_enum = 0x2502; +export def SPHERE_MAP: gl_enum = 0x2402; +export def DECAL: gl_enum = 0x2101; +export def MODULATE: gl_enum = 0x2100; +export def NEAREST: gl_enum = 0x2600; +export def REPEAT: gl_enum = 0x2901; +export def CLAMP: gl_enum = 0x2900; +export def S: gl_enum = 0x2000; +export def T: gl_enum = 0x2001; +export def R: gl_enum = 0x2002; +export def Q: gl_enum = 0x2003; + +// Utility +export def VENDOR: gl_enum = 0x1F00; +export def RENDERER: gl_enum = 0x1F01; +export def VERSION: gl_enum = 0x1F02; +export def EXTENSIONS: gl_enum = 0x1F03; + +// Errors +export def NO_ERROR: gl_enum = 0; +export def INVALID_ENUM: gl_enum = 0x0500; +export def INVALID_VALUE: gl_enum = 0x0501; +export def INVALID_OPERATION: gl_enum = 0x0502; +export def STACK_OVERFLOW: gl_enum = 0x0503; +export def STACK_UNDERFLOW: gl_enum = 0x0504; +export def OUT_OF_MEMORY: gl_enum = 0x0505; + +// glPush/PopAttrib bits +export def CURRENT_BIT: gl_bitfield = 0x00000001; +export def POINT_BIT: gl_bitfield = 0x00000002; +export def LINE_BIT: gl_bitfield = 0x00000004; +export def POLYGON_BIT: gl_bitfield = 0x00000008; +export def POLYGON_STIPPLE_BIT: gl_bitfield = 0x00000010; +export def PIXEL_MODE_BIT: gl_bitfield = 0x00000020; +export def LIGHTING_BIT: gl_bitfield = 0x00000040; +export def FOG_BIT: gl_bitfield = 0x00000080; +export def DEPTH_BUFFER_BIT: gl_bitfield = 0x00000100; +export def ACCUM_BUFFER_BIT: gl_bitfield = 0x00000200; +export def STENCIL_BUFFER_BIT: gl_bitfield = 0x00000400; +export def VIEWPORT_BIT: gl_bitfield = 0x00000800; +export def TRANSFORM_BIT: gl_bitfield = 0x00001000; +export def ENABLE_BIT: gl_bitfield = 0x00002000; +export def COLOR_BUFFER_BIT: gl_bitfield = 0x00004000; +export def HINT_BIT: gl_bitfield = 0x00008000; +export def EVAL_BIT: gl_bitfield = 0x00010000; +export def LIST_BIT: gl_bitfield = 0x00020000; +export def TEXTURE_BIT: gl_bitfield = 0x00040000; +export def SCISSOR_BIT: gl_bitfield = 0x00080000; +export def ALL_ATTRIB_BITS: gl_bitfield = 0x000FFFFF; + +// OpenGL 1.1 +export def PROXY_TEXTURE_1D: gl_enum = 0x8063; +export def PROXY_TEXTURE_2D: gl_enum = 0x8064; +export def TEXTURE_PRIORITY: gl_enum = 0x8066; +export def TEXTURE_RESIDENT: gl_enum = 0x8067; +export def TEXTURE_BINDING_1D: gl_enum = 0x8068; +export def TEXTURE_BINDING_2D: gl_enum = 0x8069; +export def TEXTURE_INTERNAL_FORMAT: gl_enum = 0x1003; +export def ALPHA4: gl_enum = 0x803B; +export def ALPHA8: gl_enum = 0x803C; +export def ALPHA12: gl_enum = 0x803D; +export def ALPHA16: gl_enum = 0x803E; +export def LUMINANCE4: gl_enum = 0x803F; +export def LUMINANCE8: gl_enum = 0x8040; +export def LUMINANCE12: gl_enum = 0x8041; +export def LUMINANCE16: gl_enum = 0x8042; +export def LUMINANCE4_ALPHA4: gl_enum = 0x8043; +export def LUMINANCE6_ALPHA2: gl_enum = 0x8044; +export def LUMINANCE8_ALPHA8: gl_enum = 0x8045; +export def LUMINANCE12_ALPHA4: gl_enum = 0x8046; +export def LUMINANCE12_ALPHA12: gl_enum = 0x8047; +export def LUMINANCE16_ALPHA16: gl_enum = 0x8048; +export def INTENSITY: gl_enum = 0x8049; +export def INTENSITY4: gl_enum = 0x804A; +export def INTENSITY8: gl_enum = 0x804B; +export def INTENSITY12: gl_enum = 0x804C; +export def INTENSITY16: gl_enum = 0x804D; +export def R3_G3_B2: gl_enum = 0x2A10; +export def RGB4: gl_enum = 0x804F; +export def RGB5: gl_enum = 0x8050; +export def RGB8: gl_enum = 0x8051; +export def RGB10: gl_enum = 0x8052; +export def RGB12: gl_enum = 0x8053; +export def RGB16: gl_enum = 0x8054; +export def RGBA2: gl_enum = 0x8055; +export def RGBA4: gl_enum = 0x8056; +export def RGB5_A1: gl_enum = 0x8057; +export def RGBA8: gl_enum = 0x8058; +export def RGB10_A2: gl_enum = 0x8059; +export def RGBA12: gl_enum = 0x805A; +export def RGBA16: gl_enum = 0x805B; +export def CLIENT_PIXEL_STORE_BIT: gl_bitfield = 0x00000001; +export def CLIENT_VERTEX_ARRAY_BIT: gl_bitfield = 0x00000002; +export def ALL_CLIENT_ATTRIB_BITS: gl_bitfield = 0xFFFFFFFF; +export def CLIENT_ALL_ATTRIB_BITS: gl_bitfield = 0xFFFFFFFF; + +// OpenGL 1.2 +export def GL_RESCALE_NORMAL: gl_enum = 0x803A; +export def GL_CLAMP_TO_EDGE: gl_enum = 0x812F; +export def GL_MAX_ELEMENTS_VERTICES: gl_enum = 0x80E8; +export def GL_MAX_ELEMENTS_INDICES: gl_enum = 0x80E9; +export def GL_BGR: gl_enum = 0x80E0; +export def GL_BGRA: gl_enum = 0x80E1; +export def GL_UNSIGNED_BYTE_3_3_2: gl_enum = 0x8032; +export def GL_UNSIGNED_BYTE_2_3_3_REV: gl_enum = 0x8362; +export def GL_UNSIGNED_SHORT_5_6_5: gl_enum = 0x8363; +export def GL_UNSIGNED_SHORT_5_6_5_REV: gl_enum = 0x8364; +export def GL_UNSIGNED_SHORT_4_4_4_4: gl_enum = 0x8033; +export def GL_UNSIGNED_SHORT_4_4_4_4_REV: gl_enum = 0x8365; +export def GL_UNSIGNED_SHORT_5_5_5_1: gl_enum = 0x8034; +export def GL_UNSIGNED_SHORT_1_5_5_5_REV: gl_enum = 0x8366; +export def GL_UNSIGNED_INT_8_8_8_8: gl_enum = 0x8035; +export def GL_UNSIGNED_INT_8_8_8_8_REV: gl_enum = 0x8367; +export def GL_UNSIGNED_INT_10_10_10_2: gl_enum = 0x8036; +export def GL_UNSIGNED_INT_2_10_10_10_REV: gl_enum = 0x8368; +export def GL_LIGHT_MODEL_COLOR_CONTROL: gl_enum = 0x81F8; +export def GL_SINGLE_COLOR: gl_enum = 0x81F9; +export def GL_SEPARATE_SPECULAR_COLOR: gl_enum = 0x81FA; +export def GL_TEXTURE_MIN_LOD: gl_enum = 0x813A; +export def GL_TEXTURE_MAX_LOD: gl_enum = 0x813B; +export def GL_TEXTURE_BASE_LEVEL: gl_enum = 0x813C; +export def GL_TEXTURE_MAX_LEVEL: gl_enum = 0x813D; +export def GL_SMOOTH_POINT_SIZE_RANGE: gl_enum = 0x0B12; +export def GL_SMOOTH_POINT_SIZE_GRANULARITY: gl_enum = 0x0B13; +export def GL_SMOOTH_LINE_WIDTH_RANGE: gl_enum = 0x0B22; +export def GL_SMOOTH_LINE_WIDTH_GRANULARITY: gl_enum = 0x0B23; +export def GL_ALIASED_POINT_SIZE_RANGE: gl_enum = 0x846D; +export def GL_ALIASED_LINE_WIDTH_RANGE: gl_enum = 0x846E; +export def GL_PACK_SKIP_IMAGES: gl_enum = 0x806B; +export def GL_PACK_IMAGE_HEIGHT: gl_enum = 0x806C; +export def GL_UNPACK_SKIP_IMAGES: gl_enum = 0x806D; +export def GL_UNPACK_IMAGE_HEIGHT: gl_enum = 0x806E; +export def GL_TEXTURE_3D: gl_enum = 0x806F; +export def GL_PROXY_TEXTURE_3D: gl_enum = 0x8070; +export def GL_TEXTURE_DEPTH: gl_enum = 0x8071; +export def GL_TEXTURE_WRAP_R: gl_enum = 0x8072; +export def GL_MAX_3D_TEXTURE_SIZE: gl_enum = 0x8073; +export def GL_TEXTURE_BINDING_3D: gl_enum = 0x806A; + +// GL_ARB_imaging +export def GL_CONSTANT_COLOR: gl_enum = 0x8001; +export def GL_ONE_MINUS_CONSTANT_COLOR: gl_enum = 0x8002; +export def GL_CONSTANT_ALPHA: gl_enum = 0x8003; +export def GL_ONE_MINUS_CONSTANT_ALPHA: gl_enum = 0x8004; +export def GL_COLOR_TABLE: gl_enum = 0x80D0; +export def GL_POST_CONVOLUTION_COLOR_TABLE: gl_enum = 0x80D1; +export def GL_POST_COLOR_MATRIX_COLOR_TABLE: gl_enum = 0x80D2; +export def GL_PROXY_COLOR_TABLE: gl_enum = 0x80D3; +export def GL_PROXY_POST_CONVOLUTION_COLOR_TABLE: gl_enum = 0x80D4; +export def GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE: gl_enum = 0x80D5; +export def GL_COLOR_TABLE_SCALE: gl_enum = 0x80D6; +export def GL_COLOR_TABLE_BIAS: gl_enum = 0x80D7; +export def GL_COLOR_TABLE_FORMAT: gl_enum = 0x80D8; +export def GL_COLOR_TABLE_WIDTH: gl_enum = 0x80D9; +export def GL_COLOR_TABLE_RED_SIZE: gl_enum = 0x80DA; +export def GL_COLOR_TABLE_GREEN_SIZE: gl_enum = 0x80DB; +export def GL_COLOR_TABLE_BLUE_SIZE: gl_enum = 0x80DC; +export def GL_COLOR_TABLE_ALPHA_SIZE: gl_enum = 0x80DD; +export def GL_COLOR_TABLE_LUMINANCE_SIZE: gl_enum = 0x80DE; +export def GL_COLOR_TABLE_INTENSITY_SIZE: gl_enum = 0x80DF; +export def GL_CONVOLUTION_1D: gl_enum = 0x8010; +export def GL_CONVOLUTION_2D: gl_enum = 0x8011; +export def GL_SEPARABLE_2D: gl_enum = 0x8012; +export def GL_CONVOLUTION_BORDER_MODE: gl_enum = 0x8013; +export def GL_CONVOLUTION_FILTER_SCALE: gl_enum = 0x8014; +export def GL_CONVOLUTION_FILTER_BIAS: gl_enum = 0x8015; +export def GL_REDUCE: gl_enum = 0x8016; +export def GL_CONVOLUTION_FORMAT: gl_enum = 0x8017; +export def GL_CONVOLUTION_WIDTH: gl_enum = 0x8018; +export def GL_CONVOLUTION_HEIGHT: gl_enum = 0x8019; +export def GL_MAX_CONVOLUTION_WIDTH: gl_enum = 0x801A; +export def GL_MAX_CONVOLUTION_HEIGHT: gl_enum = 0x801B; +export def GL_POST_CONVOLUTION_RED_SCALE: gl_enum = 0x801C; +export def GL_POST_CONVOLUTION_GREEN_SCALE: gl_enum = 0x801D; +export def GL_POST_CONVOLUTION_BLUE_SCALE: gl_enum = 0x801E; +export def GL_POST_CONVOLUTION_ALPHA_SCALE: gl_enum = 0x801F; +export def GL_POST_CONVOLUTION_RED_BIAS: gl_enum = 0x8020; +export def GL_POST_CONVOLUTION_GREEN_BIAS: gl_enum = 0x8021; +export def GL_POST_CONVOLUTION_BLUE_BIAS: gl_enum = 0x8022; +export def GL_POST_CONVOLUTION_ALPHA_BIAS: gl_enum = 0x8023; +export def GL_CONSTANT_BORDER: gl_enum = 0x8151; +export def GL_REPLICATE_BORDER: gl_enum = 0x8153; +export def GL_CONVOLUTION_BORDER_COLOR: gl_enum = 0x8154; +export def GL_COLOR_MATRIX: gl_enum = 0x80B1; +export def GL_COLOR_MATRIX_STACK_DEPTH: gl_enum = 0x80B2; +export def GL_MAX_COLOR_MATRIX_STACK_DEPTH: gl_enum = 0x80B3; +export def GL_POST_COLOR_MATRIX_RED_SCALE: gl_enum = 0x80B4; +export def GL_POST_COLOR_MATRIX_GREEN_SCALE: gl_enum = 0x80B5; +export def GL_POST_COLOR_MATRIX_BLUE_SCALE: gl_enum = 0x80B6; +export def GL_POST_COLOR_MATRIX_ALPHA_SCALE: gl_enum = 0x80B7; +export def GL_POST_COLOR_MATRIX_RED_BIAS: gl_enum = 0x80B8; +export def GL_POST_COLOR_MATRIX_GREEN_BIAS: gl_enum = 0x80B9; +export def GL_POST_COLOR_MATRIX_BLUE_BIAS: gl_enum = 0x80BA; +export def GL_POST_COLOR_MATRIX_ALPHA_BIAS: gl_enum = 0x80BB; +export def GL_HISTOGRAM: gl_enum = 0x8024; +export def GL_PROXY_HISTOGRAM: gl_enum = 0x8025; +export def GL_HISTOGRAM_WIDTH: gl_enum = 0x8026; +export def GL_HISTOGRAM_FORMAT: gl_enum = 0x8027; +export def GL_HISTOGRAM_RED_SIZE: gl_enum = 0x8028; +export def GL_HISTOGRAM_GREEN_SIZE: gl_enum = 0x8029; +export def GL_HISTOGRAM_BLUE_SIZE: gl_enum = 0x802A; +export def GL_HISTOGRAM_ALPHA_SIZE: gl_enum = 0x802B; +export def GL_HISTOGRAM_LUMINANCE_SIZE: gl_enum = 0x802C; +export def GL_HISTOGRAM_SINK: gl_enum = 0x802D; +export def GL_MINMAX: gl_enum = 0x802E; +export def GL_MINMAX_FORMAT: gl_enum = 0x802F; +export def GL_MINMAX_SINK: gl_enum = 0x8030; +export def GL_TABLE_TOO_LARGE: gl_enum = 0x8031; +export def GL_BLEND_EQUATION: gl_enum = 0x8009; +export def GL_MIN: gl_enum = 0x8007; +export def GL_MAX: gl_enum = 0x8008; +export def GL_FUNC_ADD: gl_enum = 0x8006; +export def GL_FUNC_SUBTRACT: gl_enum = 0x800A; +export def GL_FUNC_REVERSE_SUBTRACT: gl_enum = 0x800B; +export def GL_BLEND_COLOR: gl_enum = 0x8005; + +// OpenGL 1.3 +// multitexture +export def GL_TEXTURE0: gl_enum = 0x84C0; +export def GL_TEXTURE1: gl_enum = 0x84C1; +export def GL_TEXTURE2: gl_enum = 0x84C2; +export def GL_TEXTURE3: gl_enum = 0x84C3; +export def GL_TEXTURE4: gl_enum = 0x84C4; +export def GL_TEXTURE5: gl_enum = 0x84C5; +export def GL_TEXTURE6: gl_enum = 0x84C6; +export def GL_TEXTURE7: gl_enum = 0x84C7; +export def GL_TEXTURE8: gl_enum = 0x84C8; +export def GL_TEXTURE9: gl_enum = 0x84C9; +export def GL_TEXTURE10: gl_enum = 0x84CA; +export def GL_TEXTURE11: gl_enum = 0x84CB; +export def GL_TEXTURE12: gl_enum = 0x84CC; +export def GL_TEXTURE13: gl_enum = 0x84CD; +export def GL_TEXTURE14: gl_enum = 0x84CE; +export def GL_TEXTURE15: gl_enum = 0x84CF; +export def GL_TEXTURE16: gl_enum = 0x84D0; +export def GL_TEXTURE17: gl_enum = 0x84D1; +export def GL_TEXTURE18: gl_enum = 0x84D2; +export def GL_TEXTURE19: gl_enum = 0x84D3; +export def GL_TEXTURE20: gl_enum = 0x84D4; +export def GL_TEXTURE21: gl_enum = 0x84D5; +export def GL_TEXTURE22: gl_enum = 0x84D6; +export def GL_TEXTURE23: gl_enum = 0x84D7; +export def GL_TEXTURE24: gl_enum = 0x84D8; +export def GL_TEXTURE25: gl_enum = 0x84D9; +export def GL_TEXTURE26: gl_enum = 0x84DA; +export def GL_TEXTURE27: gl_enum = 0x84DB; +export def GL_TEXTURE28: gl_enum = 0x84DC; +export def GL_TEXTURE29: gl_enum = 0x84DD; +export def GL_TEXTURE30: gl_enum = 0x84DE; +export def GL_TEXTURE31: gl_enum = 0x84DF; +export def GL_ACTIVE_TEXTURE: gl_enum = 0x84E0; +export def GL_CLIENT_ACTIVE_TEXTURE: gl_enum = 0x84E1; +export def GL_MAX_TEXTURE_UNITS: gl_enum = 0x84E2; +// texture_cube_map +export def GL_NORMAL_MAP: gl_enum = 0x8511; +export def GL_REFLECTION_MAP: gl_enum = 0x8512; +export def GL_TEXTURE_CUBE_MAP: gl_enum = 0x8513; +export def GL_TEXTURE_BINDING_CUBE_MAP: gl_enum = 0x8514; +export def GL_TEXTURE_CUBE_MAP_POSITIVE_X: gl_enum = 0x8515; +export def GL_TEXTURE_CUBE_MAP_NEGATIVE_X: gl_enum = 0x8516; +export def GL_TEXTURE_CUBE_MAP_POSITIVE_Y: gl_enum = 0x8517; +export def GL_TEXTURE_CUBE_MAP_NEGATIVE_Y: gl_enum = 0x8518; +export def GL_TEXTURE_CUBE_MAP_POSITIVE_Z: gl_enum = 0x8519; +export def GL_TEXTURE_CUBE_MAP_NEGATIVE_Z: gl_enum = 0x851A; +export def GL_PROXY_TEXTURE_CUBE_MAP: gl_enum = 0x851B; +export def GL_MAX_CUBE_MAP_TEXTURE_SIZE: gl_enum = 0x851C; +// texture_compression +export def GL_COMPRESSED_ALPHA: gl_enum = 0x84E9; +export def GL_COMPRESSED_LUMINANCE: gl_enum = 0x84EA; +export def GL_COMPRESSED_LUMINANCE_ALPHA: gl_enum = 0x84EB; +export def GL_COMPRESSED_INTENSITY: gl_enum = 0x84EC; +export def GL_COMPRESSED_RGB: gl_enum = 0x84ED; +export def GL_COMPRESSED_RGBA: gl_enum = 0x84EE; +export def GL_TEXTURE_COMPRESSION_HINT: gl_enum = 0x84EF; +export def GL_TEXTURE_COMPRESSED_IMAGE_SIZE: gl_enum = 0x86A0; +export def GL_TEXTURE_COMPRESSED: gl_enum = 0x86A1; +export def GL_NUM_COMPRESSED_TEXTURE_FORMATS: gl_enum = 0x86A2; +export def GL_COMPRESSED_TEXTURE_FORMATS: gl_enum = 0x86A3; +// multisample +export def GL_MULTISAMPLE: gl_enum = 0x809D; +export def GL_SAMPLE_ALPHA_TO_COVERAGE: gl_enum = 0x809E; +export def GL_SAMPLE_ALPHA_TO_ONE: gl_enum = 0x809F; +export def GL_SAMPLE_COVERAGE: gl_enum = 0x80A0; +export def GL_SAMPLE_BUFFERS: gl_enum = 0x80A8; +export def GL_SAMPLES: gl_enum = 0x80A9; +export def GL_SAMPLE_COVERAGE_VALUE: gl_enum = 0x80AA; +export def GL_SAMPLE_COVERAGE_INVERT: gl_enum = 0x80AB; +export def GL_MULTISAMPLE_BIT: gl_bitfield = 0x20000000; +// transpose_matrix +export def GL_TRANSPOSE_MODELVIEW_MATRIX: gl_enum = 0x84E3; +export def GL_TRANSPOSE_PROJECTION_MATRIX: gl_enum = 0x84E4; +export def GL_TRANSPOSE_TEXTURE_MATRIX: gl_enum = 0x84E5; +export def GL_TRANSPOSE_COLOR_MATRIX: gl_enum = 0x84E6; +// texture_env_combine +export def GL_COMBINE: gl_enum = 0x8570; +export def GL_COMBINE_RGB: gl_enum = 0x8571; +export def GL_COMBINE_ALPHA: gl_enum = 0x8572; +export def GL_SOURCE0_RGB: gl_enum = 0x8580; +export def GL_SOURCE1_RGB: gl_enum = 0x8581; +export def GL_SOURCE2_RGB: gl_enum = 0x8582; +export def GL_SOURCE0_ALPHA: gl_enum = 0x8588; +export def GL_SOURCE1_ALPHA: gl_enum = 0x8589; +export def GL_SOURCE2_ALPHA: gl_enum = 0x858A; +export def GL_OPERAND0_RGB: gl_enum = 0x8590; +export def GL_OPERAND1_RGB: gl_enum = 0x8591; +export def GL_OPERAND2_RGB: gl_enum = 0x8592; +export def GL_OPERAND0_ALPHA: gl_enum = 0x8598; +export def GL_OPERAND1_ALPHA: gl_enum = 0x8599; +export def GL_OPERAND2_ALPHA: gl_enum = 0x859A; +export def GL_RGB_SCALE: gl_enum = 0x8573; +export def GL_ADD_SIGNED: gl_enum = 0x8574; +export def GL_INTERPOLATE: gl_enum = 0x8575; +export def GL_SUBTRACT: gl_enum = 0x84E7; +export def GL_CONSTANT: gl_enum = 0x8576; +export def GL_PRIMARY_COLOR: gl_enum = 0x8577; +export def GL_PREVIOUS: gl_enum = 0x8578; +// texture_env_dot3; +export def GL_DOT3_RGB: gl_enum = 0x86AE; +export def GL_DOT3_RGBA: gl_enum = 0x86AF; +// texture_border_clamp +export def GL_CLAMP_TO_BORDER: gl_enum = 0x812D; + +// GL_ARB_multitexture (ARB extension 1 and OpenGL 1.2.1) +export def GL_TEXTURE0_ARB: gl_enum = 0x84C0; +export def GL_TEXTURE1_ARB: gl_enum = 0x84C1; +export def GL_TEXTURE2_ARB: gl_enum = 0x84C2; +export def GL_TEXTURE3_ARB: gl_enum = 0x84C3; +export def GL_TEXTURE4_ARB: gl_enum = 0x84C4; +export def GL_TEXTURE5_ARB: gl_enum = 0x84C5; +export def GL_TEXTURE6_ARB: gl_enum = 0x84C6; +export def GL_TEXTURE7_ARB: gl_enum = 0x84C7; +export def GL_TEXTURE8_ARB: gl_enum = 0x84C8; +export def GL_TEXTURE9_ARB: gl_enum = 0x84C9; +export def GL_TEXTURE10_ARB: gl_enum = 0x84CA; +export def GL_TEXTURE11_ARB: gl_enum = 0x84CB; +export def GL_TEXTURE12_ARB: gl_enum = 0x84CC; +export def GL_TEXTURE13_ARB: gl_enum = 0x84CD; +export def GL_TEXTURE14_ARB: gl_enum = 0x84CE; +export def GL_TEXTURE15_ARB: gl_enum = 0x84CF; +export def GL_TEXTURE16_ARB: gl_enum = 0x84D0; +export def GL_TEXTURE17_ARB: gl_enum = 0x84D1; +export def GL_TEXTURE18_ARB: gl_enum = 0x84D2; +export def GL_TEXTURE19_ARB: gl_enum = 0x84D3; +export def GL_TEXTURE20_ARB: gl_enum = 0x84D4; +export def GL_TEXTURE21_ARB: gl_enum = 0x84D5; +export def GL_TEXTURE22_ARB: gl_enum = 0x84D6; +export def GL_TEXTURE23_ARB: gl_enum = 0x84D7; +export def GL_TEXTURE24_ARB: gl_enum = 0x84D8; +export def GL_TEXTURE25_ARB: gl_enum = 0x84D9; +export def GL_TEXTURE26_ARB: gl_enum = 0x84DA; +export def GL_TEXTURE27_ARB: gl_enum = 0x84DB; +export def GL_TEXTURE28_ARB: gl_enum = 0x84DC; +export def GL_TEXTURE29_ARB: gl_enum = 0x84DD; +export def GL_TEXTURE30_ARB: gl_enum = 0x84DE; +export def GL_TEXTURE31_ARB: gl_enum = 0x84DF; +export def GL_ACTIVE_TEXTURE_ARB: gl_enum = 0x84E0; +export def GL_CLIENT_ACTIVE_TEXTURE_ARB: gl_enum = 0x84E1; +export def GL_MAX_TEXTURE_UNITS_ARB: gl_enum = 0x84E2; diff --git a/gl/gl.ha b/gl/gl.ha new file mode 100644 index 0000000..9331709 --- /dev/null +++ b/gl/gl.ha @@ -0,0 +1,25 @@ +export @symbol("glBegin") fn begin(mode: gl_enum) void; +export @symbol("glEnd") fn end() void; + +export @symbol("glVertex3f") fn vertex3f(x: f32, y: f32, z: f32) void; +export @symbol("glColor3f") fn color3f(red: f32, green: f32, blue: f32) void; + +export @symbol("glEnable") fn enable(cap: gl_enum) void; +export @symbol("glDisable") fn disable(cap: gl_enum) void; + +export @symbol("glFrontFace") fn front_face(mode: gl_enum) void; +export @symbol("glDepthFunc") fn depth_func(func: gl_enum) void; +export @symbol("glClear") fn clear(mask: gl_bitfield) void; +export @symbol("glClearDepth") fn clear_depth(depth: f64) void; +export @symbol("glClearColor") fn clear_color(red: f32, green: f32, + blue: f32, alpha: f32) void; + +export @symbol("glViewport") fn viewport(x: int, y: int, + width: size, height: size) void; +export @symbol("glLoadMatrixf") fn load_matrix_f32(m: *f32) void; +export @symbol("glMatrixMode") fn matrix_mode(mode: gl_enum) void; +export @symbol("glLoadIdentity") fn load_identity() void; +export @symbol("glPushMatrix") fn push_matrix() void; +export @symbol("glPopMatrix") fn pop_matrix() void; +export @symbol("glTranslatef") fn translatef(x: f32, y: f32, z: f32) void; +export @symbol("glRotatef") fn rotatef(angle: f32, x: f32, y: f32, z: f32) void; diff --git a/gl/types.ha b/gl/types.ha new file mode 100644 index 0000000..21165bc --- /dev/null +++ b/gl/types.ha @@ -0,0 +1,15 @@ +export type gl_enum = uint; +export type gl_bitfield = uint; +// export type gl_boolean = u8; +// export type gl_void = void; +// export type gl_byte = i8; +// export type gl_short = i16; +// export type gl_int = i32; +// export type gl_ubyte = u8; +// export type gl_ushort = u16; +// export type gl_uint = u32; +// export type gl_sizei = i32; +// export type gl_float = f32; +// export type gl_clampf = f32; +// export type gl_double = f64; +// export type gl_clampd = f64; -- 2.45.2