1 /* 2 * Direct3D wine OpenGL include file 3 * 4 * Copyright 2002-2003 The wine-d3d team 5 * Copyright 2002-2004 Jason Edmeades 6 * Raphael Junqueira 7 * Copyright 2007 Roderick Colenbrander 8 * 9 * This library is free software; you can redistribute it and/or 10 * modify it under the terms of the GNU Lesser General Public 11 * License as published by the Free Software Foundation; either 12 * version 2.1 of the License, or (at your option) any later version. 13 * 14 * This library is distributed in the hope that it will be useful, 15 * but WITHOUT ANY WARRANTY; without even the implied warranty of 16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 17 * Lesser General Public License for more details. 18 * 19 * You should have received a copy of the GNU Lesser General Public 20 * License along with this library; if not, write to the Free Software 21 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 22 * 23 * 24 * Most OpenGL 1.0/1.1/1.2/1.3 constants/types come from the Mesa-project: 25 * Copyright (C) 1999-2006 Brian Paul 26 * 27 * From the Mesa-license: 28 * Permission is hereby granted, free of charge, to any person obtaining a 29 * copy of this software and associated documentation files (the "Software"), 30 * to deal in the Software without restriction, including without limitation 31 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 32 * and/or sell copies of the Software, and to permit persons to whom the 33 * Software is furnished to do so, subject to the following conditions: 34 * 35 * The above copyright notice and this permission notice shall be included 36 * in all copies or substantial portions of the Software. 37 * 38 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 39 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 40 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 41 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 42 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 43 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 44 */ 45 46 #ifndef __WINE_WINED3D_GL_H 47 #define __WINE_WINED3D_GL_H 48 49 #ifdef USE_WIN32_OPENGL 50 #define WINE_GLAPI __stdcall 51 #else 52 #define WINE_GLAPI 53 #endif 54 55 /**************************************************** 56 * OpenGL 1.0/1.1/1.2/1.3 57 * types, #defines and function pointers 58 ****************************************************/ 59 60 /* Types */ 61 typedef unsigned int GLbitfield; 62 typedef unsigned char GLboolean; 63 typedef signed char GLbyte; 64 typedef unsigned char GLubyte; 65 typedef short GLshort; 66 typedef unsigned short GLushort; 67 typedef int GLint; 68 typedef unsigned int GLuint; 69 typedef unsigned int GLenum; 70 typedef float GLfloat; 71 typedef int GLsizei; 72 typedef float GLclampf; 73 typedef double GLdouble; 74 typedef double GLclampd; 75 typedef void GLvoid; 76 77 /* Booleans */ 78 #define GL_FALSE 0x0 79 #define GL_TRUE 0x1 80 81 /* Data types */ 82 #define GL_BYTE 0x1400 83 #define GL_UNSIGNED_BYTE 0x1401 84 #define GL_SHORT 0x1402 85 #define GL_UNSIGNED_SHORT 0x1403 86 #define GL_INT 0x1404 87 #define GL_UNSIGNED_INT 0x1405 88 #define GL_FLOAT 0x1406 89 #define GL_DOUBLE 0x140A 90 #define GL_2_BYTES 0x1407 91 #define GL_3_BYTES 0x1408 92 #define GL_4_BYTES 0x1409 93 94 /* Errors */ 95 #define GL_NO_ERROR 0x0 96 #define GL_INVALID_VALUE 0x0501 97 #define GL_INVALID_ENUM 0x0500 98 #define GL_INVALID_OPERATION 0x0502 99 #define GL_STACK_OVERFLOW 0x0503 100 #define GL_STACK_UNDERFLOW 0x0504 101 #define GL_OUT_OF_MEMORY 0x0505 102 103 /* Utility */ 104 #define GL_VENDOR 0x1F00 105 #define GL_RENDERER 0x1F01 106 #define GL_VERSION 0x1F02 107 #define GL_EXTENSIONS 0x1F03 108 109 /* Accumulation buffer */ 110 #define GL_ACCUM_RED_BITS 0x0D58 111 #define GL_ACCUM_GREEN_BITS 0x0D59 112 #define GL_ACCUM_BLUE_BITS 0x0D5A 113 #define GL_ACCUM_ALPHA_BITS 0x0D5B 114 #define GL_ACCUM_CLEAR_VALUE 0x0B80 115 #define GL_ACCUM 0x0100 116 #define GL_ADD 0x0104 117 #define GL_LOAD 0x0101 118 #define GL_MULT 0x0103 119 #define GL_RETURN 0x0102 120 121 /* Alpha testing */ 122 #define GL_ALPHA_TEST 0x0BC0 123 #define GL_ALPHA_TEST_REF 0x0BC2 124 #define GL_ALPHA_TEST_FUNC 0x0BC1 125 126 /* Blending */ 127 #define GL_BLEND 0x0BE2 128 #define GL_BLEND_SRC 0x0BE1 129 #define GL_BLEND_DST 0x0BE0 130 #define GL_ZERO 0x0 131 #define GL_ONE 0x1 132 #define GL_SRC_COLOR 0x0300 133 #define GL_ONE_MINUS_SRC_COLOR 0x0301 134 #define GL_SRC_ALPHA 0x0302 135 #define GL_ONE_MINUS_SRC_ALPHA 0x0303 136 #define GL_DST_ALPHA 0x0304 137 #define GL_ONE_MINUS_DST_ALPHA 0x0305 138 #define GL_DST_COLOR 0x0306 139 #define GL_ONE_MINUS_DST_COLOR 0x0307 140 #define GL_SRC_ALPHA_SATURATE 0x0308 141 #define GL_CONSTANT_COLOR 0x8001 142 #define GL_ONE_MINUS_CONSTANT_COLOR 0x8002 143 #define GL_CONSTANT_ALPHA 0x8003 144 #define GL_ONE_MINUS_CONSTANT_ALPHA 0x8004 145 146 /* Buffers, Pixel Drawing/Reading */ 147 #define GL_NONE 0x0 148 #define GL_FRONT_LEFT 0x0400 149 #define GL_FRONT_RIGHT 0x0401 150 #define GL_BACK_LEFT 0x0402 151 #define GL_BACK_RIGHT 0x0403 152 #define GL_FRONT 0x0404 153 #define GL_BACK 0x0405 154 #define GL_LEFT 0x0406 155 #define GL_RIGHT 0x0407 156 #define GL_FRONT_AND_BACK 0x0408 157 #define GL_AUX0 0x0409 158 #define GL_AUX1 0x040A 159 #define GL_AUX2 0x040B 160 #define GL_AUX3 0x040C 161 #define GL_COLOR_INDEX 0x1900 162 #define GL_RED 0x1903 163 #define GL_GREEN 0x1904 164 #define GL_BLUE 0x1905 165 #define GL_ALPHA 0x1906 166 #define GL_LUMINANCE 0x1909 167 #define GL_LUMINANCE_ALPHA 0x190A 168 #define GL_ALPHA_BITS 0x0D55 169 #define GL_RED_BITS 0x0D52 170 #define GL_GREEN_BITS 0x0D53 171 #define GL_BLUE_BITS 0x0D54 172 #define GL_INDEX_BITS 0x0D51 173 #define GL_SUBPIXEL_BITS 0x0D50 174 #define GL_AUX_BUFFERS 0x0C00 175 #define GL_READ_BUFFER 0x0C02 176 #define GL_DRAW_BUFFER 0x0C01 177 #define GL_DOUBLEBUFFER 0x0C32 178 #define GL_STEREO 0x0C33 179 #define GL_BITMAP 0x1A00 180 #define GL_COLOR 0x1800 181 #define GL_DEPTH 0x1801 182 #define GL_STENCIL 0x1802 183 #define GL_DITHER 0x0BD0 184 #define GL_RGB 0x1907 185 #define GL_RGBA 0x1908 186 187 /* Clipping */ 188 #define GL_CLIP_PLANE0 0x3000 189 #define GL_CLIP_PLANE1 0x3001 190 #define GL_CLIP_PLANE2 0x3002 191 #define GL_CLIP_PLANE3 0x3003 192 #define GL_CLIP_PLANE4 0x3004 193 #define GL_CLIP_PLANE5 0x3005 194 195 /* Depth buffer */ 196 #define GL_NEVER 0x0200 197 #define GL_LESS 0x0201 198 #define GL_EQUAL 0x0202 199 #define GL_LEQUAL 0x0203 200 #define GL_GREATER 0x0204 201 #define GL_NOTEQUAL 0x0205 202 #define GL_GEQUAL 0x0206 203 #define GL_ALWAYS 0x0207 204 #define GL_DEPTH_TEST 0x0B71 205 #define GL_DEPTH_BITS 0x0D56 206 #define GL_DEPTH_CLEAR_VALUE 0x0B73 207 #define GL_DEPTH_FUNC 0x0B74 208 #define GL_DEPTH_RANGE 0x0B70 209 #define GL_DEPTH_WRITEMASK 0x0B72 210 #define GL_DEPTH_COMPONENT 0x1902 211 212 /* Evaluators */ 213 #define GL_AUTO_NORMAL 0x0D80 214 #define GL_MAP1_COLOR_4 0x0D90 215 #define GL_MAP1_GRID_DOMAIN 0x0DD0 216 #define GL_MAP1_GRID_SEGMENTS 0x0DD1 217 #define GL_MAP1_INDEX 0x0D91 218 #define GL_MAP1_NORMAL 0x0D92 219 #define GL_MAP1_TEXTURE_COORD_1 0x0D93 220 #define GL_MAP1_TEXTURE_COORD_2 0x0D94 221 #define GL_MAP1_TEXTURE_COORD_3 0x0D95 222 #define GL_MAP1_TEXTURE_COORD_4 0x0D96 223 #define GL_MAP1_VERTEX_3 0x0D97 224 #define GL_MAP1_VERTEX_4 0x0D98 225 #define GL_MAP2_COLOR_4 0x0DB0 226 #define GL_MAP2_GRID_DOMAIN 0x0DD2 227 #define GL_MAP2_GRID_SEGMENTS 0x0DD3 228 #define GL_MAP2_INDEX 0x0DB1 229 #define GL_MAP2_NORMAL 0x0DB2 230 #define GL_MAP2_TEXTURE_COORD_1 0x0DB3 231 #define GL_MAP2_TEXTURE_COORD_2 0x0DB4 232 #define GL_MAP2_TEXTURE_COORD_3 0x0DB5 233 #define GL_MAP2_TEXTURE_COORD_4 0x0DB6 234 #define GL_MAP2_VERTEX_3 0x0DB7 235 #define GL_MAP2_VERTEX_4 0x0DB8 236 #define GL_COEFF 0x0A00 237 #define GL_DOMAIN 0x0A02 238 #define GL_ORDER 0x0A01 239 240 /* Feedback */ 241 #define GL_2D 0x0600 242 #define GL_3D 0x0601 243 #define GL_3D_COLOR 0x0602 244 #define GL_3D_COLOR_TEXTURE 0x0603 245 #define GL_4D_COLOR_TEXTURE 0x0604 246 #define GL_POINT_TOKEN 0x0701 247 #define GL_LINE_TOKEN 0x0702 248 #define GL_LINE_RESET_TOKEN 0x0707 249 #define GL_POLYGON_TOKEN 0x0703 250 #define GL_BITMAP_TOKEN 0x0704 251 #define GL_DRAW_PIXEL_TOKEN 0x0705 252 #define GL_COPY_PIXEL_TOKEN 0x0706 253 #define GL_PASS_THROUGH_TOKEN 0x0700 254 #define GL_FEEDBACK_BUFFER_POINTER 0x0DF0 255 #define GL_FEEDBACK_BUFFER_SIZE 0x0DF1 256 #define GL_FEEDBACK_BUFFER_TYPE 0x0DF2 257 258 /* Fog */ 259 #define GL_FOG 0x0B60 260 #define GL_FOG_MODE 0x0B65 261 #define GL_FOG_DENSITY 0x0B62 262 #define GL_FOG_COLOR 0x0B66 263 #define GL_FOG_INDEX 0x0B61 264 #define GL_FOG_START 0x0B63 265 #define GL_FOG_END 0x0B64 266 #define GL_LINEAR 0x2601 267 #define GL_EXP 0x0800 268 #define GL_EXP2 0x0801 269 270 /* Gets */ 271 #define GL_ATTRIB_STACK_DEPTH 0x0BB0 272 #define GL_CLIENT_ATTRIB_STACK_DEPTH 0x0BB1 273 #define GL_COLOR_CLEAR_VALUE 0x0C22 274 #define GL_COLOR_WRITEMASK 0x0C23 275 #define GL_CURRENT_INDEX 0x0B01 276 #define GL_CURRENT_COLOR 0x0B00 277 #define GL_CURRENT_NORMAL 0x0B02 278 #define GL_CURRENT_RASTER_COLOR 0x0B04 279 #define GL_CURRENT_RASTER_DISTANCE 0x0B09 280 #define GL_CURRENT_RASTER_INDEX 0x0B05 281 #define GL_CURRENT_RASTER_POSITION 0x0B07 282 #define GL_CURRENT_RASTER_TEXTURE_COORDS 0x0B06 283 #define GL_CURRENT_RASTER_POSITION_VALID 0x0B08 284 #define GL_CURRENT_TEXTURE_COORDS 0x0B03 285 #define GL_INDEX_CLEAR_VALUE 0x0C20 286 #define GL_INDEX_MODE 0x0C30 287 #define GL_INDEX_WRITEMASK 0x0C21 288 #define GL_MODELVIEW_MATRIX 0x0BA6 289 #define GL_MODELVIEW_STACK_DEPTH 0x0BA3 290 #define GL_NAME_STACK_DEPTH 0x0D70 291 #define GL_PROJECTION_MATRIX 0x0BA7 292 #define GL_PROJECTION_STACK_DEPTH 0x0BA4 293 #define GL_RENDER_MODE 0x0C40 294 #define GL_RGBA_MODE 0x0C31 295 #define GL_TEXTURE_MATRIX 0x0BA8 296 #define GL_TEXTURE_STACK_DEPTH 0x0BA5 297 #define GL_VIEWPORT 0x0BA2 298 299 /* Hints */ 300 #define GL_FOG_HINT 0x0C54 301 #define GL_LINE_SMOOTH_HINT 0x0C52 302 #define GL_PERSPECTIVE_CORRECTION_HINT 0x0C50 303 #define GL_POINT_SMOOTH_HINT 0x0C51 304 #define GL_POLYGON_SMOOTH_HINT 0x0C53 305 #define GL_DONT_CARE 0x1100 306 #define GL_FASTEST 0x1101 307 #define GL_NICEST 0x1102 308 309 /* Implementation limits */ 310 #define GL_MAX_LIST_NESTING 0x0B31 311 #define GL_MAX_ATTRIB_STACK_DEPTH 0x0D35 312 #define GL_MAX_MODELVIEW_STACK_DEPTH 0x0D36 313 #define GL_MAX_NAME_STACK_DEPTH 0x0D37 314 #define GL_MAX_PROJECTION_STACK_DEPTH 0x0D38 315 #define GL_MAX_TEXTURE_STACK_DEPTH 0x0D39 316 #define GL_MAX_EVAL_ORDER 0x0D30 317 #define GL_MAX_LIGHTS 0x0D31 318 #define GL_MAX_CLIP_PLANES 0x0D32 319 #define GL_MAX_TEXTURE_SIZE 0x0D33 320 #define GL_MAX_PIXEL_MAP_TABLE 0x0D34 321 #define GL_MAX_VIEWPORT_DIMS 0x0D3A 322 #define GL_MAX_CLIENT_ATTRIB_STACK_DEPTH 0x0D3B 323 324 /* Lighting */ 325 #define GL_LIGHTING 0x0B50 326 #define GL_LIGHT0 0x4000 327 #define GL_LIGHT1 0x4001 328 #define GL_LIGHT2 0x4002 329 #define GL_LIGHT3 0x4003 330 #define GL_LIGHT4 0x4004 331 #define GL_LIGHT5 0x4005 332 #define GL_LIGHT6 0x4006 333 #define GL_LIGHT7 0x4007 334 #define GL_SPOT_EXPONENT 0x1205 335 #define GL_SPOT_CUTOFF 0x1206 336 #define GL_CONSTANT_ATTENUATION 0x1207 337 #define GL_LINEAR_ATTENUATION 0x1208 338 #define GL_QUADRATIC_ATTENUATION 0x1209 339 #define GL_AMBIENT 0x1200 340 #define GL_DIFFUSE 0x1201 341 #define GL_SPECULAR 0x1202 342 #define GL_SHININESS 0x1601 343 #define GL_EMISSION 0x1600 344 #define GL_POSITION 0x1203 345 #define GL_SPOT_DIRECTION 0x1204 346 #define GL_AMBIENT_AND_DIFFUSE 0x1602 347 #define GL_COLOR_INDEXES 0x1603 348 #define GL_LIGHT_MODEL_TWO_SIDE 0x0B52 349 #define GL_LIGHT_MODEL_LOCAL_VIEWER 0x0B51 350 #define GL_LIGHT_MODEL_AMBIENT 0x0B53 351 #define GL_FRONT_AND_BACK 0x0408 352 #define GL_SHADE_MODEL 0x0B54 353 #define GL_FLAT 0x1D00 354 #define GL_SMOOTH 0x1D01 355 #define GL_COLOR_MATERIAL 0x0B57 356 #define GL_COLOR_MATERIAL_FACE 0x0B55 357 #define GL_COLOR_MATERIAL_PARAMETER 0x0B56 358 #define GL_NORMALIZE 0x0BA1 359 360 /* Lines */ 361 #define GL_LINE_SMOOTH 0x0B20 362 #define GL_LINE_STIPPLE 0x0B24 363 #define GL_LINE_STIPPLE_PATTERN 0x0B25 364 #define GL_LINE_STIPPLE_REPEAT 0x0B26 365 #define GL_LINE_WIDTH 0x0B21 366 #define GL_LINE_WIDTH_GRANULARITY 0x0B23 367 #define GL_LINE_WIDTH_RANGE 0x0B22 368 369 /* Logic Ops */ 370 #define GL_LOGIC_OP 0x0BF1 371 #define GL_INDEX_LOGIC_OP 0x0BF1 372 #define GL_COLOR_LOGIC_OP 0x0BF2 373 #define GL_LOGIC_OP_MODE 0x0BF0 374 #define GL_CLEAR 0x1500 375 #define GL_SET 0x150F 376 #define GL_COPY 0x1503 377 #define GL_COPY_INVERTED 0x150C 378 #define GL_NOOP 0x1505 379 #define GL_INVERT 0x150A 380 #define GL_AND 0x1501 381 #define GL_NAND 0x150E 382 #define GL_OR 0x1507 383 #define GL_NOR 0x1508 384 #define GL_XOR 0x1506 385 #define GL_EQUIV 0x1509 386 #define GL_AND_REVERSE 0x1502 387 #define GL_AND_INVERTED 0x1504 388 #define GL_OR_REVERSE 0x150B 389 #define GL_OR_INVERTED 0x150D 390 391 /* Matrix Mode */ 392 #define GL_MATRIX_MODE 0x0BA0 393 #define GL_MODELVIEW 0x1700 394 #define GL_PROJECTION 0x1701 395 #define GL_TEXTURE 0x1702 396 397 /* Pixel Mode / Transfer */ 398 #define GL_MAP_COLOR 0x0D10 399 #define GL_MAP_STENCIL 0x0D11 400 #define GL_INDEX_SHIFT 0x0D12 401 #define GL_INDEX_OFFSET 0x0D13 402 #define GL_RED_SCALE 0x0D14 403 #define GL_RED_BIAS 0x0D15 404 #define GL_GREEN_SCALE 0x0D18 405 #define GL_GREEN_BIAS 0x0D19 406 #define GL_BLUE_SCALE 0x0D1A 407 #define GL_BLUE_BIAS 0x0D1B 408 #define GL_ALPHA_SCALE 0x0D1C 409 #define GL_ALPHA_BIAS 0x0D1D 410 #define GL_DEPTH_SCALE 0x0D1E 411 #define GL_DEPTH_BIAS 0x0D1F 412 #define GL_PIXEL_MAP_S_TO_S_SIZE 0x0CB1 413 #define GL_PIXEL_MAP_I_TO_I_SIZE 0x0CB0 414 #define GL_PIXEL_MAP_I_TO_R_SIZE 0x0CB2 415 #define GL_PIXEL_MAP_I_TO_G_SIZE 0x0CB3 416 #define GL_PIXEL_MAP_I_TO_B_SIZE 0x0CB4 417 #define GL_PIXEL_MAP_I_TO_A_SIZE 0x0CB5 418 #define GL_PIXEL_MAP_R_TO_R_SIZE 0x0CB6 419 #define GL_PIXEL_MAP_G_TO_G_SIZE 0x0CB7 420 #define GL_PIXEL_MAP_B_TO_B_SIZE 0x0CB8 421 #define GL_PIXEL_MAP_A_TO_A_SIZE 0x0CB9 422 #define GL_PIXEL_MAP_S_TO_S 0x0C71 423 #define GL_PIXEL_MAP_I_TO_I 0x0C70 424 #define GL_PIXEL_MAP_I_TO_R 0x0C72 425 #define GL_PIXEL_MAP_I_TO_G 0x0C73 426 #define GL_PIXEL_MAP_I_TO_B 0x0C74 427 #define GL_PIXEL_MAP_I_TO_A 0x0C75 428 #define GL_PIXEL_MAP_R_TO_R 0x0C76 429 #define GL_PIXEL_MAP_G_TO_G 0x0C77 430 #define GL_PIXEL_MAP_B_TO_B 0x0C78 431 #define GL_PIXEL_MAP_A_TO_A 0x0C79 432 #define GL_PACK_ALIGNMENT 0x0D05 433 #define GL_PACK_LSB_FIRST 0x0D01 434 #define GL_PACK_ROW_LENGTH 0x0D02 435 #define GL_PACK_SKIP_PIXELS 0x0D04 436 #define GL_PACK_SKIP_ROWS 0x0D03 437 #define GL_PACK_SWAP_BYTES 0x0D00 438 #define GL_UNPACK_ALIGNMENT 0x0CF5 439 #define GL_UNPACK_LSB_FIRST 0x0CF1 440 #define GL_UNPACK_ROW_LENGTH 0x0CF2 441 #define GL_UNPACK_SKIP_PIXELS 0x0CF4 442 #define GL_UNPACK_SKIP_ROWS 0x0CF3 443 #define GL_UNPACK_SWAP_BYTES 0x0CF0 444 #define GL_ZOOM_X 0x0D16 445 #define GL_ZOOM_Y 0x0D17 446 447 /* Points */ 448 #define GL_POINT_SMOOTH 0x0B10 449 #define GL_POINT_SIZE 0x0B11 450 #define GL_POINT_SIZE_GRANULARITY 0x0B13 451 #define GL_POINT_SIZE_RANGE 0x0B12 452 453 /* Polygons */ 454 #define GL_POINT 0x1B00 455 #define GL_LINE 0x1B01 456 #define GL_FILL 0x1B02 457 #define GL_CW 0x0900 458 #define GL_CCW 0x0901 459 #define GL_FRONT 0x0404 460 #define GL_BACK 0x0405 461 #define GL_POLYGON_MODE 0x0B40 462 #define GL_POLYGON_SMOOTH 0x0B41 463 #define GL_POLYGON_STIPPLE 0x0B42 464 #define GL_EDGE_FLAG 0x0B43 465 #define GL_CULL_FACE 0x0B44 466 #define GL_CULL_FACE_MODE 0x0B45 467 #define GL_FRONT_FACE 0x0B46 468 #define GL_POLYGON_OFFSET_FACTOR 0x8038 469 #define GL_POLYGON_OFFSET_UNITS 0x2A00 470 #define GL_POLYGON_OFFSET_POINT 0x2A01 471 #define GL_POLYGON_OFFSET_LINE 0x2A02 472 #define GL_POLYGON_OFFSET_FILL 0x8037 473 474 /* Primitives */ 475 #define GL_POINTS 0x0000 476 #define GL_LINES 0x0001 477 #define GL_LINE_LOOP 0x0002 478 #define GL_LINE_STRIP 0x0003 479 #define GL_TRIANGLES 0x0004 480 #define GL_TRIANGLE_STRIP 0x0005 481 #define GL_TRIANGLE_FAN 0x0006 482 #define GL_QUADS 0x0007 483 #define GL_QUAD_STRIP 0x0008 484 #define GL_POLYGON 0x0009 485 486 /* Push/Pop bits */ 487 #define GL_CURRENT_BIT 0x00000001 488 #define GL_POINT_BIT 0x00000002 489 #define GL_LINE_BIT 0x00000004 490 #define GL_POLYGON_BIT 0x00000008 491 #define GL_POLYGON_STIPPLE_BIT 0x00000010 492 #define GL_PIXEL_MODE_BIT 0x00000020 493 #define GL_LIGHTING_BIT 0x00000040 494 #define GL_FOG_BIT 0x00000080 495 #define GL_DEPTH_BUFFER_BIT 0x00000100 496 #define GL_ACCUM_BUFFER_BIT 0x00000200 497 #define GL_STENCIL_BUFFER_BIT 0x00000400 498 #define GL_VIEWPORT_BIT 0x00000800 499 #define GL_TRANSFORM_BIT 0x00001000 500 #define GL_ENABLE_BIT 0x00002000 501 #define GL_COLOR_BUFFER_BIT 0x00004000 502 #define GL_HINT_BIT 0x00008000 503 #define GL_EVAL_BIT 0x00010000 504 #define GL_LIST_BIT 0x00020000 505 #define GL_TEXTURE_BIT 0x00040000 506 #define GL_SCISSOR_BIT 0x00080000 507 #define GL_ALL_ATTRIB_BITS 0x000FFFFF 508 509 /* Render Mode */ 510 #define GL_FEEDBACK 0x1C01 511 #define GL_RENDER 0x1C00 512 #define GL_SELECT 0x1C02 513 514 /* Scissor box */ 515 #define GL_SCISSOR_TEST 0x0C11 516 #define GL_SCISSOR_BOX 0x0C10 517 518 /* Stencil */ 519 #define GL_STENCIL_TEST 0x0B90 520 #define GL_STENCIL_WRITEMASK 0x0B98 521 #define GL_STENCIL_BITS 0x0D57 522 #define GL_STENCIL_FUNC 0x0B92 523 #define GL_STENCIL_VALUE_MASK 0x0B93 524 #define GL_STENCIL_REF 0x0B97 525 #define GL_STENCIL_FAIL 0x0B94 526 #define GL_STENCIL_PASS_DEPTH_PASS 0x0B96 527 #define GL_STENCIL_PASS_DEPTH_FAIL 0x0B95 528 #define GL_STENCIL_CLEAR_VALUE 0x0B91 529 #define GL_STENCIL_INDEX 0x1901 530 #define GL_KEEP 0x1E00 531 #define GL_REPLACE 0x1E01 532 #define GL_INCR 0x1E02 533 #define GL_DECR 0x1E03 534 535 /* Texture mapping */ 536 #define GL_TEXTURE_ENV 0x2300 537 #define GL_TEXTURE_ENV_MODE 0x2200 538 #define GL_TEXTURE_1D 0x0DE0 539 #define GL_TEXTURE_2D 0x0DE1 540 #define GL_TEXTURE_WRAP_S 0x2802 541 #define GL_TEXTURE_WRAP_T 0x2803 542 #define GL_TEXTURE_MAG_FILTER 0x2800 543 #define GL_TEXTURE_MIN_FILTER 0x2801 544 #define GL_TEXTURE_ENV_COLOR 0x2201 545 #define GL_TEXTURE_GEN_S 0x0C60 546 #define GL_TEXTURE_GEN_T 0x0C61 547 #define GL_TEXTURE_GEN_MODE 0x2500 548 #define GL_TEXTURE_BORDER_COLOR 0x1004 549 #define GL_TEXTURE_WIDTH 0x1000 550 #define GL_TEXTURE_HEIGHT 0x1001 551 #define GL_TEXTURE_BORDER 0x1005 552 #define GL_TEXTURE_COMPONENTS 0x1003 553 #define GL_TEXTURE_RED_SIZE 0x805C 554 #define GL_TEXTURE_GREEN_SIZE 0x805D 555 #define GL_TEXTURE_BLUE_SIZE 0x805E 556 #define GL_TEXTURE_ALPHA_SIZE 0x805F 557 #define GL_TEXTURE_LUMINANCE_SIZE 0x8060 558 #define GL_TEXTURE_INTENSITY_SIZE 0x8061 559 #define GL_NEAREST_MIPMAP_NEAREST 0x2700 560 #define GL_NEAREST_MIPMAP_LINEAR 0x2702 561 #define GL_LINEAR_MIPMAP_NEAREST 0x2701 562 #define GL_LINEAR_MIPMAP_LINEAR 0x2703 563 #define GL_OBJECT_LINEAR 0x2401 564 #define GL_OBJECT_PLANE 0x2501 565 #define GL_EYE_LINEAR 0x2400 566 #define GL_EYE_PLANE 0x2502 567 #define GL_SPHERE_MAP 0x2402 568 #define GL_DECAL 0x2101 569 #define GL_MODULATE 0x2100 570 #define GL_NEAREST 0x2600 571 #define GL_REPEAT 0x2901 572 #define GL_CLAMP 0x2900 573 #define GL_S 0x2000 574 #define GL_T 0x2001 575 #define GL_R 0x2002 576 #define GL_Q 0x2003 577 #define GL_TEXTURE_GEN_R 0x0C62 578 #define GL_TEXTURE_GEN_Q 0x0C63 579 580 /* Vertex Arrays */ 581 #define GL_VERTEX_ARRAY 0x8074 582 #define GL_NORMAL_ARRAY 0x8075 583 #define GL_COLOR_ARRAY 0x8076 584 #define GL_INDEX_ARRAY 0x8077 585 #define GL_TEXTURE_COORD_ARRAY 0x8078 586 #define GL_EDGE_FLAG_ARRAY 0x8079 587 #define GL_VERTEX_ARRAY_SIZE 0x807A 588 #define GL_VERTEX_ARRAY_TYPE 0x807B 589 #define GL_VERTEX_ARRAY_STRIDE 0x807C 590 #define GL_NORMAL_ARRAY_TYPE 0x807E 591 #define GL_NORMAL_ARRAY_STRIDE 0x807F 592 #define GL_COLOR_ARRAY_SIZE 0x8081 593 #define GL_COLOR_ARRAY_TYPE 0x8082 594 #define GL_COLOR_ARRAY_STRIDE 0x8083 595 #define GL_INDEX_ARRAY_TYPE 0x8085 596 #define GL_INDEX_ARRAY_STRIDE 0x8086 597 #define GL_TEXTURE_COORD_ARRAY_SIZE 0x8088 598 #define GL_TEXTURE_COORD_ARRAY_TYPE 0x8089 599 #define GL_TEXTURE_COORD_ARRAY_STRIDE 0x808A 600 #define GL_EDGE_FLAG_ARRAY_STRIDE 0x808C 601 #define GL_VERTEX_ARRAY_POINTER 0x808E 602 #define GL_NORMAL_ARRAY_POINTER 0x808F 603 #define GL_COLOR_ARRAY_POINTER 0x8090 604 #define GL_INDEX_ARRAY_POINTER 0x8091 605 #define GL_TEXTURE_COORD_ARRAY_POINTER 0x8092 606 #define GL_EDGE_FLAG_ARRAY_POINTER 0x8093 607 #define GL_V2F 0x2A20 608 #define GL_V3F 0x2A21 609 #define GL_C4UB_V2F 0x2A22 610 #define GL_C4UB_V3F 0x2A23 611 #define GL_C3F_V3F 0x2A24 612 #define GL_N3F_V3F 0x2A25 613 #define GL_C4F_N3F_V3F 0x2A26 614 #define GL_T2F_V3F 0x2A27 615 #define GL_T4F_V4F 0x2A28 616 #define GL_T2F_C4UB_V3F 0x2A29 617 #define GL_T2F_C3F_V3F 0x2A2A 618 #define GL_T2F_N3F_V3F 0x2A2B 619 #define GL_T2F_C4F_N3F_V3F 0x2A2C 620 #define GL_T4F_C4F_N3F_V4F 0x2A2D 621 622 /* OpenGL 1.1 */ 623 #define GL_PROXY_TEXTURE_1D 0x8063 624 #define GL_PROXY_TEXTURE_2D 0x8064 625 #define GL_TEXTURE_PRIORITY 0x8066 626 #define GL_TEXTURE_RESIDENT 0x8067 627 #define GL_TEXTURE_BINDING_1D 0x8068 628 #define GL_TEXTURE_BINDING_2D 0x8069 629 #define GL_TEXTURE_INTERNAL_FORMAT 0x1003 630 #define GL_ALPHA4 0x803B 631 #define GL_ALPHA8 0x803C 632 #define GL_ALPHA12 0x803D 633 #define GL_ALPHA16 0x803E 634 #define GL_LUMINANCE4 0x803F 635 #define GL_LUMINANCE8 0x8040 636 #define GL_LUMINANCE12 0x8041 637 #define GL_LUMINANCE16 0x8042 638 #define GL_LUMINANCE4_ALPHA4 0x8043 639 #define GL_LUMINANCE6_ALPHA2 0x8044 640 #define GL_LUMINANCE8_ALPHA8 0x8045 641 #define GL_LUMINANCE12_ALPHA4 0x8046 642 #define GL_LUMINANCE12_ALPHA12 0x8047 643 #define GL_LUMINANCE16_ALPHA16 0x8048 644 #define GL_INTENSITY 0x8049 645 #define GL_INTENSITY4 0x804A 646 #define GL_INTENSITY8 0x804B 647 #define GL_INTENSITY12 0x804C 648 #define GL_INTENSITY16 0x804D 649 #define GL_R3_G3_B2 0x2A10 650 #define GL_RGB4 0x804F 651 #define GL_RGB5 0x8050 652 #define GL_RGB8 0x8051 653 #define GL_RGB10 0x8052 654 #define GL_RGB12 0x8053 655 #define GL_RGB16 0x8054 656 #define GL_RGBA2 0x8055 657 #define GL_RGBA4 0x8056 658 #define GL_RGB5_A1 0x8057 659 #define GL_RGBA8 0x8058 660 #define GL_RGB10_A2 0x8059 661 #define GL_RGBA12 0x805A 662 #define GL_RGBA16 0x805B 663 #define GL_CLIENT_PIXEL_STORE_BIT 0x00000001 664 #define GL_CLIENT_VERTEX_ARRAY_BIT 0x00000002 665 #define GL_ALL_CLIENT_ATTRIB_BITS 0xFFFFFFFF 666 #define GL_CLIENT_ALL_ATTRIB_BITS 0xFFFFFFFF 667 668 /* OpenGL 1.2 constants */ 669 #define GL_PACK_SKIP_IMAGES 0x806B 670 #define GL_PACK_IMAGE_HEIGHT 0x806C 671 #define GL_UNPACK_SKIP_IMAGES 0x806D 672 #define GL_UNPACK_IMAGE_HEIGHT 0x806E 673 #define GL_TEXTURE_3D 0x806F 674 #define GL_PROXY_TEXTURE_3D 0x8070 675 #define GL_TEXTURE_DEPTH 0x8071 676 #define GL_TEXTURE_WRAP_R 0x8072 677 #define GL_MAX_3D_TEXTURE_SIZE 0x8073 678 #define GL_BGR 0x80E0 679 #define GL_BGRA 0x80E1 680 #define GL_UNSIGNED_BYTE_3_3_2 0x8032 681 #define GL_UNSIGNED_BYTE_2_3_3_REV 0x8362 682 #define GL_UNSIGNED_SHORT_5_6_5 0x8363 683 #define GL_UNSIGNED_SHORT_5_6_5_REV 0x8364 684 #define GL_UNSIGNED_SHORT_4_4_4_4 0x8033 685 #define GL_UNSIGNED_SHORT_4_4_4_4_REV 0x8365 686 #define GL_UNSIGNED_SHORT_5_5_5_1 0x8034 687 #define GL_UNSIGNED_SHORT_1_5_5_5_REV 0x8366 688 #define GL_UNSIGNED_INT_8_8_8_8 0x8035 689 #define GL_UNSIGNED_INT_8_8_8_8_REV 0x8367 690 #define GL_UNSIGNED_INT_10_10_10_2 0x8036 691 #define GL_UNSIGNED_INT_2_10_10_10_REV 0x8368 692 #define GL_RESCALE_NORMAL 0x803A 693 #define GL_LIGHT_MODEL_COLOR_CONTROL 0x81F8 694 #define GL_SINGLE_COLOR 0x81F9 695 #define GL_SEPARATE_SPECULAR_COLOR 0x81FA 696 #define GL_CLAMP_TO_EDGE 0x812F 697 #define GL_TEXTURE_MIN_LOD 0x813A 698 #define GL_TEXTURE_MAX_LOD 0x813B 699 #define GL_TEXTURE_BASE_LEVEL 0x813C 700 #define GL_TEXTURE_MAX_LEVEL 0x813D 701 #define GL_MAX_ELEMENTS_VERTICES 0x80E8 702 #define GL_MAX_ELEMENTS_INDICES 0x80E9 703 #define GL_ALIASED_POINT_SIZE_RANGE 0x846D 704 #define GL_ALIASED_LINE_WIDTH_RANGE 0x846E 705 706 /* OpenGL 1.3 constants */ 707 #define GL_ACTIVE_TEXTURE 0x84E0 708 #define GL_CLIENT_ACTIVE_TEXTURE 0x84E1 709 #define GL_MAX_TEXTURE_UNITS 0x84E2 710 #define GL_TEXTURE0 0x84C0 711 #define GL_TEXTURE1 0x84C1 712 #define GL_TEXTURE2 0x84C2 713 #define GL_TEXTURE3 0x84C3 714 #define GL_TEXTURE4 0x84C4 715 #define GL_TEXTURE5 0x84C5 716 #define GL_TEXTURE6 0x84C6 717 #define GL_TEXTURE7 0x84C7 718 #define GL_TEXTURE8 0x84C8 719 #define GL_TEXTURE9 0x84C9 720 #define GL_TEXTURE10 0x84CA 721 #define GL_TEXTURE11 0x84CB 722 #define GL_TEXTURE12 0x84CC 723 #define GL_TEXTURE13 0x84CD 724 #define GL_TEXTURE14 0x84CE 725 #define GL_TEXTURE15 0x84CF 726 #define GL_TEXTURE16 0x84D0 727 #define GL_TEXTURE17 0x84D1 728 #define GL_TEXTURE18 0x84D2 729 #define GL_TEXTURE19 0x84D3 730 #define GL_TEXTURE20 0x84D4 731 #define GL_TEXTURE21 0x84D5 732 #define GL_TEXTURE22 0x84D6 733 #define GL_TEXTURE23 0x84D7 734 #define GL_TEXTURE24 0x84D8 735 #define GL_TEXTURE25 0x84D9 736 #define GL_TEXTURE26 0x84DA 737 #define GL_TEXTURE27 0x84DB 738 #define GL_TEXTURE28 0x84DC 739 #define GL_TEXTURE29 0x84DD 740 #define GL_TEXTURE30 0x84DE 741 #define GL_TEXTURE31 0x84DF 742 #define GL_NORMAL_MAP 0x8511 743 #define GL_REFLECTION_MAP 0x8512 744 #define GL_TEXTURE_CUBE_MAP 0x8513 745 #define GL_TEXTURE_BINDING_CUBE_MAP 0x8514 746 #define GL_TEXTURE_CUBE_MAP_POSITIVE_X 0x8515 747 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_X 0x8516 748 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Y 0x8517 749 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Y 0x8518 750 #define GL_TEXTURE_CUBE_MAP_POSITIVE_Z 0x8519 751 #define GL_TEXTURE_CUBE_MAP_NEGATIVE_Z 0x851A 752 #define GL_PROXY_TEXTURE_CUBE_MAP 0x851B 753 #define GL_MAX_CUBE_MAP_TEXTURE_SIZE 0x851C 754 #define GL_COMBINE 0x8570 755 #define GL_COMBINE_RGB 0x8571 756 #define GL_COMBINE_ALPHA 0x8572 757 #define GL_RGB_SCALE 0x8573 758 #define GL_ADD_SIGNED 0x8574 759 #define GL_INTERPOLATE 0x8575 760 #define GL_CONSTANT 0x8576 761 #define GL_PRIMARY_COLOR 0x8577 762 #define GL_PREVIOUS 0x8578 763 #define GL_SOURCE0_RGB 0x8580 764 #define GL_SOURCE1_RGB 0x8581 765 #define GL_SOURCE2_RGB 0x8582 766 #define GL_SOURCE0_ALPHA 0x8588 767 #define GL_SOURCE1_ALPHA 0x8589 768 #define GL_SOURCE2_ALPHA 0x858A 769 #define GL_OPERAND0_RGB 0x8590 770 #define GL_OPERAND1_RGB 0x8591 771 #define GL_OPERAND2_RGB 0x8592 772 #define GL_OPERAND0_ALPHA 0x8598 773 #define GL_OPERAND1_ALPHA 0x8599 774 #define GL_OPERAND2_ALPHA 0x859A 775 #define GL_SUBTRACT 0x84E7 776 #define GL_TRANSPOSE_MODELVIEW_MATRIX 0x84E3