unit OpenGL;
//------------------------------------------------------------------------------
//
// Extended translation of the OpenGL header files (version 1.1) for Delphi 2.0+
//
//------------------------------------------------------------------------------
//
// This is a maintained interface unit for the use of OpenGL with Delphi and contains
// the translations for gl.h, glu.h and support functions prepared for the use
// of the SGI & Microsoft OpenGL DLLs. This unit contains bug fixes and enhancements
// of Borland's and other translations as well as support for extensions.
//
//------------------------------------------------------------------------------
//
// Usage: Simply take this unit in the uses clause of your project files, which
// need to call OpenGL. In addition, you could compile this unit and replace
// the original .dcu file (D3 only) in the lib folder of your Delphi installation.
// If you want to make a backup before, do so, but you won't need that. This
// unit has been tested with all Delphi versions from 2.0 upward and works
// very well.
// Since the DLLs OpenGL(32) and GLU(32) are linked dynamically with this unit
// you have to initialize it by calling InitOpenGL or InitOpenGLFromLibrary from
// anywhere in your project. The release of the DLLs happens automatically.
// This kind of linkage provides a better means to control what's in memory
// and prevents program crashes when the needed DLLs aren't available.
// NOTE: If you're going to use the SGI OpenGL DLLs you must ensure a specific
// order of Windows.pas and OpenGL.pas. This is a known problem with
// these DLLs and not a bug in this unit. The function which is concerned
// is SetPixelFormat. So always place Windows.pas in the uses clause
// of those units, which also use OpenGL (even if you don't need
// Windows.pas) and place it BEFORE OpenGL.pas! Since there are more
// conflicts between Windows.pas and other units (e.g. Windows.TBitmap
// and Graphics.TBitmap), you should always place Windows.pas at the
// very first place in your uses clauses.
//
// For your convenience I put some support routines in this unit, which are
// NOT part of the standard header files (gl.h and glu.h). For my convenience
// I've put the description of the other funtions also in the following list:
//
// function InitOpenGL: Boolean;
// Needed to load the OpenGL DLLs and all addresses of the standard functions.
// It first tries to load the SGI DLLs, since most of you won't have HW acceleration
// and these DLLs are faster without HW accel. than the MS DLLs. If loading of
// the SGI DLLs failed for some reason, the MS versions are used. If HW accel. is
// available then the SGI DLL automatically link to the MS DLLs, which are able
// to use this feature.
// In case OpenGL is already initialized, this function does nothing. No error
// is raised, if something goes wrong, but you need to inspect the result in order
// to know whether all went okay.
// RESULT: True if successful or already loaded, false otherwise
//
// function InitOpenGLFromLibrary(GL_Name, GLU_Name: String): Boolean;
// Same as InitOpenGL, but you can specify specific DLLs. Great if you want to
// use totally different DLLs. This function closes eventually loaded DLLs
// before it tries to open the newly given.
// RESULT: True if successful, false otherwise
//
// procedure CloseOpenGL;
// Unloads the OpenGL DLLs and sets all routine addresses to nil, including
// extensions. You can load and unload the DLLs as often as you like.
//
// procedure ClearExtensions;
// Sets all extension routines to nil. This is needed when you change the Pixelformat
// of your OpenGL window, since the availability of these routines changes from
// PixelFormat to Pixelformat (and also from SGI to MS DLLs).
//
// function CreateRenderingContext(DC: HDC; Options: TRCOptions; ColorDepth: Integer; StencilBits: Byte): HGLRC;
// Sets up a pixel format and creates a new rendering context depending of the
// given parameters:
// DC - the device context, for which the rc is to be created
// Options - special options for the context, they correspond to the flags
// of the PIXELFORMATDESCRIPTOR
// StencilBits - determines the size of the stencil buffer
// You can specify 0 for color and depth bits. The function will then automatically
// use the screen depth for both.
// RESULT: the newly created context or 0 if setup failed
//
// procedure ActivateRenderingContext(DC: HDC; RC: HGLRC);
// Makes RC in DC 'current' (wglMakeCurrent(..)) and loads all extension addresses
// and flags if necessary.
//
// procedure DeactivateRenderingContext;
// Counterpart to ActivateRenderingContext.
//
// procedure DestroyRenderingContext(RC: HGLRC);
// RC will be destroyed and must be recreated if you want to use it again. No
// additional functionality to wglDeleteContext yet.
//
// procedure ReadExtensions;
// Determines which extensions for the current rendering context are available and
// loads their addresses. This procedure is called from ActivateRenderingContext
// if a new pixel format is used, but you can safely call it from where you want
// to actualize those values (under the condition that a rendering context MUST be
// active).
//
// procedure ReadImplementationProperties;
// Determines global properties of the OpenGL DLL (currently the versions only)
// and needs to be used only once. It is called from CreateRenderingContext, when
// it is the very first call to this function (after loading the DLLs).
//
//------------------------------------------------------------------------------
//
// This translation is based on different sources:
//
// - first translation from Artemis Alliance Inc.
// - previous versions from Mike Lischke
// - Alexander Staubo
// - Borland OpenGL.pas (from Delphi3)
// - Microsoft and SGI OpenGL header files
// -
www.opengl.org,
www.sgi.com/OpenGL//
// Contact: Lischke@hotmail.com
//
// last change : 09. July 1998
//
// Download: Delphi Graphics Homepage <
http://www.bigfoot.com/~ungerik/>//------------------------------------------------------------------------------
{ ------ Original copyright notice by SGI -----
Copyright 1996 Silicon Graphics, Inc.
All Rights Reserved.
This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
the contents of this file may not be disclosed to third parties, copied or
duplicated in any form, in whole or in part, without the prior written
permission of Silicon Graphics, Inc.
RESTRICTED RIGHTS LEGEND:
Use, duplication or disclosure by the Government is subject to restrictions
as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
and Computer Software clause at DFARS 252.227-7013, and/or in similar or
successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
rights reserved under the Copyright Laws of the United States.}
interface
uses Windows, Geometry;
type TRCOptions = set of (opDoubleBuffered,opGDI,opStereo);
GLenum = UINT; PGLenum = ^GLenum;
GLboolean = UCHAR; PGLboolean = ^GLboolean;
GLbitfield = UINT; PGLbitfield = ^GLbitfield;
GLbyte = ShortInt; PGLbyte = ^GLbyte;
GLshort = SHORT; PGLshort = ^GLshort;
GLint = Integer; PGLint = ^GLint;
GLsizei = Integer; PGLsizei = ^GLsizei;
GLubyte = UCHAR; PGLubyte = ^GLubyte;
GLushort = Word; PGLushort = ^GLushort;
GLuint = UINT; PGLuint = ^GLuint;
GLfloat = Single; PGLfloat = ^GLfloat;
GLclampf = Single; PGLclampf = ^GLclampf;
GLdouble = Double; PGLdouble = ^GLdouble;
GLclampd = Double; PGLclampd = ^GLclampd;
//------------------------------------------------------------------------------
var GL_VERSION_1_0,
GL_VERSION_1_1,
GL_VERSION_1_2,
GLU_VERSION_1_1,
GLU_VERSION_1_2 : Boolean;
// Extensions (gl)
GL_EXT_abgr,
GL_EXT_bgra,
GL_EXT_packed_pixels,
GL_EXT_paletted_texture,
GL_EXT_vertex_array,
GL_SGI_compiled_vertex_array,
GL_SGI_cull_vertex,
GL_SGI_index_array_formats,
GL_SGI_index_func,
GL_SGI_index_material,
GL_SGI_index_texture,
GL_WIN_swap_hint,
GL_EXT_blend_color,
GL_EXT_blend_logic_op,
GL_EXT_blend_minmax,
GL_EXT_blend_subtract,
GL_EXT_convolution,
GL_EXT_copy_texture,
GL_EXT_histogram,
GL_EXT_polygon_offset,
GL_EXT_subtexture,
GL_EXT_texture,
GL_EXT_texture_object,
GL_EXT_texture3D,
GL_EXT_cmyka,
GL_EXT_rescale_normal,
GL_SGI_color_matrix,
GL_SGI_texture_color_table,
GL_SGI_color_table,
GL_EXT_clip_volume_hint,
GL_EXT_misc_attribute,
GL_EXT_scene_marker,
GL_EXT_shared_texture_palette,
// Extensions (glu)
GLU_EXT_TEXTURE,
GLU_EXT_object_space_tess,
GLU_EXT_nurbs_tessellator : Boolean;
//------------------------------------------------------------------------------
const // ********** GL generic constants **********
// AttribMask
GL_CURRENT_BIT = $00000001;
GL_POINT_BIT = $00000002;
GL_LINE_BIT = $00000004;
GL_POLYGON_BIT = $00000008;
GL_POLYGON_STIPPLE_BIT = $00000010;
GL_PIXEL_MODE_BIT = $00000020;
GL_LIGHTING_BIT = $00000040;
GL_FOG_BIT = $00000080;
GL_DEPTH_BUFFER_BIT = $00000100;
GL_ACCUM_BUFFER_BIT = $00000200;
GL_STENCIL_BUFFER_BIT = $00000400;
GL_VIEWPORT_BIT = $00000800;
GL_TRANSFORM_BIT = $00001000;
GL_ENABLE_BIT = $00002000;
GL_COLOR_BUFFER_BIT = $00004000;
GL_HINT_BIT = $00008000;
GL_EVAL_BIT = $00010000;
GL_LIST_BIT = $00020000;
GL_TEXTURE_BIT = $00040000;
GL_SCISSOR_BIT = $00080000;
GL_ALL_ATTRIB_BITS = $000FFFFF;
// ClientAttribMask
GL_CLIENT_PIXEL_STORE_BIT = $00000001;
GL_CLIENT_VERTEX_ARRAY_BIT = $00000002;
GL_CLIENT_ALL_ATTRIB_BITS = $FFFFFFFF;
// Boolean
GL_FALSE = 0;
GL_TRUE = 1;
// BeginMode
GL_POINTS = $0000;
GL_LINES = $0001;
GL_LINE_LOOP = $0002;
GL_LINE_STRIP = $0003;
GL_TRIANGLES = $0004;
GL_TRIANGLE_STRIP = $0005;
GL_TRIANGLE_FAN = $0006;
GL_QUADS = $0007;
GL_QUAD_STRIP = $0008;
GL_POLYGON = $0009;
// AccumOp
GL_ACCUM = $0100;
GL_LOAD = $0101;
GL_RETURN = $0102;
GL_MULT = $0103;
GL_ADD = $0104;
// AlphaFunction
GL_NEVER = $0200;
GL_LESS = $0201;
GL_EQUAL = $0202;
GL_LEQUAL = $0203;
GL_GREATER = $0204;
GL_NOTEQUAL = $0205;
GL_GEQUAL = $0206;
GL_ALWAYS = $0207;
// BlendingFactorDest
GL_ZERO = 0;
GL_ONE = 1;
GL_SRC_COLOR = $0300;
GL_ONE_MINUS_SRC_COLOR = $0301;
GL_SRC_ALPHA = $0302;
GL_ONE_MINUS_SRC_ALPHA = $0303;
GL_DST_ALPHA = $0304;
GL_ONE_MINUS_DST_ALPHA = $0305;
// BlendingFactorSrc
GL_DST_COLOR = $0306;
GL_ONE_MINUS_DST_COLOR = $0307;
GL_SRC_ALPHA_SATURATE = $0308;
// BlendingFactor (Src and Dest) GL 1.2 ARB imaging
GL_CONSTANT_COLOR = $8001;
GL_ONE_MINUS_CONSTANT_COLOR = $8002;
GL_CONSTANT_ALPHA = $8003;
GL_ONE_MINUS_CONSTANT_ALPHA = $8004;
// BlendEquation GL 1.2 ARB imaging
GL_FUNC_ADD = $8006;
GL_MIN = $8007;
GL_MAX = $8008;
GL_FUNC_SUBTRACT = $800A;
GL_FUNC_REVERSE_SUBTRACT = $800B;
// color table GL 1.2 ARB imaging
GL_COLOR_TABLE = $80D0;
GL_POST_CONVOLUTION_COLOR_TABLE = $80D1;
GL_POST_COLOR_MATRIX_COLOR_TABLE = $80D2;
GL_PROXY_COLOR_TABLE = $80D3;
GL_PROXY_POST_CONVOLUTION_COLOR_TABLE = $80D4;
GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE = $80D5;
GL_COLOR_TABLE_SCALE = $80D6;
GL_COLOR_TABLE_BIAS = $80D7;
GL_COLOR_TABLE_FORMAT = $80D8;
GL_COLOR_TABLE_WIDTH = $80D9;
GL_COLOR_TABLE_RED_SIZE = $80DA;
GL_COLOR_TABLE_GREEN_SIZE = $80DB;
GL_COLOR_TABLE_BLUE_SIZE = $80DC;
GL_COLOR_TABLE_ALPHA_SIZE = $80DD;
GL_COLOR_TABLE_LUMINANCE_SIZE = $80DE;
GL_COLOR_TABLE_INTENSITY_SIZE = $80DF;
// convolutions GL 1.2 ARB imaging
GL_CONVOLUTION_1D = $8010;
GL_CONVOLUTION_2D = $8011;
GL_SEPARABLE_2D = $8012;
GL_CONVOLUTION_BORDER_MODE = $8013;
GL_CONVOLUTION_FILTER_SCALE = $8014;
GL_CONVOLUTION_FILTER_BIAS = $8015;
GL_REDUCE = $8016;
GL_CONVOLUTION_FORMAT = $8017;
GL_CONVOLUTION_WIDTH = $8018;
GL_CONVOLUTION_HEIGHT = $8019;
GL_MAX_CONVOLUTION_WIDTH = $801A;
GL_MAX_CONVOLUTION_HEIGHT = $801B;
GL_POST_CONVOLUTION_RED_SCALE = $801C;
GL_POST_CONVOLUTION_GREEN_SCALE = $801D;
GL_POST_CONVOLUTION_BLUE_SCALE = $801E;
GL_POST_CONVOLUTION_ALPHA_SCALE = $801F;
GL_POST_CONVOLUTION_RED_BIAS = $8020;
GL_POST_CONVOLUTION_GREEN_BIAS = $8021;
GL_POST_CONVOLUTION_BLUE_BIAS = $8022;
GL_POST_CONVOLUTION_ALPHA_BIAS = $8023;
// histogram GL 1.2 ARB imaging
GL_HISTOGRAM = $8024;
GL_PROXY_HISTOGRAM = $8025;
GL_HISTOGRAM_WIDTH = $8026;
GL_HISTOGRAM_FORMAT = $8027;
GL_HISTOGRAM_RED_SIZE = $8028;
GL_HISTOGRAM_GREEN_SIZE = $8029;
GL_HISTOGRAM_BLUE_SIZE = $802A;
GL_HISTOGRAM_ALPHA_SIZE = $802B;
GL_HISTOGRAM_LUMINANCE_SIZE = $802C;
GL_HISTOGRAM_SINK = $802D;
GL_MINMAX = $802E;
GL_MINMAX_FORMAT = $802F;
GL_MINMAX_SINK = $8030;
// DrawBufferMode
GL_NONE = 0;
GL_FRONT_LEFT = $0400;
GL_FRONT_RIGHT = $0401;
GL_BACK_LEFT = $0402;
GL_BACK_RIGHT = $0403;
GL_FRONT = $0404;
GL_BACK = $0405;
GL_LEFT = $0406;
GL_RIGHT = $0407;
GL_FRONT_AND_BACK = $0408;
GL_AUX0 = $0409;
GL_AUX1 = $040A;
GL_AUX2 = $040B;
GL_AUX3 = $040C;
// ErrorCode
GL_NO_ERROR = 0;
GL_INVALID_ENUM = $0500;
GL_INVALID_VALUE = $0501;
GL_INVALID_OPERATION = $0502;
GL_STACK_OVERFLOW = $0503;
GL_STACK_UNDERFLOW = $0504;
GL_OUT_OF_MEMORY = $0505;
// FeedbackType
GL_2D = $0600;
GL_3D = $0601;
GL_3D_COLOR = $0602;
GL_3D_COLOR_TEXTURE = $0603;
GL_4D_COLOR_TEXTURE = $0604;
// FeedBackToken
GL_PASS_THROUGH_TOKEN = $0700;
GL_POINT_TOKEN = $0701;
GL_LINE_TOKEN = $0702;
GL_POLYGON_TOKEN = $0703;
GL_BITMAP_TOKEN = $0704;
GL_DRAW_PIXEL_TOKEN = $0705;
GL_COPY_PIXEL_TOKEN = $0706;
GL_LINE_RESET_TOKEN = $0707;
// FogMode
GL_EXP = $0800;
GL_EXP2 = $0801;
// FrontFaceDirection
GL_CW = $0900;
GL_CCW = $0901;
// GetMapQuery
GL_COEFF = $0A00;
GL_ORDER = $0A01;
GL_DOMAIN = $0A02;
// GetPixelMap
GL_PIXEL_MAP_I_TO_I = $0C70;
GL_PIXEL_MAP_S_TO_S = $0C71;
GL_PIXEL_MAP_I_TO_R = $0C72;
GL_PIXEL_MAP_I_TO_G = $0C73;
GL_PIXEL_MAP_I_TO_B = $0C74;
GL_PIXEL_MAP_I_TO_A = $0C75;
GL_PIXEL_MAP_R_TO_R = $0C76;
GL_PIXEL_MAP_G_TO_G = $0C77;
GL_PIXEL_MAP_B_TO_B = $0C78;
GL_PIXEL_MAP_A_TO_A = $0C79;
// GetPointervPName
GL_VERTEX_ARRAY_POINTER = $808E;
GL_NORMAL_ARRAY_POINTER = $808F;
GL_COLOR_ARRAY_POINTER = $8090;
GL_INDEX_ARRAY_POINTER = $8091;
GL_TEXTURE_COORD_ARRAY_POINTER = $8092;
GL_EDGE_FLAG_ARRAY_POINTER = $8093;
// GetPName
GL_CURRENT_COLOR = $0B00;
GL_CURRENT_INDEX = $0B01;
GL_CURRENT_NORMAL = $0B02;
GL_CURRENT_TEXTURE_COORDS = $0B03;
GL_CURRENT_RASTER_COLOR = $0B04;
GL_CURRENT_RASTER_INDEX = $0B05;
GL_CURRENT_RASTER_TEXTURE_COORDS = $0B06;
GL_CURRENT_RASTER_POSITION = $0B07;
GL_CURRENT_RASTER_POSITION_VALID = $0B08;
GL_CURRENT_RASTER_DISTANCE = $0B09;
GL_POINT_SMOOTH = $0B10;
GL_POINT_SIZE = $0B11;
GL_POINT_SIZE_RANGE = $0B12;
GL_POINT_SIZE_GRANULARITY = $0B13;
GL_LINE_SMOOTH = $0B20;
GL_LINE_WIDTH = $0B21;
GL_LINE_WIDTH_RANGE = $0B22;
GL_LINE_WIDTH_GRANULARITY = $0B23;
GL_LINE_STIPPLE = $0B24;
GL_LINE_STIPPLE_PATTERN = $0B25;
GL_LINE_STIPPLE_REPEAT = $0B26;
GL_LIST_MODE = $0B30;
GL_MAX_LIST_NESTING = $0B31;
GL_LIST_BASE = $0B32;
GL_LIST_INDEX = $0B33;
GL_POLYGON_MODE = $0B40;
GL_POLYGON_SMOOTH = $0B41;
GL_POLYGON_STIPPLE = $0B42;
GL_EDGE_FLAG = $0B43;
GL_CULL_FACE = $0B44;
GL_CULL_FACE_MODE = $0B45;
GL_FRONT_FACE = $0B46;
GL_LIGHTING = $0B50;
GL_LIGHT_MODEL_LOCAL_VIEWER = $0B51;
GL_LIGHT_MODEL_TWO_SIDE = $0B52;
GL_LIGHT_MODEL_AMBIENT = $0B53;
GL_LIGHT_MODEL_COLOR_CONTROL = $81F8; // GL 1.2
GL_SINGLE_COLOR = $81F9; // GL 1.2
GL_SEPARATE_SPECULAR_COLOR = $81FA; // GL 1.2
GL_SHADE_MODEL = $0B54;
GL_COLOR_MATERIAL_FACE = $0B55;
GL_COLOR_MATERIAL_PARAMETER = $0B56;
GL_COLOR_MATERIAL = $0B57;
GL_FOG = $0B60;
GL_FOG_INDEX = $0B61;
GL_FOG_DENSITY = $0B62;
GL_FOG_START = $0B63;
GL_FOG_END = $0B64;
GL_FOG_MODE = $0B65;
GL_FOG_COLOR = $0B66;
GL_DEPTH_RANGE = $0B70;
GL_DEPTH_TEST = $0B71;
GL_DEPTH_WRITEMASK = $0B72;
GL_DEPTH_CLEAR_VALUE = $0B73;
GL_DEPTH_FUNC = $0B74;
GL_ACCUM_CLEAR_VALUE = $0B80;
GL_STENCIL_TEST = $0B90;
GL_STENCIL_CLEAR_VALUE = $0B91;
GL_STENCIL_FUNC = $0B92;
GL_STENCIL_VALUE_MASK = $0B93;
GL_STENCIL_FAIL = $0B94;
GL_STENCIL_PASS_DEPTH_FAIL = $0B95;
GL_STENCIL_PASS_DEPTH_PASS = $0B96;
GL_STENCIL_REF = $0B97;
GL_STENCIL_WRITEMASK = $0B98;
GL_MATRIX_MODE = $0BA0;
GL_NORMALIZE = $0BA1;
GL_VIEWPORT = $0BA2;
GL_MODELVIEW_STACK_DEPTH = $0BA3;
GL_PROJECTION_STACK_DEPTH = $0BA4;
GL_TEXTURE_STACK_DEPTH = $0BA5;
GL_MODELVIEW_MATRIX = $0BA6;
GL_PROJECTION_MATRIX = $0BA7;
GL_TEXTURE_MATRIX = $0BA8;
GL_ATTRIB_STACK_DEPTH = $0BB0;
GL_CLIENT_ATTRIB_STACK_DEPTH = $0BB1;
GL_ALPHA_TEST = $0BC0;
GL_ALPHA_TEST_FUNC = $0BC1;
GL_ALPHA_TEST_REF = $0BC2;
GL_DITHER = $0BD0;
GL_BLEND_DST = $0BE0;
GL_BLEND_SRC = $0BE1;
GL_BLEND = $0BE2;
GL_BLEND_COLOR = $8005; // GL 1.2 ARB imaging
GL_LOGIC_OP_MODE = $0BF0;
GL_INDEX_LOGIC_OP = $0BF1;
GL_LOGIC_OP = $0BF1;
GL_COLOR_LOGIC_OP = $0BF2;
GL_AUX_BUFFERS = $0C00;
GL_DRAW_BUFFER = $0C01;
GL_READ_BUFFER = $0C02;
GL_SCISSOR_BOX = $0C10;
GL_SCISSOR_TEST = $0C11;
GL_INDEX_CLEAR_VALUE = $0C20;
GL_INDEX_WRITEMASK = $0C21;
GL_COLOR_CLEAR_VALUE = $0C22;
GL_COLOR_WRITEMASK = $0C23;
GL_INDEX_MODE = $0C30;
GL_RGBA_MODE = $0C31;
GL_DOUBLEBUFFER = $0C32;
GL_STEREO = $0C33;
GL_RENDER_MODE = $0C40;
GL_PERSPECTIVE_CORRECTION_HINT = $0C50;
GL_POINT_SMOOTH_HINT = $0C51;
GL_LINE_SMOOTH_HINT = $0C52;
GL_POLYGON_SMOOTH_HINT = $0C53;
GL_FOG_HINT = $0C54;
GL_TEXTURE_GEN_S = $0C60;
GL_TEXTURE_GEN_T = $0C61;
GL_TEXTURE_GEN_R = $0C62;
GL_TEXTURE_GEN_Q = $0C63;
GL_PIXEL_MAP_I_TO_I_SIZE = $0CB0;
GL_PIXEL_MAP_S_TO_S_SIZE = $0CB1;
GL_PIXEL_MAP_I_TO_R_SIZE = $0CB2;
GL_PIXEL_MAP_I_TO_G_SIZE = $0CB3;
GL_PIXEL_MAP_I_TO_B_SIZE = $0CB4;
GL_PIXEL_MAP_I_TO_A_SIZE = $0CB5;
GL_PIXEL_MAP_R_TO_R_SIZE = $0CB6;
GL_PIXEL_MAP_G_TO_G_SIZE = $0CB7;
GL_PIXEL_MAP_B_TO_B_SIZE = $0CB8;
GL_PIXEL_MAP_A_TO_A_SIZE = $0CB9;
GL_UNPACK_SWAP_BYTES = $0CF0;
GL_UNPACK_LSB_FIRST = $0CF1;
GL_UNPACK_ROW_LENGTH = $0CF2;
GL_UNPACK_SKIP_ROWS = $0CF3;
GL_UNPACK_SKIP_PIXELS = $0CF4;
GL_UNPACK_ALIGNMENT = $0CF5;
GL_PACK_SWAP_BYTES = $0D00;
GL_PACK_LSB_FIRST = $0D01;
GL_PACK_ROW_LENGTH = $0D02;
GL_PACK_SKIP_ROWS = $0D03;
GL_PACK_SKIP_PIXELS = $0D04;
GL_PACK_ALIGNMENT = $0D05;
GL_PACK_SKIP_IMAGES = $806B; // GL 1.2
GL_PACK_IMAGE_HEIGHT = $806C; // GL 1.2
GL_UNPACK_SKIP_IMAGES = $806D; // GL 1.2
GL_UNPACK_IMAGE_HEIGHT = $806E; // GL 1.2
GL_MAP_COLOR = $0D10;
GL_MAP_STENCIL = $0D11;
GL_INDEX_SHIFT = $0D12;
GL_INDEX_OFFSET = $0D13;
GL_RED_SCALE = $0D14;
GL_RED_BIAS = $0D15;
GL_ZOOM_X = $0D16;
GL_ZOOM_Y = $0D17;
GL_GREEN_SCALE = $0D18;
GL_GREEN_BIAS = $0D19;
GL_BLUE_SCALE = $0D1A;
GL_BLUE_BIAS = $0D1B;
GL_ALPHA_SCALE = $0D1C;
GL_ALPHA_BIAS = $0D1D;
GL_DEPTH_SCALE = $0D1E;
GL_DEPTH_BIAS = $0D1F;
GL_MAX_EVAL_ORDER = $0D30;
GL_MAX_LIGHTS = $0D31;
GL_MAX_CLIP_PLANES = $0D32;
GL_MAX_TEXTURE_SIZE = $0D33;
GL_MAX_3D_TEXTURE_SIZE = $8073; // GL 1.2
GL_MAX_PIXEL_MAP_TABLE = $0D34;
GL_MAX_ATTRIB_STACK_DEPTH = $0D35;
GL_MAX_MODELVIEW_STACK_DEPTH = $0D36;
GL_MAX_NAME_STACK_DEPTH = $0D37;
GL_MAX_PROJECTION_STACK_DEPTH = $0D38;
GL_MAX_TEXTURE_STACK_DEPTH = $0D39;
GL_MAX_VIEWPORT_DIMS = $0D3A;
GL_MAX_CLIENT_ATTRIB_STACK_DEPTH = $0D3B;
GL_MAX_ELEMENTS_VERTICES = 0; // not yet defined; // GL 1.2
GL_MAX_ELEMENTS_INDICES = 0; // not yet defined; // GL 1.2
GL_RESCALE_NORMAL = 0; // not yet defined; // GL 1.2
GL_SUBPIXEL_BITS = $0D50;
GL_INDEX_BITS = $0D51;
GL_RED_BITS = $0D52;
GL_GREEN_BITS = $0D53;
GL_BLUE_BITS = $0D54;
GL_ALPHA_BITS = $0D55;
GL_DEPTH_BITS = $0D56;
GL_STENCIL_BITS = $0D57;
GL_ACCUM_RED_BITS = $0D58;
GL_ACCUM_GREEN_BITS = $0D59;
GL_ACCUM_BLUE_BITS = $0D5A;
GL_ACCUM_ALPHA_BITS = $0D5B;
GL_NAME_STACK_DEPTH = $0D70;
GL_AUTO_NORMAL = $0D80;
GL_MAP1_COLOR_4 = $0D90;
GL_MAP1_INDEX = $0D91;
GL_MAP1_NORMAL = $0D92;
GL_MAP1_TEXTURE_COORD_1 = $0D93;
GL_MAP1_TEXTURE_COORD_2 = $0D94;
GL_MAP1_TEXTURE_COORD_3 = $0D95;
GL_MAP1_TEXTURE_COORD_4 = $0D96;
GL_MAP1_VERTEX_3 = $0D97;
GL_MAP1_VERTEX_4 = $0D98;
GL_MAP2_COLOR_4 = $0DB0;
GL_MAP2_INDEX = $0DB1;
GL_MAP2_NORMAL = $0DB2;
GL_MAP2_TEXTURE_COORD_1 = $0DB3;
GL_MAP2_TEXTURE_COORD_2 = $0DB4;
GL_MAP2_TEXTURE_COORD_3 = $0DB5;
GL_MAP2_TEXTURE_COORD_4 = $0DB6;
GL_MAP2_VERTEX_3 = $0DB7;
GL_MAP2_VERTEX_4 = $0DB8;
GL_MAP1_GRID_DOMAIN = $0DD0;
GL_MAP1_GRID_SEGMENTS = $0DD1;
GL_MAP2_GRID_DOMAIN = $0DD2;
GL_MAP2_GRID_SEGMENTS = $0DD3;
GL_TEXTURE_1D = $0DE0;
GL_TEXTURE_2D = $0DE1;
GL_TEXTURE_3D = $806F; // GL 1.2
GL_FEEDBACK_BUFFER_POINTER = $0DF0;
GL_FEEDBACK_BUFFER_SIZE = $0DF1;
GL_FEEDBACK_BUFFER_TYPE = $0DF2;
GL_SELECTION_BUFFER_POINTER = $0DF3;
GL_SELECTION_BUFFER_SIZE = $0DF4;
GL_POLYGON_OFFSET_UNITS = $2A00;
GL_POLYGON_OFFSET_POINT = $2A01;
GL_POLYGON_OFFSET_LINE = $2A02;
GL_POLYGON_OFFSET_FILL = $8037;
GL_POLYGON_OFFSET_FACTOR = $8038;
GL_TEXTURE_BINDING_1D = $8068;
GL_TEXTURE_BINDING_2D = $8069;
GL_VERTEX_ARRAY = $8074;
GL_NORMAL_ARRAY = $8075;
GL_COLOR_ARRAY = $8076;
GL_INDEX_ARRAY = $8077;
GL_TEXTURE_COORD_ARRAY = $8078;
GL_EDGE_FLAG_ARRAY = $8079;
GL_VERTEX_ARRAY_SIZE = $807A;
GL_VERTEX_ARRAY_TYPE = $807B;
GL_VERTEX_ARRAY_STRIDE = $807C;
GL_NORMAL_ARRAY_TYPE = $807E;
GL_NORMAL_ARRAY_STRIDE = $807F;
GL_COLOR_ARRAY_SIZE = $8081;
GL_COLOR_ARRAY_TYPE = $8082;
GL_COLOR_ARRAY_STRIDE = $8083;
GL_INDEX_ARRAY_TYPE = $8085;
GL_INDEX_ARRAY_STRIDE = $8086;
GL_TEXTURE_COORD_ARRAY_SIZE = $8088;
GL_TEXTURE_COORD_ARRAY_TYPE = $8089;
GL_TEXTURE_COORD_ARRAY_STRIDE = $808A;
GL_EDGE_FLAG_ARRAY_STRIDE = $808C;
GL_COLOR_MATRIX = $80B1; // GL 1.2 ARB imaging
GL_COLOR_MATRIX_STACK_DEPTH = $80B2; // GL 1.2 ARB imaging
GL_MAX_COLOR_MATRIX_STACK_DEPTH = $80B3; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_RED_SCALE = $80B4; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_GREEN_SCALE = $80B5; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_BLUE_SCALE = $80B6; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_ALPHA_SCALE = $80B7; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_RED_BIAS = $80B8; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_GREEN_BIAS = $80B9; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_BLUE_BIAS = $80BA; // GL 1.2 ARB imaging
GL_POST_COLOR_MATRIX_ALPHA_BIAS = $80BB; // GL 1.2 ARB imaging
// GetTextureParameter
GL_TEXTURE_WIDTH = $1000;
GL_TEXTURE_HEIGHT = $1001;
GL_TEXTURE_INTERNAL_FORMAT = $1003;
GL_TEXTURE_COMPONENTS = $1003;
GL_TEXTURE_BORDER_COLOR = $1004;
GL_TEXTURE_BORDER = $1005;
GL_TEXTURE_RED_SIZE = $805C;
GL_TEXTURE_GREEN_SIZE = $805D;
GL_TEXTURE_BLUE_SIZE = $805E;
GL_TEXTURE_ALPHA_SIZE = $805F;
GL_TEXTURE_LUMINANCE_SIZE = $8060;
GL_TEXTURE_INTENSITY_SIZE = $8061;
GL_TEXTURE_PRIORITY = $8066;
GL_TEXTURE_RESIDENT = $8067;
GL_BGR = $80E0; // v 1.2
GL_BGRA = $80E1; // v 1.2
// HintMode
GL_DONT_CARE = $1100;
GL_FASTEST = $1101;
GL_NICEST = $1102;
// LightParameter
GL_AMBIENT = $1200;
GL_DIFFUSE = $1201;
GL_SPECULAR = $1202;
GL_POSITION = $1203;
GL_SPOT_DIRECTION = $1204;
GL_SPOT_EXPONENT = $1205;
GL_SPOT_CUTOFF = $1206;
GL_CONSTANT_ATTENUATION = $1207;
GL_LINEAR_ATTENUATION = $1208;
GL_QUADRATIC_ATTENUATION = $1209;
// ListMode
GL_COMPILE = $1300;
GL_COMPILE_AND_EXECUTE = $1301;
// DataType
GL_BYTE = $1400;
GL_UNSIGNED_BYTE = $1401;
GL_SHORT = $1402;
GL_UNSIGNED_SHORT = $1403;
GL_INT = $1404;
GL_UNSIGNED_INT = $1405;
GL_FLOAT = $1406;
GL_2_BYTES = $1407;
GL_3_BYTES = $1408;
GL_4_BYTES = $1409;
GL_DOUBLE = $140A;
GL_DOUBLE_EXT = $140A;
// LogicOp
GL_CLEAR = $1500;
GL_AND = $1501;
GL_AND_REVERSE = $1502;
GL_COPY = $1503;
GL_AND_INVERTED = $1504;
GL_NOOP = $1505;
GL_XOR = $1506;
GL_OR = $1507;
GL_NOR = $1508;
GL_EQUIV = $1509;
GL_INVERT = $150A;
GL_OR_REVERSE = $150B;
GL_COPY_INVERTED = $150C;
GL_OR_INVERTED = $150D;
GL_NAND = $150E;
GL_SET = $150F;
// MaterialParameter
GL_EMISSION = $1600;
GL_SHININESS = $1601;
GL_AMBIENT_AND_DIFFUSE = $1602;
GL_COLOR_INDEXES = $1603;
// MatrixMode
GL_MODELVIEW = $1700;
GL_PROJECTION = $1701;
GL_TEXTURE = $1702;
// PixelCopyType
GL_COLOR = $1800;
GL_DEPTH = $1801;
GL_STENCIL = $1802;
// PixelFormat
GL_COLOR_INDEX = $1900;
GL_STENCIL_INDEX = $1901;
GL_DEPTH_COMPONENT = $1902;
GL_RED = $1903;
GL_GREEN = $1904;
GL_BLUE = $1905;
GL_ALPHA = $1906;
GL_RGB = $1907;
GL_RGBA = $1908;
GL_LUMINANCE = $1909;
GL_LUMINANCE_ALPHA = $190A;
// PixelType
GL_BITMAP = $1A00;
// PolygonMode
GL_POINT = $1B00;
GL_LINE = $1B01;
GL_FILL = $1B02;
// RenderingMode
GL_RENDER = $1C00;
GL_FEEDBACK = $1C01;
GL_SELECT = $1C02;
// ShadingModel
GL_FLAT = $1D00;
GL_SMOOTH = $1D01;
// StencilOp
GL_KEEP = $1E00;
GL_REPLACE = $1E01;
GL_INCR = $1E02;
GL_DECR = $1E03;
// StringName
GL_VENDOR = $1F00;
GL_RENDERER = $1F01;
GL_VERSION = $1F02;
GL_EXTENSIONS = $1F03;
// TextureCoordName
GL_S = $2000;
GL_T = $2001;
GL_R = $2002;
GL_Q = $2003;
// TextureEnvMode
GL_MODULATE = $2100;
GL_DECAL = $2101;
// TextureEnvParameter
GL_TEXTURE_ENV_MODE = $2200;
GL_TEXTURE_ENV_COLOR = $2201;
// TextureEnvTarget
GL_TEXTURE_ENV = $2300;
// TextureGenMode
GL_EYE_LINEAR = $2400;
GL_OBJECT_LINEAR = $2401;
GL_SPHERE_MAP = $2402;
// TextureGenParameter
GL_TEXTURE_GEN_MODE = $2500;
GL_OBJECT_PLANE = $2501;
GL_EYE_PLANE = $2502;
// TextureMagFilter
GL_NEAREST = $2600;
GL_LINEAR = $2601;
// TextureMinFilter
GL_NEAREST_MIPMAP_NEAREST = $2700;
GL_LINEAR_MIPMAP_NEAREST = $2701;
GL_NEAREST_MIPMAP_LINEAR = $2702;
GL_LINEAR_MIPMAP_LINEAR = $2703;
// TextureParameterName
GL_TEXTURE_MAG_FILTER = $2800;
GL_TEXTURE_MIN_FILTER = $2801;
GL_TEXTURE_WRAP_R = $8072; // GL 1.2
GL_TEXTURE_WRAP_S = $2802;
GL_TEXTURE_WRAP_T = $2803;
GL_CLAMP_TO_EDGE = $812F; // GL 1.2
GL_TEXTURE_MIN_LOD = $813A; // GL 1.2
GL_TEXTURE_MAX_LOD = $813B; // GL 1.2
GL_TEXTURE_BASE_LEVEL = $813C; // GL 1.2
GL_TEXTURE_MAX_LEVEL = $813D; // GL 1.2
GL_TEXTURE_DEPTH = $8071; // GL 1.2
// TextureTarget
GL_PROXY_TEXTURE_1D = $8063;
GL_PROXY_TEXTURE_2D = $8064;
GL_PROXY_TEXTURE_3D = $8070; // GL 1.2
// TextureWrapMode
GL_CLAMP = $2900;
GL_REPEAT = $2901;
// PixelInternalFormat
GL_R3_G3_B2 = $2A10;
GL_ALPHA4 = $803B;
GL_ALPHA8 = $803C;
GL_ALPHA12 = $803D;
GL_ALPHA16 = $803E;
GL_LUMINANCE4 = $803F;
GL_LUMINANCE8 = $8040;
GL_LUMINANCE12 = $8041;
GL_LUMINANCE16 = $8042;
GL_LUMINANCE4_ALPHA4 = $8043;
GL_LUMINANCE6_ALPHA2 = $8044;
GL_LUMINANCE8_ALPHA8 = $8045;
GL_LUMINANCE12_ALPHA4 = $8046;
GL_LUMINANCE12_ALPHA12 = $8047;
GL_LUMINANCE16_ALPHA16 = $8048;
GL_INTENSITY = $8049;
GL_INTENSITY4 = $804A;
GL_INTENSITY8 = $804B;
GL_INTENSITY12 = $804C;
GL_INTENSITY16 = $804D;
GL_RGB4 = $804F;
GL_RGB5 = $8050;
GL_RGB8 = $8051;
GL_RGB10 = $8052;
GL_RGB12 = $8053;
GL_RGB16 = $8054;
GL_RGBA2 = $8055;
GL_RGBA4 = $8056;
GL_RGB5_A1 = $8057;
GL_RGBA8 = $8058;
GL_RGB10_A2 = $8059;
GL_RGBA12 = $805A;
GL_RGBA16 = $805B;
UNSIGNED_BYTE_3_3_2 = $8032; // GL 1.2
UNSIGNED_BYTE_2_3_3_REV = $8362; // GL 1.2
UNSIGNED_SHORT_5_6_5 = $8363; // GL 1.2
UNSIGNED_SHORT_5_6_5_REV = $8364; // GL 1.2
UNSIGNED_SHORT_4_4_4_4 = $8033; // GL 1.2
UNSIGNED_SHORT_4_4_4_4_REV = $8365; // GL 1.2
UNSIGNED_SHORT_5_5_5_1 = $8034; // GL 1.2
UNSIGNED_SHORT_1_5_5_5_REV = $8366; // GL 1.2
UNSIGNED_INT_8_8_8_8 = $8035; // GL 1.2
UNSIGNED_INT_8_8_8_8_REV = $8367; // GL 1.2
UNSIGNED_INT_10_10_10_2 = $8036; // GL 1.2
UNSIGNED_INT_2_10_10_10_REV = $8368; // GL 1.2
// InterleavedArrayFormat
GL_V2F = $2A20;
GL_V3F = $2A21;
GL_C4UB_V2F = $2A22;
GL_C4UB_V3F = $2A23;
GL_C3F_V3F = $2A24;
GL_N3F_V3F = $2A25;
GL_C4F_N3F_V3F = $2A26;
GL_T2F_V3F = $2A27;
GL_T4F_V4F = $2A28;
GL_T2F_C4UB_V3F = $2A29;
GL_T2F_C3F_V3F = $2A2A;
GL_T2F_N3F_V3F = $2A2B;
GL_T2F_C4F_N3F_V3F = $2A2C;
GL_T4F_C4F_N3F_V4F = $2A2D;
// ClipPlaneName
GL_CLIP_PLANE0 = $3000;
GL_CLIP_PLANE1 = $3001;
GL_CLIP_PLANE2 = $3002;
GL_CLIP_PLANE3 = $3003;
GL_CLIP_PLANE4 = $3004;
GL_CLIP_PLANE5 = $3005;
// LightName
GL_LIGHT0 = $4000;
GL_LIGHT1 = $4001;
GL_LIGHT2 = $4002;
GL_LIGHT3 = $4003;
GL_LIGHT4 = $4004;
GL_LIGHT5 = $4005;
GL_LIGHT6 = $4006;
GL_LIGHT7 = $4007;
// ----- extensions enumerants -----
// EXT_abgr
GL_ABGR_EXT = $8000;
// EXT_packed_pixels
GL_UNSIGNED_BYTE_3_3_2_EXT = $8032;
GL_UNSIGNED_SHORT_4_4_4_4_EXT = $8033;
GL_UNSIGNED_SHORT_5_5_5_1_EXT = $8034;
GL_UNSIGNED_INT_8_8_8_8_EXT = $8035;
GL_UNSIGNED_INT_10_10_10_2_EXT = $8036;
// EXT_vertex_array
GL_VERTEX_ARRAY_EXT = $8074;
GL_NORMAL_ARRAY_EXT = $8075;
GL_COLOR_ARRAY_EXT = $8076;
GL_INDEX_ARRAY_EXT = $8077;
GL_TEXTURE_COORD_ARRAY_EXT = $8078;
GL_EDGE_FLAG_ARRAY_EXT = $8079;
GL_VERTEX_ARRAY_SIZE_EXT = $807A;
GL_VERTEX_ARRAY_TYPE_EXT = $807B;
GL_VERTEX_ARRAY_STRIDE_EXT = $807C;
GL_VERTEX_ARRAY_COUNT_EXT = $807D;
GL_NORMAL_ARRAY_TYPE_EXT = $807E;
GL_NORMAL_ARRAY_STRIDE_EXT = $807F;
GL_NORMAL_ARRAY_COUNT_EXT = $8080;
GL_COLOR_ARRAY_SIZE_EXT = $8081;
GL_COLOR_ARRAY_TYPE_EXT = $8082;
GL_COLOR_ARRAY_STRIDE_EXT = $8083;
GL_COLOR_ARRAY_COUNT_EXT = $8084;
GL_INDEX_ARRAY_TYPE_EXT = $8085;
GL_INDEX_ARRAY_STRIDE_EXT = $8086;
GL_INDEX_ARRAY_COUNT_EXT = $8087;
GL_TEXTURE_COORD_ARRAY_SIZE_EXT = $8088;
GL_TEXTURE_COORD_ARRAY_TYPE_EXT = $8089;
GL_TEXTURE_COORD_ARRAY_STRIDE_EXT = $808A;
GL_TEXTURE_COORD_ARRAY_COUNT_EXT = $808B;
GL_EDGE_FLAG_ARRAY_STRIDE_EXT = $808C;
GL_EDGE_FLAG_ARRAY_COUNT_EXT = $808D;
GL_VERTEX_ARRAY_POINTER_EXT = $808E;
GL_NORMAL_ARRAY_POINTER_EXT = $808F;
GL_COLOR_ARRAY_POINTER_EXT = $8090;
GL_INDEX_ARRAY_POINTER_EXT = $8091;
GL_TEXTURE_COORD_ARRAY_POINTER_EXT = $8092;
GL_EDGE_FLAG_ARRAY_POINTER_EXT = $8093;
// EXT_color_table
GL_TABLE_TOO_LARGE_EXT = $8031;
GL_COLOR_TABLE_FORMAT_EXT = $80D8;
GL_COLOR_TABLE_WIDTH_EXT = $80D9;
GL_COLOR_TABLE_RED_SIZE_EXT = $80DA;
GL_COLOR_TABLE_GREEN_SIZE_EXT = $80DB;
GL_COLOR_TABLE_BLUE_SIZE_EXT = $80DC;
GL_COLOR_TABLE_ALPHA_SIZE_EXT = $80DD;
GL_COLOR_TABLE_LUMINANCE_SIZE_EXT = $80DE;
GL_COLOR_TABLE_INTENSITY_SIZE_EXT = $80DF;
// EXT_bgra
GL_BGR_EXT = $80E0;
GL_BGRA_EXT = $80E1;
// EXT_paletted_texture
GL_COLOR_INDEX1_EXT = $80E2;
GL_COLOR_INDEX2_EXT = $80E3;
GL_COLOR_INDEX4_EXT = $80E4;
GL_COLOR_INDEX8_EXT = $80E5;
GL_COLOR_INDEX12_EXT = $80E6;
GL_COLOR_INDEX16_EXT = $80E7;
// SGI_compiled_vertex_array
GL_ARRAY_ELEMENT_LOCK_FIRST_SGI = $81A8;
GL_ARRAY_ELEMENT_LOCK_COUNT_SGI = $81A9;
// SGI_cull_vertex
GL_CULL_VERTEX_SGI = $81AA;
GL_CULL_VERTEX_EYE_POSITION_SGI = $81AB;
GL_CULL_VERTEX_OBJECT_POSITION_SGI = $81AC;
// SGI_index_array_formats
GL_IUI_V2F_SGI = $81AD;
GL_IUI_V3F_SGI = $81AE;
GL_IUI_N3F_V2F_SGI = $81AF;
GL_IUI_N3F_V3F_SGI = $81B0;
GL_T2F_IUI_V2F_SGI = $81B1;
GL_T2F_IUI_V3F_SGI = $81B2;
GL_T2F_IUI_N3F_V2F_SGI = $81B3;
GL_T2F_IUI_N3F_V3F_SGI = $81B4;
// SGI_index_func
GL_INDEX_TEST_SGI = $81B5;
GL_INDEX_TEST_FUNC_SGI = $81B6;
GL_INDEX_TEST_REF_SGI = $81B7;
// SGI_index_material
GL_INDEX_MATERIAL_SGI = $81B8;
GL_INDEX_MATERIAL_PARAMETER_SGI = $81B9;
GL_INDEX_MATERIAL_FACE_SGI = $81BA;
// EXT_blend_color
GL_CONSTANT_COLOR_EXT = $8001;
GL_ONE_MINUS_CONSTANT_COLOR_EXT = $8002;
GL_CONSTANT_ALPHA_EXT = $8003;
GL_ONE_MINUS_CONSTANT_ALPHA_EXT = $8004;
GL_BLEND_COLOR_EXT = $8005;
// EXT_blend_minmax
GL_FUNC_ADD_EXT = $8006;
GL_MIN_EXT = $8007;
GL_MAX_EXT = $8008;
GL_BLEND_EQUATION_EXT = $8009;
// EXT_blend_subtract
GL_FUNC_SUBTRACT_EXT = $800A;
GL_FUNC_REVERSE_SUBTRACT_EXT = $800B;
// EXT_convolution
GL_CONVOLUTION_1D_EXT = $8010;
GL_CONVOLUTION_2D_EXT = $8011;
GL_SEPARABLE_2D_EXT = $8012;
GL_CONVOLUTION_BORDER_MODE_EXT = $8013;
GL_CONVOLUTION_FILTER_SCALE_EXT = $8014;
GL_CONVOLUTION_FILTER_BIAS_EXT = $8015;
GL_REDUCE_EXT = $8016;
GL_CONVOLUTION_FORMAT_EXT = $8017;
GL_CONVOLUTION_WIDTH_EXT = $8018;
GL_CONVOLUTION_HEIGHT_EXT = $8019;
GL_MAX_CONVOLUTION_WIDTH_EXT = $801A;
GL_MAX_CONVOLUTION_HEIGHT_EXT = $801B;
GL_POST_CONVOLUTION_RED_SCALE_EXT = $801C;
GL_POST_CONVOLUTION_GREEN_SCALE_EXT = $801D;
GL_POST_CONVOLUTION_BLUE_SCALE_EXT = $801E;
GL_POST_CONVOLUTION_ALPHA_SCALE_EXT = $801F;
GL_POST_CONVOLUTION_RED_BIAS_EXT = $8020;
GL_POST_CONVOLUTION_GREEN_BIAS_EXT = $8021;
GL_POST_CONVOLUTION_BLUE_BIAS_EXT = $8022;
GL_POST_CONVOLUTION_ALPHA_BIAS_EXT = $8023;
// EXT_histogram
GL_HISTOGRAM_EXT = $8024;
GL_PROXY_HISTOGRAM_EXT = $8025;
GL_HISTOGRAM_WIDTH_EXT = $8026;
GL_HISTOGRAM_FORMAT_EXT = $8027;
GL_HISTOGRAM_RED_SIZE_EXT = $8028;
GL_HISTOGRAM_GREEN_SIZE_EXT = $8029;
GL_HISTOGRAM_BLUE_SIZE_EXT = $802A;
GL_HISTOGRAM_ALPHA_SIZE_EXT = $802B;
GL_HISTOGRAM_LUMINANCE_SIZE_EXT = $802C;
GL_HISTOGRAM_SINK_EXT = $802D;
GL_MINMAX_EXT = $802E;
GL_MINMAX_FORMAT_EXT = $802F;
GL_MINMAX_SINK_EXT = $8030;
// EXT_polygon_offset
GL_POLYGON_OFFSET_EXT = $8037;
GL_POLYGON_OFFSET_FACTOR_EXT = $8038;
GL_POLYGON_OFFSET_BIAS_EXT = $8039;
// EXT_texture
GL_ALPHA4_EXT = $803B;
GL_ALPHA8_EXT = $803C;
GL_ALPHA12_EXT = $803D;
GL_ALPHA16_EXT = $803E;
GL_LUMINANCE4_EXT = $803F;
GL_LUMINANCE8_EXT = $8040;
GL_LUMINANCE12_EXT = $8041;
GL_LUMINANCE16_EXT = $8042;
GL_LUMINANCE4_ALPHA4_EXT = $8043;
GL_LUMINANCE6_ALPHA2_EXT = $8044;
GL_LUMINANCE8_ALPHA8_EXT = $8045;
GL_LUMINANCE12_ALPHA4_EXT = $8046;
GL_LUMINANCE12_ALPHA12_EXT = $8047;
GL_LUMINANCE16_ALPHA16_EXT = $8048;
GL_INTENSITY_EXT = $8049;
GL_INTENSITY4_EXT = $804A;
GL_INTENSITY8_EXT = $804B;
GL_INTENSITY12_EXT = $804C;
GL_INTENSITY16_EXT = $804D;
GL_RGB2_EXT = $804E;
GL_RGB4_EXT = $804F;
GL_RGB5_EXT = $8050;
GL_RGB8_EXT = $8051;
GL_RGB10_EXT = $8052;
GL_RGB12_EXT = $8053;
GL_RGB16_EXT = $8054;
GL_RGBA2_EXT = $8055;
GL_RGBA4_EXT = $8056;
GL_RGB5_A1_EXT = $8057;
GL_RGBA8_EXT = $8058;
GL_RGB10_A2_EXT = $8059;
GL_RGBA12_EXT = $805A;
GL_RGBA16_EXT = $805B;
GL_TEXTURE_RED_SIZE_EXT = $805C;
GL_TEXTURE_GREEN_SIZE_EXT = $805D;
GL_TEXTURE_BLUE_SIZE_EXT = $805E;
GL_TEXTURE_ALPHA_SIZE_EXT = $805F;
GL_TEXTURE_LUMINANCE_SIZE_EXT = $8060;
GL_TEXTURE_INTENSITY_SIZE_EXT = $8061;
GL_REPLACE_EXT = $8062;
GL_PROXY_TEXTURE_1D_EXT = $8063;
GL_PROXY_TEXTURE_2D_EXT = $8064;
GL_TEXTURE_TOO_LARGE_EXT = $8065;
// EXT_texture_object
GL_TEXTURE_PRIORITY_EXT = $8066;
GL_TEXTURE_RESIDENT_EXT = $8067;
GL_TEXTURE_1D_BINDING_EXT = $8068;
GL_TEXTURE_2D_BINDING_EXT = $8069;
GL_TEXTURE_3D_BINDING_EXT = $806A;
// EXT_texture3D
GL_PACK_SKIP_IMAGES_EXT = $806B;
GL_PACK_IMAGE_HEIGHT_EXT = $806C;
GL_UNPACK_SKIP_IMAGES_EXT = $806D;
GL_UNPACK_IMAGE_HEIGHT_EXT = $806E;
GL_TEXTURE_3D_EXT = $806F;
GL_PROXY_TEXTURE_3D_EXT = $8070;
GL_TEXTURE_DEPTH_EXT = $8071;
GL_TEXTURE_WRAP_R_EXT = $8072;
GL_MAX_3D_TEXTURE_SIZE_EXT = $8073;
// SGI_color_matrix
GL_COLOR_MATRIX_SGI = $80B1;
GL_COLOR_MATRIX_STACK_DEPTH_SGI = $80B2;
GL_MAX_COLOR_MATRIX_STACK_DEPTH_SGI = $80B3;
GL_POST_COLOR_MATRIX_RED_SCALE_SGI = $80B4;
GL_POST_COLOR_MATRIX_GREEN_SCALE_SGI = $80B5;
GL_POST_COLOR_MATRIX_BLUE_SCALE_SGI = $80B6;
GL_POST_COLOR_MATRIX_ALPHA_SCALE_SGI = $80B7;
GL_POST_COLOR_MATRIX_RED_BIAS_SGI = $80B8;
GL_POST_COLOR_MATRIX_GREEN_BIAS_SGI = $80B9;
GL_POST_COLOR_MATRIX_BLUE_BIAS_SGI = $80BA;
GL_POST_COLOR_MATRIX_ALPHA_BIAS_SGI = $80BB;
// SGI_texture_color_table
GL_TEXTURE_COLOR_TABLE_SGI = $80BC;
GL_PROXY_TEXTURE_COLOR_TABLE_SGI = $80BD;
GL_TEXTURE_COLOR_TABLE_BIAS_SGI = $80BE;
GL_TEXTURE_COLOR_TABLE_SCALE_SGI = $80BF;
// SGI_color_table
GL_COLOR_TABLE_SGI = $80D0;
GL_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D1;
GL_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D2;
GL_PROXY_COLOR_TABLE_SGI = $80D3;
GL_PROXY_POST_CONVOLUTION_COLOR_TABLE_SGI = $80D4;
GL_PROXY_POST_COLOR_MATRIX_COLOR_TABLE_SGI = $80D5;
GL_COLOR_TABLE_SCALE_SGI = $80D6;
GL_COLOR_TABLE_BIAS_SGI = $80D7;
GL_COLOR_TABLE_FORMAT_SGI = $80D8;
GL_COLOR_TABLE_WIDTH_SGI = $80D9;
GL_COLOR_TABLE_RED_SIZE_SGI = $80DA;
GL_COLOR_TABLE_GREEN_SIZE_SGI = $80DB;
GL_COLOR_TABLE_BLUE_SIZE_SGI = $80DC;
GL_COLOR_TABLE_ALPHA_SIZE_SGI = $80DD;
GL_COLOR_TABLE_LUMINANCE_SIZE_SGI = $80DE;
GL_COLOR_TABLE_INTENSITY_SIZE_SGI = $80DF;
// EXT_cmyka
GL_CMYK_EXT = $800C;
GL_CMYKA_EXT = $800D;
GL_PACK_CMYK_HINT_EXT = $800E;
GL_UNPACK_CMYK_HINT_EXT = $800F;
// EXT_rescale_normal
GL_RESCALE_NORMAL_EXT = $803A;
// EXT_clip_volume_hint
GL_CLIP_VOLUME_CLIPPING_HINT_EXT = $80F0;
// EXT_cull_vertex
GL_CULL_VERTEX_EXT = 0; // not yet defined
GL_CULL_VERTEX_EYE_POSITION_EXT = 0; // not yet defined
GL_CULL_VERTEX_OBJECT_POSITION_EXT = 0; // not yet defined
// EXT_index_array_formats
GL_IUI_V2F_EXT = 0; // not yet defined
GL_IUI_V3F_EXT = 0; // not yet defined
GL_IUI_N3F_V2F_EXT = 0; // not yet defined
GL_IUI_N3F_V3F_EXT = 0; // not yet defined
GL_T2F_IUI_V2F_EXT = 0; // not yet defined
GL_T2F_IUI_V3F_EXT = 0; // not yet defined
GL_T2F_IUI_N3F_V2F_EXT = 0; // not yet defined
GL_T2F_IUI_N3F_V3F_EXT = 0; // not yet defined
// EXT_index_func
GL_INDEX_TEST_EXT = 0; // not yet defined
GL_INDEX_TEST_FUNC_EXT = 0; // not yet defined
GL_INDEX_TEST_REF_EXT = 0; // not yet defined
// EXT_index_material
GL_INDEX_MATERIAL_EXT = 0; // not yet defined
GL_INDEX_MATERIAL_PARAMETER_EXT = 0; // not yet defined
GL_INDEX_MATERIAL_FACE_EXT = 0; // not yet defined
// EXT_misc_attribute
GL_MISC_BIT_EXT = 0; // not yet defined
// EXT_scene_marker
GL_SCENE_REQUIRED_EXT = 0; // not yet defined
// EXT_shared_texture_palette
GL_SHARED_TEXTURE_PALETTE_EXT = $81FB;
// EXT_nurbs_tessellator
GLU_NURBS_MODE_EXT = 100160;
GLU_NURBS_TESSELLATOR_EXT = 100161;
GLU_NURBS_RENDERER_EXT = 100162;
GLU_NURBS_BEGIN_EXT = 100164;
GLU_NURBS_VERTEX_EXT = 100165;
GLU_NURBS_NORMAL_EXT = 100166;
GLU_NURBS_COLOR_EXT = 100167;
GLU_NURBS_TEX_COORD_EXT = 100168;
GLU_NURBS_END_EXT = 100169;
GLU_NURBS_BEGIN_DATA_EXT = 100170;
GLU_NURBS_VERTEX_DATA_EXT = 100171;
GLU_NURBS_NORMAL_DATA_EXT = 100172;
GLU_NURBS_COLOR_DATA_EXT = 100173;
GLU_NURBS_TEX_COORD_DATA_EXT = 100174;
GLU_NURBS_END_DATA_EXT = 100175;
// EXT_object_space_tess
GLU_OBJECT_PARAMETRIC_ERROR_EXT = 100208;
GLU_OBJECT_PATH_LENGTH_EXT = 100209;
//------------------------------------------------------------------------------
const // ********** GLU generic constants **********
// Errors: (return value 0 = no error)
GLU_INVALID_ENUM = 100900;
GLU_INVALID_VALUE = 100901;
GLU_OUT_OF_MEMORY = 100902;
GLU_INCOMPATIBLE_GL_VERSION = 100903;
// StringName
GLU_VERSION = 100800;
GLU_EXTENSIONS = 100801;
// Boolean
GLU_TRUE = GL_TRUE;
GLU_FALSE = GL_FALSE;
// Quadric constants
// QuadricNormal
GLU_SMOOTH = 100000;
GLU_FLAT = 100001;
GLU_NONE = 100002;
// QuadricDrawStyle
GLU_POINT = 100010;
GLU_LINE = 100011;
GLU_FILL = 100012;
GLU_SILHOUETTE = 100013;
// QuadricOrientation
GLU_OUTSIDE = 100020;
GLU_INSIDE = 100021;
// Tesselation constants
GLU_TESS_MAX_COORD = 1.0e150;
// TessProperty
GLU_TESS_WINDING_RULE = 100140;
GLU_TESS_BOUNDARY_ONLY = 100141;
GLU_TESS_TOLERANCE = 100142;
// TessWinding
GLU_TESS_WINDING_ODD = 100130;
GLU_TESS_WINDING_NONZERO = 100131;
GLU_TESS_WINDING_POSITIVE = 100132;
GLU_TESS_WINDING_NEGATIVE = 100133;
GLU_TESS_WINDING_ABS_GEQ_TWO = 100134;
// TessCallback
GLU_TESS_BEGIN = 100100; // TGLUTessBeginProc
GLU_TESS_VERTEX = 100101; // TGLUTessVertexProc
GLU_TESS_END = 100102; // TGLUTessEndProc
GLU_TESS_ERROR = 100103; // TGLUTessErrorProc
GLU_TESS_EDGE_FLAG = 100104; // TGLUTessEdgeFlagProc
GLU_TESS_COMBINE = 100105; // TGLUTessCombineProc
GLU_TESS_BEGIN_DATA = 100106; // TGLUTessBeginDataProc
GLU_TESS_VERTEX_DATA = 100107; // TGLUTessVertexDataProc
GLU_TESS_END_DATA = 100108; // TGLUTessEndDataProc
GLU_TESS_ERROR_DATA = 100109; // TGLUTessErrorDataProc
GLU_TESS_EDGE_FLAG_DATA = 100110; // TGLUTessEdgeFlagDataProc
GLU_TESS_COMBINE_DATA = 100111; // TGLUTessCombineDataProc
// TessError
GLU_TESS_ERROR1 = 100151;
GLU_TESS_ERROR2 = 100152;
GLU_TESS_ERROR3 = 100153;
GLU_TESS_ERROR4 = 100154;
GLU_TESS_ERROR5 = 100155;
GLU_TESS_ERROR6 = 100156;
GLU_TESS_ERROR7 = 100157;
GLU_TESS_ERROR8 = 100158;
GLU_TESS_MISSING_BEGIN_POLYGON = GLU_TESS_ERROR1;
GLU_TESS_MISSING_BEGIN_CONTOUR = GLU_TESS_ERROR2;
GLU_TESS_MISSING_END_POLYGON = GLU_TESS_ERROR3;
GLU_TESS_MISSING_END_CONTOUR = GLU_TESS_ERROR4;
GLU_TESS_COORD_TOO_LARGE = GLU_TESS_ERROR5;
GLU_TESS_NEED_COMBINE_CALLBACK = GLU_TESS_ERROR6;
// NURBS constants
// NurbsProperty
GLU_AUTO_LOAD_MATRIX = 100200;
GLU_CULLING = 100201;
GLU_SAMPLING_TOLERANCE = 100203;
GLU_DISPLAY_MODE = 100204;
GLU_PARAMETRIC_TOLERANCE = 100202;
GLU_SAMPLING_METHOD = 100205;
GLU_U_STEP = 100206;
GLU_V_STEP = 100207;
// NurbsSampling
GLU_PATH_LENGTH = 100215;
GLU_PARAMETRIC_ERROR = 100216;
GLU_DOMAIN_DISTANCE = 100217;
// NurbsTrim
GLU_MAP1_TRIM_2 = 100210;
GLU_MAP1_TRIM_3 = 100211;
// NurbsDisplay
GLU_OUTLINE_POLYGON = 100240;
GLU_OUTLINE_PATCH = 100241;
// NurbsErrors
GLU_NURBS_ERROR1 = 100251;
GLU_NURBS_ERROR2 = 100252;
GLU_NURBS_ERROR3 = 100253;
GLU_NURBS_ERROR4 = 100254;
GLU_NURBS_ERROR5 = 100255;
GLU_NURBS_ERROR6 = 100256;
GLU_NURBS_ERROR7 = 100257;
GLU_NURBS_ERROR8 = 100258;
GLU_NURBS_ERROR9 = 100259;
GLU_NURBS_ERROR10 = 100260;
GLU_NURBS_ERROR11 = 100261;
GLU_NURBS_ERROR12 = 100262;
GLU_NURBS_ERROR13 = 100263;
GLU_NURBS_ERROR14 = 100264;
GLU_NURBS_ERROR15 = 100265;
GLU_NURBS_ERROR16 = 100266;
GLU_NURBS_ERROR17 = 100267;
GLU_NURBS_ERROR18 = 100268;
GLU_NURBS_ERROR19 = 100269;
GLU_NURBS_ERROR20 = 100270;
GLU_NURBS_ERROR21 = 100271;
GLU_NURBS_ERROR22 = 100272;
GLU_NURBS_ERROR23 = 100273;
GLU_NURBS_ERROR24 = 100274;
GLU_NURBS_ERROR25 = 100275;
GLU_NURBS_ERROR26 = 100276;
GLU_NURBS_ERROR27 = 100277;
GLU_NURBS_ERROR28 = 100278;
GLU_NURBS_ERROR29 = 100279;
GLU_NURBS_ERROR30 = 100280;
GLU_NURBS_ERROR31 = 100281;
GLU_NURBS_ERROR32 = 100282;
GLU_NURBS_ERROR33 = 100283;
GLU_NURBS_ERROR34 = 100284;
GLU_NURBS_ERROR35 = 100285;
GLU_NURBS_ERROR36 = 100286;
GLU_NURBS_ERROR37 = 100287;
// Contours types -- obsolete!
GLU_CW = 100120;
GLU_CCW = 100121;
GLU_INTERIOR = 100122;
GLU_EXTERIOR = 100123;
GLU_UNKNOWN = 100124;
// Names without "TESS_" prefix
GLU_BEGIN = GLU_TESS_BEGIN;
GLU_VERTEX = GLU_TESS_VERTEX;
GLU_END = GLU_TESS_END;
GLU_ERROR = GLU_TESS_ERROR;
GLU_EDGE_FLAG = GLU_TESS_EDGE_FLAG;
//-------------------------------------------------------