Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmtypes.h
Go to the documentation of this file.
00001 /* 00002 * Mesa 3-D graphics library 00003 * Version: 7.3 00004 * 00005 * Copyright (C) 1999-2007 Brian Paul All Rights Reserved. 00006 * Copyright (C) 1999-2008 VMware, Inc. All Rights Reserved. 00007 * 00008 * Permission is hereby granted, free of charge, to any person obtaining a 00009 * copy of this software and associated documentation files (the "Software"), 00010 * to deal in the Software without restriction, including without limitation 00011 * the rights to use, copy, modify, merge, publish, distribute, sublicense, 00012 * and/or sell copies of the Software, and to permit persons to whom the 00013 * Software is furnished to do so, subject to the following conditions: 00014 * 00015 * The above copyright notice and this permission notice shall be included 00016 * in all copies or substantial portions of the Software. 00017 * 00018 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00019 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 00020 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 00021 * BRIAN PAUL BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN 00022 * AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 00023 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 00024 */ 00025 00033 #ifndef TYPES_H 00034 #define TYPES_H 00035 00036 00037 #include "glheader.h" 00038 #include <GL/internal/glcore.h> /* __GLcontextModes (GLvisual) */ 00039 #include "config.h" /* Hardwired parameters */ 00040 #include "glapi/glapi.h" 00041 #include "math/m_matrix.h" /* GLmatrix */ 00042 #include "bitset.h" 00043 00044 00048 #define GL_SHADER_PROGRAM_MESA 0x9999 00049 00050 00054 #if CHAN_BITS == 8 00055 typedef GLubyte GLchan; 00056 #define CHAN_MAX 255 00057 #define CHAN_MAXF 255.0F 00058 #define CHAN_TYPE GL_UNSIGNED_BYTE 00059 #elif CHAN_BITS == 16 00060 typedef GLushort GLchan; 00061 #define CHAN_MAX 65535 00062 #define CHAN_MAXF 65535.0F 00063 #define CHAN_TYPE GL_UNSIGNED_SHORT 00064 #elif CHAN_BITS == 32 00065 typedef GLfloat GLchan; 00066 #define CHAN_MAX 1.0 00067 #define CHAN_MAXF 1.0F 00068 #define CHAN_TYPE GL_FLOAT 00069 #else 00070 #error "illegal number of color channel bits" 00071 #endif 00072 00073 00077 #if STENCIL_BITS==8 00078 typedef GLubyte GLstencil; 00079 #elif STENCIL_BITS==16 00080 typedef GLushort GLstencil; 00081 #else 00082 # error "illegal number of stencil bits" 00083 #endif 00084 00085 00089 typedef int GLfixed; 00090 /* 00091 * Fixed point arithmetic macros 00092 */ 00093 #ifndef FIXED_FRAC_BITS 00094 #define FIXED_FRAC_BITS 11 00095 #endif 00096 00097 #define FIXED_SHIFT FIXED_FRAC_BITS 00098 #define FIXED_ONE (1 << FIXED_SHIFT) 00099 #define FIXED_HALF (1 << (FIXED_SHIFT-1)) 00100 #define FIXED_FRAC_MASK (FIXED_ONE - 1) 00101 #define FIXED_INT_MASK (~FIXED_FRAC_MASK) 00102 #define FIXED_EPSILON 1 00103 #define FIXED_SCALE ((float) FIXED_ONE) 00104 #define FIXED_DBL_SCALE ((double) FIXED_ONE) 00105 #define FloatToFixed(X) (IROUND((X) * FIXED_SCALE)) 00106 #define FixedToDouble(X) ((X) * (1.0 / FIXED_DBL_SCALE)) 00107 #define IntToFixed(I) ((I) << FIXED_SHIFT) 00108 #define FixedToInt(X) ((X) >> FIXED_SHIFT) 00109 #define FixedToUns(X) (((unsigned int)(X)) >> FIXED_SHIFT) 00110 #define FixedCeil(X) (((X) + FIXED_ONE - FIXED_EPSILON) & FIXED_INT_MASK) 00111 #define FixedFloor(X) ((X) & FIXED_INT_MASK) 00112 #define FixedToFloat(X) ((X) * (1.0F / FIXED_SCALE)) 00113 #define PosFloatToFixed(X) FloatToFixed(X) 00114 #define SignedFloatToFixed(X) FloatToFixed(X) 00115 00116 00117 00122 struct _mesa_HashTable; 00123 struct gl_pixelstore_attrib; 00124 struct gl_program_cache; 00125 struct gl_texture_format; 00126 struct gl_texture_image; 00127 struct gl_texture_object; 00128 typedef struct __GLcontextRec GLcontext; 00129 typedef struct __GLcontextModesRec GLvisual; 00130 typedef struct gl_framebuffer GLframebuffer; 00142 enum 00143 { 00144 VERT_ATTRIB_POS = 0, 00145 VERT_ATTRIB_WEIGHT = 1, 00146 VERT_ATTRIB_NORMAL = 2, 00147 VERT_ATTRIB_COLOR0 = 3, 00148 VERT_ATTRIB_COLOR1 = 4, 00149 VERT_ATTRIB_FOG = 5, 00150 VERT_ATTRIB_COLOR_INDEX = 6, 00151 VERT_ATTRIB_POINT_SIZE = 6, /*alias*/ 00152 VERT_ATTRIB_EDGEFLAG = 7, 00153 VERT_ATTRIB_TEX0 = 8, 00154 VERT_ATTRIB_TEX1 = 9, 00155 VERT_ATTRIB_TEX2 = 10, 00156 VERT_ATTRIB_TEX3 = 11, 00157 VERT_ATTRIB_TEX4 = 12, 00158 VERT_ATTRIB_TEX5 = 13, 00159 VERT_ATTRIB_TEX6 = 14, 00160 VERT_ATTRIB_TEX7 = 15, 00161 VERT_ATTRIB_GENERIC0 = 16, 00162 VERT_ATTRIB_GENERIC1 = 17, 00163 VERT_ATTRIB_GENERIC2 = 18, 00164 VERT_ATTRIB_GENERIC3 = 19, 00165 VERT_ATTRIB_GENERIC4 = 20, 00166 VERT_ATTRIB_GENERIC5 = 21, 00167 VERT_ATTRIB_GENERIC6 = 22, 00168 VERT_ATTRIB_GENERIC7 = 23, 00169 VERT_ATTRIB_GENERIC8 = 24, 00170 VERT_ATTRIB_GENERIC9 = 25, 00171 VERT_ATTRIB_GENERIC10 = 26, 00172 VERT_ATTRIB_GENERIC11 = 27, 00173 VERT_ATTRIB_GENERIC12 = 28, 00174 VERT_ATTRIB_GENERIC13 = 29, 00175 VERT_ATTRIB_GENERIC14 = 30, 00176 VERT_ATTRIB_GENERIC15 = 31, 00177 VERT_ATTRIB_MAX = 32 00178 }; 00179 00185 #define VERT_BIT_POS (1 << VERT_ATTRIB_POS) 00186 #define VERT_BIT_WEIGHT (1 << VERT_ATTRIB_WEIGHT) 00187 #define VERT_BIT_NORMAL (1 << VERT_ATTRIB_NORMAL) 00188 #define VERT_BIT_COLOR0 (1 << VERT_ATTRIB_COLOR0) 00189 #define VERT_BIT_COLOR1 (1 << VERT_ATTRIB_COLOR1) 00190 #define VERT_BIT_FOG (1 << VERT_ATTRIB_FOG) 00191 #define VERT_BIT_COLOR_INDEX (1 << VERT_ATTRIB_COLOR_INDEX) 00192 #define VERT_BIT_EDGEFLAG (1 << VERT_ATTRIB_EDGEFLAG) 00193 #define VERT_BIT_TEX0 (1 << VERT_ATTRIB_TEX0) 00194 #define VERT_BIT_TEX1 (1 << VERT_ATTRIB_TEX1) 00195 #define VERT_BIT_TEX2 (1 << VERT_ATTRIB_TEX2) 00196 #define VERT_BIT_TEX3 (1 << VERT_ATTRIB_TEX3) 00197 #define VERT_BIT_TEX4 (1 << VERT_ATTRIB_TEX4) 00198 #define VERT_BIT_TEX5 (1 << VERT_ATTRIB_TEX5) 00199 #define VERT_BIT_TEX6 (1 << VERT_ATTRIB_TEX6) 00200 #define VERT_BIT_TEX7 (1 << VERT_ATTRIB_TEX7) 00201 #define VERT_BIT_GENERIC0 (1 << VERT_ATTRIB_GENERIC0) 00202 #define VERT_BIT_GENERIC1 (1 << VERT_ATTRIB_GENERIC1) 00203 #define VERT_BIT_GENERIC2 (1 << VERT_ATTRIB_GENERIC2) 00204 #define VERT_BIT_GENERIC3 (1 << VERT_ATTRIB_GENERIC3) 00205 #define VERT_BIT_GENERIC4 (1 << VERT_ATTRIB_GENERIC4) 00206 #define VERT_BIT_GENERIC5 (1 << VERT_ATTRIB_GENERIC5) 00207 #define VERT_BIT_GENERIC6 (1 << VERT_ATTRIB_GENERIC6) 00208 #define VERT_BIT_GENERIC7 (1 << VERT_ATTRIB_GENERIC7) 00209 #define VERT_BIT_GENERIC8 (1 << VERT_ATTRIB_GENERIC8) 00210 #define VERT_BIT_GENERIC9 (1 << VERT_ATTRIB_GENERIC9) 00211 #define VERT_BIT_GENERIC10 (1 << VERT_ATTRIB_GENERIC10) 00212 #define VERT_BIT_GENERIC11 (1 << VERT_ATTRIB_GENERIC11) 00213 #define VERT_BIT_GENERIC12 (1 << VERT_ATTRIB_GENERIC12) 00214 #define VERT_BIT_GENERIC13 (1 << VERT_ATTRIB_GENERIC13) 00215 #define VERT_BIT_GENERIC14 (1 << VERT_ATTRIB_GENERIC14) 00216 #define VERT_BIT_GENERIC15 (1 << VERT_ATTRIB_GENERIC15) 00217 00218 #define VERT_BIT_TEX(u) (1 << (VERT_ATTRIB_TEX0 + (u))) 00219 #define VERT_BIT_GENERIC(g) (1 << (VERT_ATTRIB_GENERIC0 + (g))) 00220 00227 #define VERT_RESULT_HPOS 0 00228 #define VERT_RESULT_COL0 1 00229 #define VERT_RESULT_COL1 2 00230 #define VERT_RESULT_FOGC 3 00231 #define VERT_RESULT_TEX0 4 00232 #define VERT_RESULT_TEX1 5 00233 #define VERT_RESULT_TEX2 6 00234 #define VERT_RESULT_TEX3 7 00235 #define VERT_RESULT_TEX4 8 00236 #define VERT_RESULT_TEX5 9 00237 #define VERT_RESULT_TEX6 10 00238 #define VERT_RESULT_TEX7 11 00239 #define VERT_RESULT_PSIZ 12 00240 #define VERT_RESULT_BFC0 13 00241 #define VERT_RESULT_BFC1 14 00242 #define VERT_RESULT_EDGE 15 00243 #define VERT_RESULT_VAR0 16 00244 #define VERT_RESULT_MAX (VERT_RESULT_VAR0 + MAX_VARYING) 00245 00251 enum 00252 { 00253 FRAG_ATTRIB_WPOS = 0, 00254 FRAG_ATTRIB_COL0 = 1, 00255 FRAG_ATTRIB_COL1 = 2, 00256 FRAG_ATTRIB_FOGC = 3, 00257 FRAG_ATTRIB_TEX0 = 4, 00258 FRAG_ATTRIB_TEX1 = 5, 00259 FRAG_ATTRIB_TEX2 = 6, 00260 FRAG_ATTRIB_TEX3 = 7, 00261 FRAG_ATTRIB_TEX4 = 8, 00262 FRAG_ATTRIB_TEX5 = 9, 00263 FRAG_ATTRIB_TEX6 = 10, 00264 FRAG_ATTRIB_TEX7 = 11, 00265 FRAG_ATTRIB_VAR0 = 12, 00266 FRAG_ATTRIB_MAX = (FRAG_ATTRIB_VAR0 + MAX_VARYING) 00267 }; 00268 00273 #define FRAG_BIT_WPOS (1 << FRAG_ATTRIB_WPOS) 00274 #define FRAG_BIT_COL0 (1 << FRAG_ATTRIB_COL0) 00275 #define FRAG_BIT_COL1 (1 << FRAG_ATTRIB_COL1) 00276 #define FRAG_BIT_FOGC (1 << FRAG_ATTRIB_FOGC) 00277 #define FRAG_BIT_TEX0 (1 << FRAG_ATTRIB_TEX0) 00278 #define FRAG_BIT_TEX1 (1 << FRAG_ATTRIB_TEX1) 00279 #define FRAG_BIT_TEX2 (1 << FRAG_ATTRIB_TEX2) 00280 #define FRAG_BIT_TEX3 (1 << FRAG_ATTRIB_TEX3) 00281 #define FRAG_BIT_TEX4 (1 << FRAG_ATTRIB_TEX4) 00282 #define FRAG_BIT_TEX5 (1 << FRAG_ATTRIB_TEX5) 00283 #define FRAG_BIT_TEX6 (1 << FRAG_ATTRIB_TEX6) 00284 #define FRAG_BIT_TEX7 (1 << FRAG_ATTRIB_TEX7) 00285 #define FRAG_BIT_VAR0 (1 << FRAG_ATTRIB_VAR0) 00286 00287 #define FRAG_BIT_TEX(U) (FRAG_BIT_TEX0 << (U)) 00288 #define FRAG_BIT_VAR(V) (FRAG_BIT_VAR0 << (V)) 00289 00290 #define FRAG_BITS_TEX_ANY (FRAG_BIT_TEX0| \ 00291 FRAG_BIT_TEX1| \ 00292 FRAG_BIT_TEX2| \ 00293 FRAG_BIT_TEX3| \ 00294 FRAG_BIT_TEX4| \ 00295 FRAG_BIT_TEX5| \ 00296 FRAG_BIT_TEX6| \ 00297 FRAG_BIT_TEX7) 00298 00304 enum 00305 { 00306 FRAG_RESULT_COLR = 0, 00307 FRAG_RESULT_COLH = 1, 00308 FRAG_RESULT_DEPR = 2, 00309 FRAG_RESULT_DATA0 = 3, 00310 FRAG_RESULT_MAX = (FRAG_RESULT_DATA0 + MAX_DRAW_BUFFERS) 00311 }; 00312 00313 00317 enum { 00318 BUFFER_FRONT_LEFT = 0, /* the four standard color buffers */ 00319 BUFFER_BACK_LEFT = 1, 00320 BUFFER_FRONT_RIGHT = 2, 00321 BUFFER_BACK_RIGHT = 3, 00322 BUFFER_AUX0 = 4, /* optional aux buffer */ 00323 BUFFER_AUX1 = 5, 00324 BUFFER_AUX2 = 6, 00325 BUFFER_AUX3 = 7, 00326 BUFFER_DEPTH = 8, 00327 BUFFER_STENCIL = 9, 00328 BUFFER_ACCUM = 10, 00329 BUFFER_COLOR0 = 11, /* generic renderbuffers */ 00330 BUFFER_COLOR1 = 12, 00331 BUFFER_COLOR2 = 13, 00332 BUFFER_COLOR3 = 14, 00333 BUFFER_COLOR4 = 15, 00334 BUFFER_COLOR5 = 16, 00335 BUFFER_COLOR6 = 17, 00336 BUFFER_COLOR7 = 18, 00337 BUFFER_COUNT = 19 00338 }; 00339 00343 #define BUFFER_BIT_FRONT_LEFT (1 << BUFFER_FRONT_LEFT) 00344 #define BUFFER_BIT_BACK_LEFT (1 << BUFFER_BACK_LEFT) 00345 #define BUFFER_BIT_FRONT_RIGHT (1 << BUFFER_FRONT_RIGHT) 00346 #define BUFFER_BIT_BACK_RIGHT (1 << BUFFER_BACK_RIGHT) 00347 #define BUFFER_BIT_AUX0 (1 << BUFFER_AUX0) 00348 #define BUFFER_BIT_AUX1 (1 << BUFFER_AUX1) 00349 #define BUFFER_BIT_AUX2 (1 << BUFFER_AUX2) 00350 #define BUFFER_BIT_AUX3 (1 << BUFFER_AUX3) 00351 #define BUFFER_BIT_DEPTH (1 << BUFFER_DEPTH) 00352 #define BUFFER_BIT_STENCIL (1 << BUFFER_STENCIL) 00353 #define BUFFER_BIT_ACCUM (1 << BUFFER_ACCUM) 00354 #define BUFFER_BIT_COLOR0 (1 << BUFFER_COLOR0) 00355 #define BUFFER_BIT_COLOR1 (1 << BUFFER_COLOR1) 00356 #define BUFFER_BIT_COLOR2 (1 << BUFFER_COLOR2) 00357 #define BUFFER_BIT_COLOR3 (1 << BUFFER_COLOR3) 00358 #define BUFFER_BIT_COLOR4 (1 << BUFFER_COLOR4) 00359 #define BUFFER_BIT_COLOR5 (1 << BUFFER_COLOR5) 00360 #define BUFFER_BIT_COLOR6 (1 << BUFFER_COLOR6) 00361 #define BUFFER_BIT_COLOR7 (1 << BUFFER_COLOR7) 00362 00366 #define BUFFER_BITS_COLOR (BUFFER_BIT_FRONT_LEFT | \ 00367 BUFFER_BIT_BACK_LEFT | \ 00368 BUFFER_BIT_FRONT_RIGHT | \ 00369 BUFFER_BIT_BACK_RIGHT | \ 00370 BUFFER_BIT_AUX0 | \ 00371 BUFFER_BIT_AUX1 | \ 00372 BUFFER_BIT_AUX2 | \ 00373 BUFFER_BIT_AUX3 | \ 00374 BUFFER_BIT_COLOR0 | \ 00375 BUFFER_BIT_COLOR1 | \ 00376 BUFFER_BIT_COLOR2 | \ 00377 BUFFER_BIT_COLOR3 | \ 00378 BUFFER_BIT_COLOR4 | \ 00379 BUFFER_BIT_COLOR5 | \ 00380 BUFFER_BIT_COLOR6 | \ 00381 BUFFER_BIT_COLOR7) 00382 00383 00386 #define COLORTABLE_PRECONVOLUTION 0 00387 #define COLORTABLE_POSTCONVOLUTION 1 00388 #define COLORTABLE_POSTCOLORMATRIX 2 00389 #define COLORTABLE_MAX 3 00390 00396 struct gl_color_table 00397 { 00398 GLenum InternalFormat; 00399 GLenum _BaseFormat; 00400 GLuint Size; 00401 GLfloat *TableF; 00402 GLubyte *TableUB; 00403 GLubyte RedSize; 00404 GLubyte GreenSize; 00405 GLubyte BlueSize; 00406 GLubyte AlphaSize; 00407 GLubyte LuminanceSize; 00408 GLubyte IntensitySize; 00409 }; 00410 00411 00416 #define MAT_ATTRIB_FRONT_AMBIENT 0 00417 #define MAT_ATTRIB_BACK_AMBIENT 1 00418 #define MAT_ATTRIB_FRONT_DIFFUSE 2 00419 #define MAT_ATTRIB_BACK_DIFFUSE 3 00420 #define MAT_ATTRIB_FRONT_SPECULAR 4 00421 #define MAT_ATTRIB_BACK_SPECULAR 5 00422 #define MAT_ATTRIB_FRONT_EMISSION 6 00423 #define MAT_ATTRIB_BACK_EMISSION 7 00424 #define MAT_ATTRIB_FRONT_SHININESS 8 00425 #define MAT_ATTRIB_BACK_SHININESS 9 00426 #define MAT_ATTRIB_FRONT_INDEXES 10 00427 #define MAT_ATTRIB_BACK_INDEXES 11 00428 #define MAT_ATTRIB_MAX 12 00429 00430 #define MAT_ATTRIB_AMBIENT(f) (MAT_ATTRIB_FRONT_AMBIENT+(f)) 00431 #define MAT_ATTRIB_DIFFUSE(f) (MAT_ATTRIB_FRONT_DIFFUSE+(f)) 00432 #define MAT_ATTRIB_SPECULAR(f) (MAT_ATTRIB_FRONT_SPECULAR+(f)) 00433 #define MAT_ATTRIB_EMISSION(f) (MAT_ATTRIB_FRONT_EMISSION+(f)) 00434 #define MAT_ATTRIB_SHININESS(f)(MAT_ATTRIB_FRONT_SHININESS+(f)) 00435 #define MAT_ATTRIB_INDEXES(f) (MAT_ATTRIB_FRONT_INDEXES+(f)) 00436 00437 #define MAT_INDEX_AMBIENT 0 00438 #define MAT_INDEX_DIFFUSE 1 00439 #define MAT_INDEX_SPECULAR 2 00440 00441 #define MAT_BIT_FRONT_AMBIENT (1<<MAT_ATTRIB_FRONT_AMBIENT) 00442 #define MAT_BIT_BACK_AMBIENT (1<<MAT_ATTRIB_BACK_AMBIENT) 00443 #define MAT_BIT_FRONT_DIFFUSE (1<<MAT_ATTRIB_FRONT_DIFFUSE) 00444 #define MAT_BIT_BACK_DIFFUSE (1<<MAT_ATTRIB_BACK_DIFFUSE) 00445 #define MAT_BIT_FRONT_SPECULAR (1<<MAT_ATTRIB_FRONT_SPECULAR) 00446 #define MAT_BIT_BACK_SPECULAR (1<<MAT_ATTRIB_BACK_SPECULAR) 00447 #define MAT_BIT_FRONT_EMISSION (1<<MAT_ATTRIB_FRONT_EMISSION) 00448 #define MAT_BIT_BACK_EMISSION (1<<MAT_ATTRIB_BACK_EMISSION) 00449 #define MAT_BIT_FRONT_SHININESS (1<<MAT_ATTRIB_FRONT_SHININESS) 00450 #define MAT_BIT_BACK_SHININESS (1<<MAT_ATTRIB_BACK_SHININESS) 00451 #define MAT_BIT_FRONT_INDEXES (1<<MAT_ATTRIB_FRONT_INDEXES) 00452 #define MAT_BIT_BACK_INDEXES (1<<MAT_ATTRIB_BACK_INDEXES) 00453 00454 00455 #define FRONT_MATERIAL_BITS (MAT_BIT_FRONT_EMISSION | \ 00456 MAT_BIT_FRONT_AMBIENT | \ 00457 MAT_BIT_FRONT_DIFFUSE | \ 00458 MAT_BIT_FRONT_SPECULAR | \ 00459 MAT_BIT_FRONT_SHININESS | \ 00460 MAT_BIT_FRONT_INDEXES) 00461 00462 #define BACK_MATERIAL_BITS (MAT_BIT_BACK_EMISSION | \ 00463 MAT_BIT_BACK_AMBIENT | \ 00464 MAT_BIT_BACK_DIFFUSE | \ 00465 MAT_BIT_BACK_SPECULAR | \ 00466 MAT_BIT_BACK_SHININESS | \ 00467 MAT_BIT_BACK_INDEXES) 00468 00469 #define ALL_MATERIAL_BITS (FRONT_MATERIAL_BITS | BACK_MATERIAL_BITS) 00470 00473 #define EXP_TABLE_SIZE 512 00474 #define SHINE_TABLE_SIZE 256 00479 struct gl_shine_tab 00480 { 00481 struct gl_shine_tab *next, *prev; 00482 GLfloat tab[SHINE_TABLE_SIZE+1]; 00483 GLfloat shininess; 00484 GLuint refcount; 00485 }; 00486 00487 00491 struct gl_light 00492 { 00493 struct gl_light *next; 00494 struct gl_light *prev; 00495 00496 GLfloat Ambient[4]; 00497 GLfloat Diffuse[4]; 00498 GLfloat Specular[4]; 00499 GLfloat EyePosition[4]; 00500 GLfloat EyeDirection[4]; 00501 GLfloat SpotExponent; 00502 GLfloat SpotCutoff; 00503 GLfloat _CosCutoffNeg; 00504 GLfloat _CosCutoff; 00505 GLfloat ConstantAttenuation; 00506 GLfloat LinearAttenuation; 00507 GLfloat QuadraticAttenuation; 00508 GLboolean Enabled; 00514 GLbitfield _Flags; 00516 GLfloat _Position[4]; 00517 GLfloat _VP_inf_norm[3]; 00518 GLfloat _h_inf_norm[3]; 00519 GLfloat _NormDirection[4]; 00520 GLfloat _VP_inf_spot_attenuation; 00521 00522 GLfloat _SpotExpTable[EXP_TABLE_SIZE][2]; 00523 GLfloat _MatAmbient[2][3]; 00524 GLfloat _MatDiffuse[2][3]; 00525 GLfloat _MatSpecular[2][3]; 00526 GLfloat _dli; 00527 GLfloat _sli; 00529 }; 00530 00531 00535 struct gl_lightmodel 00536 { 00537 GLfloat Ambient[4]; 00538 GLboolean LocalViewer; 00539 GLboolean TwoSide; 00540 GLenum ColorControl; 00542 }; 00543 00544 00548 struct gl_material 00549 { 00550 GLfloat Attrib[MAT_ATTRIB_MAX][4]; 00551 }; 00552 00553 00557 struct gl_accum_attrib 00558 { 00559 GLfloat ClearColor[4]; 00560 }; 00561 00562 00566 struct gl_colorbuffer_attrib 00567 { 00568 GLuint ClearIndex; 00569 GLclampf ClearColor[4]; 00571 GLuint IndexMask; 00572 GLubyte ColorMask[4]; 00574 GLenum DrawBuffer[MAX_DRAW_BUFFERS]; 00580 GLboolean AlphaEnabled; 00581 GLenum AlphaFunc; 00582 GLclampf AlphaRef; 00584 00589 GLboolean BlendEnabled; 00590 GLenum BlendSrcRGB; 00591 GLenum BlendDstRGB; 00592 GLenum BlendSrcA; 00593 GLenum BlendDstA; 00594 GLenum BlendEquationRGB; 00595 GLenum BlendEquationA; 00596 GLfloat BlendColor[4]; 00598 00603 GLenum LogicOp; 00604 GLboolean IndexLogicOpEnabled; 00605 GLboolean ColorLogicOpEnabled; 00606 GLboolean _LogicOpEnabled; 00608 00609 GLboolean DitherFlag; 00611 GLenum ClampFragmentColor; 00612 GLenum ClampReadColor; 00613 }; 00614 00615 00619 struct gl_current_attrib 00620 { 00628 GLfloat Attrib[VERT_ATTRIB_MAX][4]; 00630 00636 GLfloat RasterPos[4]; 00637 GLfloat RasterDistance; 00638 GLfloat RasterColor[4]; 00639 GLfloat RasterSecondaryColor[4]; 00640 GLfloat RasterIndex; 00641 GLfloat RasterTexCoords[MAX_TEXTURE_UNITS][4]; 00642 GLboolean RasterPosValid; 00644 }; 00645 00646 00650 struct gl_depthbuffer_attrib 00651 { 00652 GLenum Func; 00653 GLclampd Clear; 00654 GLboolean Test; 00655 GLboolean Mask; 00656 GLboolean BoundsTest; 00657 GLfloat BoundsMin, BoundsMax; 00658 }; 00659 00660 00664 struct gl_enable_attrib 00665 { 00666 GLboolean AlphaTest; 00667 GLboolean AutoNormal; 00668 GLboolean Blend; 00669 GLbitfield ClipPlanes; 00670 GLboolean ColorMaterial; 00671 GLboolean ColorTable[COLORTABLE_MAX]; 00672 GLboolean Convolution1D; 00673 GLboolean Convolution2D; 00674 GLboolean Separable2D; 00675 GLboolean CullFace; 00676 GLboolean DepthTest; 00677 GLboolean Dither; 00678 GLboolean Fog; 00679 GLboolean Histogram; 00680 GLboolean Light[MAX_LIGHTS]; 00681 GLboolean Lighting; 00682 GLboolean LineSmooth; 00683 GLboolean LineStipple; 00684 GLboolean IndexLogicOp; 00685 GLboolean ColorLogicOp; 00686 GLboolean Map1Color4; 00687 GLboolean Map1Index; 00688 GLboolean Map1Normal; 00689 GLboolean Map1TextureCoord1; 00690 GLboolean Map1TextureCoord2; 00691 GLboolean Map1TextureCoord3; 00692 GLboolean Map1TextureCoord4; 00693 GLboolean Map1Vertex3; 00694 GLboolean Map1Vertex4; 00695 GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ 00696 GLboolean Map2Color4; 00697 GLboolean Map2Index; 00698 GLboolean Map2Normal; 00699 GLboolean Map2TextureCoord1; 00700 GLboolean Map2TextureCoord2; 00701 GLboolean Map2TextureCoord3; 00702 GLboolean Map2TextureCoord4; 00703 GLboolean Map2Vertex3; 00704 GLboolean Map2Vertex4; 00705 GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ 00706 GLboolean MinMax; 00707 GLboolean Normalize; 00708 GLboolean PixelTexture; 00709 GLboolean PointSmooth; 00710 GLboolean PolygonOffsetPoint; 00711 GLboolean PolygonOffsetLine; 00712 GLboolean PolygonOffsetFill; 00713 GLboolean PolygonSmooth; 00714 GLboolean PolygonStipple; 00715 GLboolean RescaleNormals; 00716 GLboolean Scissor; 00717 GLboolean Stencil; 00718 GLboolean StencilTwoSide; /* GL_EXT_stencil_two_side */ 00719 GLboolean MultisampleEnabled; /* GL_ARB_multisample */ 00720 GLboolean SampleAlphaToCoverage; /* GL_ARB_multisample */ 00721 GLboolean SampleAlphaToOne; /* GL_ARB_multisample */ 00722 GLboolean SampleCoverage; /* GL_ARB_multisample */ 00723 GLboolean SampleCoverageInvert; /* GL_ARB_multisample */ 00724 GLboolean RasterPositionUnclipped; /* GL_IBM_rasterpos_clip */ 00725 GLuint Texture[MAX_TEXTURE_UNITS]; 00726 GLuint TexGen[MAX_TEXTURE_UNITS]; 00727 /* SGI_texture_color_table */ 00728 GLboolean TextureColorTable[MAX_TEXTURE_UNITS]; 00729 /* GL_ARB_vertex_program / GL_NV_vertex_program */ 00730 GLboolean VertexProgram; 00731 GLboolean VertexProgramPointSize; 00732 GLboolean VertexProgramTwoSide; 00733 /* GL_ARB_point_sprite / GL_NV_point_sprite */ 00734 GLboolean PointSprite; 00735 GLboolean FragmentShaderATI; 00736 }; 00737 00738 00742 struct gl_eval_attrib 00743 { 00748 GLboolean Map1Color4; 00749 GLboolean Map1Index; 00750 GLboolean Map1Normal; 00751 GLboolean Map1TextureCoord1; 00752 GLboolean Map1TextureCoord2; 00753 GLboolean Map1TextureCoord3; 00754 GLboolean Map1TextureCoord4; 00755 GLboolean Map1Vertex3; 00756 GLboolean Map1Vertex4; 00757 GLboolean Map1Attrib[16]; /* GL_NV_vertex_program */ 00758 GLboolean Map2Color4; 00759 GLboolean Map2Index; 00760 GLboolean Map2Normal; 00761 GLboolean Map2TextureCoord1; 00762 GLboolean Map2TextureCoord2; 00763 GLboolean Map2TextureCoord3; 00764 GLboolean Map2TextureCoord4; 00765 GLboolean Map2Vertex3; 00766 GLboolean Map2Vertex4; 00767 GLboolean Map2Attrib[16]; /* GL_NV_vertex_program */ 00768 GLboolean AutoNormal; 00775 GLint MapGrid1un; 00776 GLfloat MapGrid1u1, MapGrid1u2, MapGrid1du; 00777 GLint MapGrid2un, MapGrid2vn; 00778 GLfloat MapGrid2u1, MapGrid2u2, MapGrid2du; 00779 GLfloat MapGrid2v1, MapGrid2v2, MapGrid2dv; 00781 }; 00782 00783 00787 struct gl_fog_attrib 00788 { 00789 GLboolean Enabled; 00790 GLfloat Color[4]; 00791 GLfloat Density; 00792 GLfloat Start; 00793 GLfloat End; 00794 GLfloat Index; 00795 GLenum Mode; 00796 GLboolean ColorSumEnabled; 00797 GLenum FogCoordinateSource; 00798 GLfloat _Scale; 00799 }; 00800 00801 00807 struct gl_hint_attrib 00808 { 00809 GLenum PerspectiveCorrection; 00810 GLenum PointSmooth; 00811 GLenum LineSmooth; 00812 GLenum PolygonSmooth; 00813 GLenum Fog; 00814 GLenum ClipVolumeClipping; 00815 GLenum TextureCompression; 00816 GLenum GenerateMipmap; 00817 GLenum FragmentShaderDerivative; 00818 }; 00819 00820 00824 struct gl_histogram_attrib 00825 { 00826 GLuint Width; 00827 GLint Format; 00828 GLuint Count[HISTOGRAM_TABLE_SIZE][4]; 00829 GLboolean Sink; 00830 GLubyte RedSize; 00831 GLubyte GreenSize; 00832 GLubyte BlueSize; 00833 GLubyte AlphaSize; 00834 GLubyte LuminanceSize; 00835 }; 00836 00837 00841 struct gl_minmax_attrib 00842 { 00843 GLenum Format; 00844 GLboolean Sink; 00845 GLfloat Min[4], Max[4]; 00846 }; 00847 00848 00852 struct gl_convolution_attrib 00853 { 00854 GLenum Format; 00855 GLenum InternalFormat; 00856 GLuint Width; 00857 GLuint Height; 00858 GLfloat Filter[MAX_CONVOLUTION_WIDTH * MAX_CONVOLUTION_HEIGHT * 4]; 00859 }; 00860 00861 00866 #define LIGHT_SPOT 0x1 00867 #define LIGHT_LOCAL_VIEWER 0x2 00868 #define LIGHT_POSITIONAL 0x4 00869 #define LIGHT_NEED_VERTICES (LIGHT_POSITIONAL|LIGHT_LOCAL_VIEWER) 00870 00876 struct gl_light_attrib 00877 { 00878 struct gl_light Light[MAX_LIGHTS]; 00879 struct gl_lightmodel Model; 00885 struct gl_material Material; 00887 00888 GLboolean Enabled; 00889 GLenum ShadeModel; 00890 GLenum ColorMaterialFace; 00891 GLenum ColorMaterialMode; 00892 GLbitfield ColorMaterialBitmask; 00893 GLboolean ColorMaterialEnabled; 00894 GLenum ClampVertexColor; 00895 00896 struct gl_light EnabledList; 00902 GLboolean _NeedEyeCoords; 00903 GLboolean _NeedVertices; 00904 GLbitfield _Flags; 00905 GLfloat _BaseColor[2][3]; 00907 }; 00908 00909 00913 struct gl_line_attrib 00914 { 00915 GLboolean SmoothFlag; 00916 GLboolean StippleFlag; 00917 GLushort StipplePattern; 00918 GLint StippleFactor; 00919 GLfloat Width; 00920 }; 00921 00922 00926 struct gl_list_attrib 00927 { 00928 GLuint ListBase; 00929 }; 00930 00931 00935 struct gl_list_instruction 00936 { 00937 GLuint Size; 00938 void (*Execute)( GLcontext *ctx, void *data ); 00939 void (*Destroy)( GLcontext *ctx, void *data ); 00940 void (*Print)( GLcontext *ctx, void *data ); 00941 }; 00942 00943 #define MAX_DLIST_EXT_OPCODES 16 00944 00948 struct gl_list_extensions 00949 { 00950 struct gl_list_instruction Opcode[MAX_DLIST_EXT_OPCODES]; 00951 GLuint NumOpcodes; 00952 }; 00953 00954 00958 struct gl_multisample_attrib 00959 { 00960 GLboolean Enabled; 00961 GLboolean _Enabled; 00962 GLboolean SampleAlphaToCoverage; 00963 GLboolean SampleAlphaToOne; 00964 GLboolean SampleCoverage; 00965 GLfloat SampleCoverageValue; 00966 GLboolean SampleCoverageInvert; 00967 }; 00968 00969 00973 struct gl_pixelmap 00974 { 00975 GLint Size; 00976 GLfloat Map[MAX_PIXEL_MAP_TABLE]; 00977 GLubyte Map8[MAX_PIXEL_MAP_TABLE]; 00978 }; 00979 00980 00984 struct gl_pixelmaps 00985 { 00986 struct gl_pixelmap RtoR; 00987 struct gl_pixelmap GtoG; 00988 struct gl_pixelmap BtoB; 00989 struct gl_pixelmap AtoA; 00990 struct gl_pixelmap ItoR; 00991 struct gl_pixelmap ItoG; 00992 struct gl_pixelmap ItoB; 00993 struct gl_pixelmap ItoA; 00994 struct gl_pixelmap ItoI; 00995 struct gl_pixelmap StoS; 00996 }; 00997 00998 01002 struct gl_pixel_attrib 01003 { 01004 GLenum ReadBuffer; 01006 /*--- Begin Pixel Transfer State ---*/ 01007 /* Fields are in the order in which they're applied... */ 01008 01009 /* Scale & Bias (index shift, offset) */ 01010 GLfloat RedBias, RedScale; 01011 GLfloat GreenBias, GreenScale; 01012 GLfloat BlueBias, BlueScale; 01013 GLfloat AlphaBias, AlphaScale; 01014 GLfloat DepthBias, DepthScale; 01015 GLint IndexShift, IndexOffset; 01016 01017 /* Pixel Maps */ 01018 /* Note: actual pixel maps are not part of this attrib group */ 01019 GLboolean MapColorFlag; 01020 GLboolean MapStencilFlag; 01021 01022 /* There are multiple color table stages: */ 01023 GLboolean ColorTableEnabled[COLORTABLE_MAX]; 01024 GLfloat ColorTableScale[COLORTABLE_MAX][4]; 01025 GLfloat ColorTableBias[COLORTABLE_MAX][4]; 01027 /* Convolution (GL_EXT_convolution) */ 01028 GLboolean Convolution1DEnabled; 01029 GLboolean Convolution2DEnabled; 01030 GLboolean Separable2DEnabled; 01031 GLfloat ConvolutionBorderColor[3][4]; 01032 GLenum ConvolutionBorderMode[3]; 01033 GLfloat ConvolutionFilterScale[3][4]; 01034 GLfloat ConvolutionFilterBias[3][4]; 01035 GLfloat PostConvolutionScale[4]; 01036 GLfloat PostConvolutionBias[4]; 01038 /* Color matrix (GL_SGI_color_matrix) */ 01039 /* Note: the color matrix is not part of this attrib group */ 01040 GLfloat PostColorMatrixScale[4]; 01041 GLfloat PostColorMatrixBias[4]; 01043 /* Histogram & minmax (GL_EXT_histogram) */ 01044 /* Note: histogram and minmax data are not part of this attrib group */ 01045 GLboolean HistogramEnabled; 01046 GLboolean MinMaxEnabled; 01047 01048 /*--- End Pixel Transfer State ---*/ 01049 01050 /* Pixel Zoom */ 01051 GLfloat ZoomX, ZoomY; 01052 01054 GLfloat TextureColorTableScale[4]; 01055 GLfloat TextureColorTableBias[4]; 01056 }; 01057 01058 01062 struct gl_point_attrib 01063 { 01064 GLboolean SmoothFlag; 01065 GLfloat Size; 01066 GLfloat Params[3]; 01067 GLfloat MinSize, MaxSize; 01068 GLfloat Threshold; 01069 GLboolean _Attenuated; 01070 GLboolean PointSprite; 01071 GLboolean CoordReplace[MAX_TEXTURE_UNITS]; 01072 GLenum SpriteRMode; 01073 GLenum SpriteOrigin; 01074 }; 01075 01076 01080 struct gl_polygon_attrib 01081 { 01082 GLenum FrontFace; 01083 GLenum FrontMode; 01084 GLenum BackMode; 01085 GLboolean _FrontBit; 01086 GLboolean CullFlag; 01087 GLboolean SmoothFlag; 01088 GLboolean StippleFlag; 01089 GLenum CullFaceMode; 01090 GLfloat OffsetFactor; 01091 GLfloat OffsetUnits; 01092 GLboolean OffsetPoint; 01093 GLboolean OffsetLine; 01094 GLboolean OffsetFill; 01095 }; 01096 01097 01101 struct gl_scissor_attrib 01102 { 01103 GLboolean Enabled; 01104 GLint X, Y; 01105 GLsizei Width, Height; 01106 }; 01107 01108 01125 struct gl_stencil_attrib 01126 { 01127 GLboolean Enabled; 01128 GLboolean TestTwoSide; 01129 GLubyte ActiveFace; 01130 GLboolean _TestTwoSide; 01131 GLubyte _BackFace; 01132 GLenum Function[3]; 01133 GLenum FailFunc[3]; 01134 GLenum ZPassFunc[3]; 01135 GLenum ZFailFunc[3]; 01136 GLint Ref[3]; 01137 GLuint ValueMask[3]; 01138 GLuint WriteMask[3]; 01139 GLuint Clear; 01140 }; 01141 01142 01143 #define NUM_TEXTURE_TARGETS 7 /* 1D, 2D, 3D, CUBE, RECT, 1D_STACK, and 2D_STACK */ 01144 01149 #define TEXTURE_1D_INDEX 0 01150 #define TEXTURE_2D_INDEX 1 01151 #define TEXTURE_3D_INDEX 2 01152 #define TEXTURE_CUBE_INDEX 3 01153 #define TEXTURE_RECT_INDEX 4 01154 #define TEXTURE_1D_ARRAY_INDEX 5 01155 #define TEXTURE_2D_ARRAY_INDEX 6 01156 01163 #define TEXTURE_1D_BIT (1 << TEXTURE_1D_INDEX) 01164 #define TEXTURE_2D_BIT (1 << TEXTURE_2D_INDEX) 01165 #define TEXTURE_3D_BIT (1 << TEXTURE_3D_INDEX) 01166 #define TEXTURE_CUBE_BIT (1 << TEXTURE_CUBE_INDEX) 01167 #define TEXTURE_RECT_BIT (1 << TEXTURE_RECT_INDEX) 01168 #define TEXTURE_1D_ARRAY_BIT (1 << TEXTURE_1D_ARRAY_INDEX) 01169 #define TEXTURE_2D_ARRAY_BIT (1 << TEXTURE_2D_ARRAY_INDEX) 01170 01177 #define S_BIT 1 01178 #define T_BIT 2 01179 #define R_BIT 4 01180 #define Q_BIT 8 01181 01188 #define TEXGEN_SPHERE_MAP 0x1 01189 #define TEXGEN_OBJ_LINEAR 0x2 01190 #define TEXGEN_EYE_LINEAR 0x4 01191 #define TEXGEN_REFLECTION_MAP_NV 0x8 01192 #define TEXGEN_NORMAL_MAP_NV 0x10 01193 01194 #define TEXGEN_NEED_NORMALS (TEXGEN_SPHERE_MAP | \ 01195 TEXGEN_REFLECTION_MAP_NV | \ 01196 TEXGEN_NORMAL_MAP_NV) 01197 #define TEXGEN_NEED_EYE_COORD (TEXGEN_SPHERE_MAP | \ 01198 TEXGEN_REFLECTION_MAP_NV | \ 01199 TEXGEN_NORMAL_MAP_NV | \ 01200 TEXGEN_EYE_LINEAR) 01201 01204 /* A selection of state flags to make driver and module's lives easier. */ 01205 #define ENABLE_TEXGEN0 0x1 01206 #define ENABLE_TEXGEN1 0x2 01207 #define ENABLE_TEXGEN2 0x4 01208 #define ENABLE_TEXGEN3 0x8 01209 #define ENABLE_TEXGEN4 0x10 01210 #define ENABLE_TEXGEN5 0x20 01211 #define ENABLE_TEXGEN6 0x40 01212 #define ENABLE_TEXGEN7 0x80 01213 01214 #define ENABLE_TEXMAT0 0x1 /* Ie. not the identity matrix */ 01215 #define ENABLE_TEXMAT1 0x2 01216 #define ENABLE_TEXMAT2 0x4 01217 #define ENABLE_TEXMAT3 0x8 01218 #define ENABLE_TEXMAT4 0x10 01219 #define ENABLE_TEXMAT5 0x20 01220 #define ENABLE_TEXMAT6 0x40 01221 #define ENABLE_TEXMAT7 0x80 01222 01223 #define ENABLE_TEXGEN(i) (ENABLE_TEXGEN0 << (i)) 01224 #define ENABLE_TEXMAT(i) (ENABLE_TEXMAT0 << (i)) 01225 01226 01239 typedef void (*FetchTexelFuncC)( const struct gl_texture_image *texImage, 01240 GLint col, GLint row, GLint img, 01241 GLchan *texelOut ); 01242 01248 typedef void (*FetchTexelFuncF)( const struct gl_texture_image *texImage, 01249 GLint col, GLint row, GLint img, 01250 GLfloat *texelOut ); 01251 01252 01253 typedef void (*StoreTexelFunc)(struct gl_texture_image *texImage, 01254 GLint col, GLint row, GLint img, 01255 const void *texel); 01256 01257 01273 #define TEXSTORE_PARAMS \ 01274 GLcontext *ctx, GLuint dims, \ 01275 GLenum baseInternalFormat, \ 01276 const struct gl_texture_format *dstFormat, \ 01277 GLvoid *dstAddr, \ 01278 GLint dstXoffset, GLint dstYoffset, GLint dstZoffset, \ 01279 GLint dstRowStride, const GLuint *dstImageOffsets, \ 01280 GLint srcWidth, GLint srcHeight, GLint srcDepth, \ 01281 GLenum srcFormat, GLenum srcType, \ 01282 const GLvoid *srcAddr, \ 01283 const struct gl_pixelstore_attrib *srcPacking 01284 01285 01286 01290 typedef GLboolean (*StoreTexImageFunc)(TEXSTORE_PARAMS); 01291 01292 01296 struct gl_texture_format 01297 { 01298 GLint MesaFormat; 01300 GLenum BaseFormat; 01305 GLenum DataType; 01312 GLubyte RedBits; 01313 GLubyte GreenBits; 01314 GLubyte BlueBits; 01315 GLubyte AlphaBits; 01316 GLubyte LuminanceBits; 01317 GLubyte IntensityBits; 01318 GLubyte IndexBits; 01319 GLubyte DepthBits; 01320 GLubyte StencilBits; 01322 01323 GLuint TexelBytes; 01325 StoreTexImageFunc StoreImage; 01326 01331 FetchTexelFuncC FetchTexel1D; 01332 FetchTexelFuncC FetchTexel2D; 01333 FetchTexelFuncC FetchTexel3D; 01334 FetchTexelFuncF FetchTexel1Df; 01335 FetchTexelFuncF FetchTexel2Df; 01336 FetchTexelFuncF FetchTexel3Df; 01339 StoreTexelFunc StoreTexel; 01340 }; 01341 01342 01347 struct gl_texture_image 01348 { 01349 GLenum _BaseFormat; 01355 GLint InternalFormat; 01356 GLuint Border; 01357 GLuint Width; 01358 GLuint Height; 01359 GLuint Depth; 01360 GLuint Width2; 01361 GLuint Height2; 01362 GLuint Depth2; 01363 GLuint WidthLog2; 01364 GLuint HeightLog2; 01365 GLuint DepthLog2; 01366 GLuint MaxLog2; 01367 GLfloat WidthScale; 01368 GLfloat HeightScale; 01369 GLfloat DepthScale; 01370 GLboolean IsClientData; 01371 GLboolean _IsPowerOfTwo; 01373 const struct gl_texture_format *TexFormat; 01374 01375 struct gl_texture_object *TexObject; 01377 FetchTexelFuncC FetchTexelc; 01378 FetchTexelFuncF FetchTexelf; 01380 GLboolean IsCompressed; 01381 GLuint CompressedSize; 01383 GLuint RowStride; 01384 GLuint *ImageOffsets; 01386 GLvoid *Data; 01392 void *DriverData; 01394 }; 01395 01396 01401 #define FACE_POS_X 0 01402 #define FACE_NEG_X 1 01403 #define FACE_POS_Y 2 01404 #define FACE_NEG_Y 3 01405 #define FACE_POS_Z 4 01406 #define FACE_NEG_Z 5 01407 #define MAX_FACES 6 01408 01416 struct gl_texture_object 01417 { 01418 _glthread_Mutex Mutex; 01419 GLint RefCount; 01420 GLuint Name; 01421 GLenum Target; 01422 GLfloat Priority; 01423 GLfloat BorderColor[4]; 01424 GLchan _BorderChan[4]; 01425 GLenum WrapS; 01426 GLenum WrapT; 01427 GLenum WrapR; 01428 GLenum MinFilter; 01429 GLenum MagFilter; 01430 GLfloat MinLod; 01431 GLfloat MaxLod; 01432 GLfloat LodBias; 01433 GLint BaseLevel; 01434 GLint MaxLevel; 01435 GLfloat MaxAnisotropy; 01436 GLboolean CompareFlag; 01437 GLenum CompareOperator; 01438 GLfloat ShadowAmbient; 01439 GLenum CompareMode; 01440 GLenum CompareFunc; 01441 GLenum _Function; 01445 GLenum DepthMode; 01446 GLint _MaxLevel; 01447 GLfloat _MaxLambda; 01448 GLint CropRect[4]; 01449 GLboolean GenerateMipmap; 01450 GLboolean _Complete; 01453 struct gl_texture_image *Image[MAX_FACES][MAX_TEXTURE_LEVELS]; 01454 01456 struct gl_color_table Palette; 01457 01465 void *DriverData; 01466 }; 01467 01468 01476 struct gl_tex_env_combine_state 01477 { 01478 GLenum ModeRGB; 01479 GLenum ModeA; 01480 GLenum SourceRGB[3]; 01481 GLenum SourceA[3]; 01482 GLenum OperandRGB[3]; 01483 GLenum OperandA[3]; 01484 GLuint ScaleShiftRGB; 01485 GLuint ScaleShiftA; 01486 GLuint _NumArgsRGB; 01487 GLuint _NumArgsA; 01488 }; 01489 01490 01496 struct gl_texture_unit 01497 { 01498 GLbitfield Enabled; 01499 GLbitfield _ReallyEnabled; 01501 GLenum EnvMode; 01502 GLfloat EnvColor[4]; 01503 GLbitfield TexGenEnabled; 01507 GLenum GenModeS; 01508 GLenum GenModeT; 01509 GLenum GenModeR; 01510 GLenum GenModeQ; 01512 GLbitfield _GenBitS; 01513 GLbitfield _GenBitT; 01514 GLbitfield _GenBitR; 01515 GLbitfield _GenBitQ; 01516 GLbitfield _GenFlags; 01517 GLfloat ObjectPlaneS[4]; 01518 GLfloat ObjectPlaneT[4]; 01519 GLfloat ObjectPlaneR[4]; 01520 GLfloat ObjectPlaneQ[4]; 01521 GLfloat EyePlaneS[4]; 01522 GLfloat EyePlaneT[4]; 01523 GLfloat EyePlaneR[4]; 01524 GLfloat EyePlaneQ[4]; 01525 GLfloat LodBias; 01530 struct gl_tex_env_combine_state Combine; 01531 01536 struct gl_tex_env_combine_state _EnvMode; 01537 01542 struct gl_tex_env_combine_state *_CurrentCombine; 01543 01545 struct gl_texture_object *CurrentTex[NUM_TEXTURE_TARGETS]; 01546 01548 struct gl_texture_object *_Current; 01549 01552 struct gl_color_table ColorTable; 01553 struct gl_color_table ProxyColorTable; 01554 GLboolean ColorTableEnabled; 01556 }; 01557 01558 01559 01563 struct gl_texture_attrib 01564 { 01569 GLuint CurrentUnit; 01570 GLbitfield _EnabledUnits; 01571 GLbitfield _EnabledCoordUnits; 01572 GLbitfield _GenFlags; 01573 GLbitfield _TexGenEnabled; 01574 GLbitfield _TexMatEnabled; 01577 struct gl_texture_unit Unit[MAX_TEXTURE_UNITS]; 01578 01580 struct gl_texture_object *ProxyTex[NUM_TEXTURE_TARGETS]; 01581 01583 GLboolean SharedPalette; 01584 struct gl_color_table Palette; 01585 }; 01586 01587 01591 struct gl_transform_attrib 01592 { 01593 GLenum MatrixMode; 01594 GLfloat EyeUserPlane[MAX_CLIP_PLANES][4]; 01595 GLfloat _ClipUserPlane[MAX_CLIP_PLANES][4]; 01596 GLbitfield ClipPlanesEnabled; 01597 GLboolean Normalize; 01598 GLboolean RescaleNormals; 01599 GLboolean RasterPositionUnclipped; 01601 GLboolean CullVertexFlag; 01602 GLfloat CullEyePos[4]; 01603 GLfloat CullObjPos[4]; 01604 }; 01605 01606 01610 struct gl_viewport_attrib 01611 { 01612 GLint X, Y; 01613 GLsizei Width, Height; 01614 GLfloat Near, Far; 01615 GLmatrix _WindowMap; 01616 }; 01617 01618 01622 struct gl_attrib_node 01623 { 01624 GLbitfield kind; 01625 void *data; 01626 struct gl_attrib_node *next; 01627 }; 01628 01629 01633 struct gl_buffer_object 01634 { 01635 GLint RefCount; 01636 GLuint Name; 01637 GLenum Usage; 01638 GLenum Access; 01639 GLvoid *Pointer; 01640 GLsizeiptrARB Size; 01641 GLubyte *Data; 01642 GLboolean OnCard; 01643 }; 01644 01645 01646 01650 struct gl_pixelstore_attrib 01651 { 01652 GLint Alignment; 01653 GLint RowLength; 01654 GLint SkipPixels; 01655 GLint SkipRows; 01656 GLint ImageHeight; 01657 GLint SkipImages; 01658 GLboolean SwapBytes; 01659 GLboolean LsbFirst; 01660 GLboolean ClientStorage; 01661 GLboolean Invert; 01662 struct gl_buffer_object *BufferObj; 01663 }; 01664 01665 01666 01670 struct gl_client_array 01671 { 01672 GLint Size; 01673 GLenum Type; 01674 GLsizei Stride; 01675 GLsizei StrideB; 01676 const GLubyte *Ptr; 01677 GLboolean Enabled; 01678 GLboolean Normalized; 01681 struct gl_buffer_object *BufferObj; 01682 GLuint _MaxElement; 01683 }; 01684 01685 01690 struct gl_array_object 01691 { 01693 GLuint Name; 01694 01697 struct gl_client_array Vertex; 01698 struct gl_client_array Normal; 01699 struct gl_client_array Color; 01700 struct gl_client_array SecondaryColor; 01701 struct gl_client_array FogCoord; 01702 struct gl_client_array Index; 01703 struct gl_client_array EdgeFlag; 01704 struct gl_client_array TexCoord[MAX_TEXTURE_COORD_UNITS]; 01705 struct gl_client_array PointSize; 01709 struct gl_client_array VertexAttrib[VERT_ATTRIB_MAX]; 01710 01712 GLbitfield _Enabled; 01713 }; 01714 01715 01719 struct gl_array_attrib 01720 { 01721 struct gl_array_object *ArrayObj; 01722 struct gl_array_object *DefaultArrayObj; 01723 01724 GLint ActiveTexture; 01725 GLuint LockFirst; 01726 GLuint LockCount; 01728 GLbitfield NewState; 01730 #if FEATURE_ARB_vertex_buffer_object 01731 struct gl_buffer_object *NullBufferObj; 01732 struct gl_buffer_object *ArrayBufferObj; 01733 struct gl_buffer_object *ElementArrayBufferObj; 01734 #endif 01735 GLuint _MaxElement; /* Min of all enabled array's maxes */ 01736 }; 01737 01738 01742 struct gl_feedback 01743 { 01744 GLenum Type; 01745 GLbitfield _Mask; /* FB_* bits */ 01746 GLfloat *Buffer; 01747 GLuint BufferSize; 01748 GLuint Count; 01749 }; 01750 01751 01755 struct gl_selection 01756 { 01757 GLuint *Buffer; 01758 GLuint BufferSize; 01759 GLuint BufferCount; 01760 GLuint Hits; 01761 GLuint NameStackDepth; 01762 GLuint NameStack[MAX_NAME_STACK_DEPTH]; 01763 GLboolean HitFlag; 01764 GLfloat HitMinZ; 01765 GLfloat HitMaxZ; 01766 }; 01767 01768 01772 struct gl_1d_map 01773 { 01774 GLuint Order; 01775 GLfloat u1, u2, du; 01776 GLfloat *Points; 01777 }; 01778 01779 01783 struct gl_2d_map 01784 { 01785 GLuint Uorder; 01786 GLuint Vorder; 01787 GLfloat u1, u2, du; 01788 GLfloat v1, v2, dv; 01789 GLfloat *Points; 01790 }; 01791 01792 01796 struct gl_evaluators 01797 { 01802 struct gl_1d_map Map1Vertex3; 01803 struct gl_1d_map Map1Vertex4; 01804 struct gl_1d_map Map1Index; 01805 struct gl_1d_map Map1Color4; 01806 struct gl_1d_map Map1Normal; 01807 struct gl_1d_map Map1Texture1; 01808 struct gl_1d_map Map1Texture2; 01809 struct gl_1d_map Map1Texture3; 01810 struct gl_1d_map Map1Texture4; 01811 struct gl_1d_map Map1Attrib[16]; 01813 01818 struct gl_2d_map Map2Vertex3; 01819 struct gl_2d_map Map2Vertex4; 01820 struct gl_2d_map Map2Index; 01821 struct gl_2d_map Map2Color4; 01822 struct gl_2d_map Map2Normal; 01823 struct gl_2d_map Map2Texture1; 01824 struct gl_2d_map Map2Texture2; 01825 struct gl_2d_map Map2Texture3; 01826 struct gl_2d_map Map2Texture4; 01827 struct gl_2d_map Map2Attrib[16]; 01829 }; 01830 01831 01843 enum register_file 01844 { 01845 PROGRAM_TEMPORARY = 0, 01846 PROGRAM_LOCAL_PARAM = 1, 01847 PROGRAM_ENV_PARAM = 2, 01848 PROGRAM_STATE_VAR = 3, 01849 PROGRAM_INPUT = 4, 01850 PROGRAM_OUTPUT = 5, 01851 PROGRAM_NAMED_PARAM = 6, 01852 PROGRAM_CONSTANT = 7, 01853 PROGRAM_UNIFORM = 8, 01854 PROGRAM_VARYING = 9, 01855 PROGRAM_WRITE_ONLY = 10, 01856 PROGRAM_ADDRESS = 11, 01857 PROGRAM_SAMPLER = 12, 01858 PROGRAM_UNDEFINED = 13, 01859 PROGRAM_FILE_MAX 01860 }; 01861 01862 01864 struct prog_instruction; 01865 struct gl_program_parameter_list; 01866 struct gl_uniform_list; 01867 01868 01872 struct gl_program 01873 { 01874 GLuint Id; 01875 GLubyte *String; 01876 GLint RefCount; 01877 GLenum Target; 01878 GLenum Format; 01879 GLboolean Resident; 01880 01881 struct prog_instruction *Instructions; 01882 01883 GLbitfield InputsRead; 01884 GLbitfield OutputsWritten; 01885 GLbitfield InputFlags[MAX_PROGRAM_INPUTS]; 01886 GLbitfield OutputFlags[MAX_PROGRAM_OUTPUTS]; 01887 GLbitfield TexturesUsed[MAX_TEXTURE_UNITS]; 01888 GLbitfield SamplersUsed; 01889 GLbitfield ShadowSamplers; 01893 struct gl_program_parameter_list *Parameters; 01895 GLfloat LocalParams[MAX_PROGRAM_LOCAL_PARAMS][4]; 01896 01898 struct gl_program_parameter_list *Varying; 01900 struct gl_program_parameter_list *Attributes; 01901 01903 GLubyte SamplerUnits[MAX_SAMPLERS]; 01905 GLubyte SamplerTargets[MAX_SAMPLERS]; 01906 01909 GLuint NumInstructions; 01910 GLuint NumTemporaries; 01911 GLuint NumParameters; 01912 GLuint NumAttributes; 01913 GLuint NumAddressRegs; 01914 GLuint NumAluInstructions; 01915 GLuint NumTexInstructions; 01916 GLuint NumTexIndirections; 01920 GLuint NumNativeInstructions; 01921 GLuint NumNativeTemporaries; 01922 GLuint NumNativeParameters; 01923 GLuint NumNativeAttributes; 01924 GLuint NumNativeAddressRegs; 01925 GLuint NumNativeAluInstructions; 01926 GLuint NumNativeTexInstructions; 01927 GLuint NumNativeTexIndirections; 01929 }; 01930 01931 01933 struct gl_vertex_program 01934 { 01935 struct gl_program Base; 01936 GLboolean IsNVProgram; 01937 GLboolean IsPositionInvariant; 01938 void *TnlData; 01939 }; 01940 01941 01943 struct gl_fragment_program 01944 { 01945 struct gl_program Base; 01946 GLenum FogOption; 01947 GLboolean UsesKill; 01948 GLboolean UsesPointCoord; 01949 GLboolean UsesFrontFacing; 01950 GLboolean UsesFogFragCoord; 01951 }; 01952 01953 01957 struct gl_program_state 01958 { 01959 GLint ErrorPos; /* GL_PROGRAM_ERROR_POSITION_ARB/NV */ 01960 const char *ErrorString; /* GL_PROGRAM_ERROR_STRING_ARB/NV */ 01961 }; 01962 01963 01967 struct gl_vertex_program_state 01968 { 01969 GLboolean Enabled; 01970 GLboolean _Enabled; 01971 GLboolean PointSizeEnabled; 01972 GLboolean TwoSideEnabled; 01973 struct gl_vertex_program *Current; 01979 struct gl_vertex_program *_Current; 01980 01981 GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; 01983 /* For GL_NV_vertex_program only: */ 01984 GLenum TrackMatrix[MAX_PROGRAM_ENV_PARAMS / 4]; 01985 GLenum TrackMatrixTransform[MAX_PROGRAM_ENV_PARAMS / 4]; 01986 01988 GLboolean _MaintainTnlProgram; 01989 01991 struct gl_vertex_program *_TnlProgram; 01992 01994 struct gl_program_cache *Cache; 01995 01996 #if FEATURE_MESA_program_debug 01997 GLprogramcallbackMESA Callback; 01998 GLvoid *CallbackData; 01999 GLboolean CallbackEnabled; 02000 GLuint CurrentPosition; 02001 #endif 02002 }; 02003 02004 02008 struct gl_fragment_program_state 02009 { 02010 GLboolean Enabled; 02011 GLboolean _Enabled; 02012 struct gl_fragment_program *Current; 02018 struct gl_fragment_program *_Current; 02019 02020 GLfloat Parameters[MAX_PROGRAM_ENV_PARAMS][4]; 02023 GLboolean _MaintainTexEnvProgram; 02024 02026 struct gl_fragment_program *_TexEnvProgram; 02027 02029 struct gl_program_cache *Cache; 02030 02031 #if FEATURE_MESA_program_debug 02032 GLprogramcallbackMESA Callback; 02033 GLvoid *CallbackData; 02034 GLboolean CallbackEnabled; 02035 GLuint CurrentPosition; 02036 #endif 02037 }; 02038 02039 02043 #define ATI_FS_INPUT_PRIMARY 0 02044 #define ATI_FS_INPUT_SECONDARY 1 02045 02046 struct atifs_instruction; 02047 struct atifs_setupinst; 02048 02052 struct ati_fragment_shader 02053 { 02054 GLuint Id; 02055 GLint RefCount; 02056 struct atifs_instruction *Instructions[2]; 02057 struct atifs_setupinst *SetupInst[2]; 02058 GLfloat Constants[8][4]; 02059 GLbitfield LocalConstDef; 02060 GLubyte numArithInstr[2]; 02061 GLubyte regsAssigned[2]; 02062 GLubyte NumPasses; 02063 GLubyte cur_pass; 02064 GLubyte last_optype; 02065 GLboolean interpinp1; 02066 GLboolean isValid; 02067 GLuint swizzlerq; 02068 }; 02069 02073 struct gl_ati_fragment_shader_state 02074 { 02075 GLboolean Enabled; 02076 GLboolean _Enabled; 02077 GLboolean Compiling; 02078 GLfloat GlobalConstants[8][4]; 02079 struct ati_fragment_shader *Current; 02080 }; 02081 02082 02086 struct gl_query_object 02087 { 02088 GLenum Target; 02089 GLuint Id; 02090 GLuint64EXT Result; 02091 GLboolean Active; 02092 GLboolean Ready; 02093 }; 02094 02095 02099 struct gl_query_state 02100 { 02101 struct _mesa_HashTable *QueryObjects; 02102 struct gl_query_object *CurrentOcclusionObject; /* GL_ARB_occlusion_query */ 02103 struct gl_query_object *CurrentTimerObject; /* GL_EXT_timer_query */ 02104 }; 02105 02106 02108 struct gl_sl_pragmas 02109 { 02110 GLboolean Optimize; 02111 GLboolean Debug; 02112 }; 02113 02114 02118 struct gl_shader 02119 { 02120 GLenum Type; 02121 GLuint Name; 02122 GLint RefCount; 02123 GLboolean DeletePending; 02124 GLboolean CompileStatus; 02125 GLboolean Main; 02126 const GLchar *Source; 02127 struct gl_program *Program; 02128 GLchar *InfoLog; 02129 struct gl_sl_pragmas Pragmas; 02130 }; 02131 02132 02137 struct gl_shader_program 02138 { 02139 GLenum Type; 02140 GLuint Name; 02141 GLint RefCount; 02142 GLboolean DeletePending; 02143 02144 GLuint NumShaders; 02145 struct gl_shader **Shaders; 02148 struct gl_program_parameter_list *Attributes; 02149 02150 /* post-link info: */ 02151 struct gl_vertex_program *VertexProgram; 02152 struct gl_fragment_program *FragmentProgram; 02153 struct gl_uniform_list *Uniforms; 02154 struct gl_program_parameter_list *Varying; 02155 GLboolean LinkStatus; 02156 GLboolean Validated; 02157 GLchar *InfoLog; 02158 }; 02159 02160 02164 struct gl_shader_state 02165 { 02166 struct gl_shader_program *CurrentProgram; 02168 GLboolean EmitHighLevelInstructions; 02169 GLboolean EmitCondCodes; 02170 GLboolean EmitComments; 02171 void *MemPool; 02172 }; 02173 02174 02178 struct gl_shared_state 02179 { 02180 _glthread_Mutex Mutex; 02181 GLint RefCount; 02182 struct _mesa_HashTable *DisplayList; 02183 struct _mesa_HashTable *TexObjects; 02186 struct gl_texture_object *DefaultTex[NUM_TEXTURE_TARGETS]; 02187 02195 _glthread_Mutex TexMutex; 02196 GLuint TextureStateStamp; 02198 02199 02204 struct _mesa_HashTable *Programs; 02205 #if FEATURE_ARB_vertex_program 02206 struct gl_vertex_program *DefaultVertexProgram; 02207 #endif 02208 #if FEATURE_ARB_fragment_program 02209 struct gl_fragment_program *DefaultFragmentProgram; 02210 #endif 02211 02213 #if FEATURE_ATI_fragment_shader 02214 struct _mesa_HashTable *ATIShaders; 02215 struct ati_fragment_shader *DefaultFragmentShader; 02216 #endif 02217 02218 #if FEATURE_ARB_vertex_buffer_object || FEATURE_ARB_pixel_buffer_object 02219 struct _mesa_HashTable *BufferObjects; 02220 #endif 02221 02222 #if FEATURE_ARB_shader_objects 02223 02224 struct _mesa_HashTable *ShaderObjects; 02225 #endif 02226 02227 #if FEATURE_EXT_framebuffer_object 02228 struct _mesa_HashTable *RenderBuffers; 02229 struct _mesa_HashTable *FrameBuffers; 02230 #endif 02231 02233 struct _mesa_HashTable *ArrayObjects; 02234 02235 void *DriverData; 02236 }; 02237 02238 02239 02240 02250 struct gl_renderbuffer 02251 { 02252 #define RB_MAGIC 0xaabbccdd 02253 int Magic; 02254 _glthread_Mutex Mutex; 02255 GLuint ClassID; 02256 GLuint Name; 02257 GLint RefCount; 02258 GLuint Width, Height; 02259 GLenum InternalFormat; 02260 GLenum _ActualFormat; 02261 GLenum _BaseFormat; 02263 GLenum DataType; 02264 GLubyte RedBits; 02265 GLubyte GreenBits; 02266 GLubyte BlueBits; 02267 GLubyte AlphaBits; 02268 GLubyte IndexBits; 02269 GLubyte DepthBits; 02270 GLubyte StencilBits; 02271 GLvoid *Data; 02273 /* Used to wrap one renderbuffer around another: */ 02274 struct gl_renderbuffer *Wrapped; 02275 02276 /* Delete this renderbuffer */ 02277 void (*Delete)(struct gl_renderbuffer *rb); 02278 02279 /* Allocate new storage for this renderbuffer */ 02280 GLboolean (*AllocStorage)(GLcontext *ctx, struct gl_renderbuffer *rb, 02281 GLenum internalFormat, 02282 GLuint width, GLuint height); 02283 02284 /* Lock/Unlock are called before/after calling the Get/Put functions. 02285 * Not sure this is the right place for these yet. 02286 void (*Lock)(GLcontext *ctx, struct gl_renderbuffer *rb); 02287 void (*Unlock)(GLcontext *ctx, struct gl_renderbuffer *rb); 02288 */ 02289 02290 /* Return a pointer to the element/pixel at (x,y). 02291 * Should return NULL if the buffer memory can't be directly addressed. 02292 */ 02293 void *(*GetPointer)(GLcontext *ctx, struct gl_renderbuffer *rb, 02294 GLint x, GLint y); 02295 02296 /* Get/Read a row of values. 02297 * The values will be of format _BaseFormat and type DataType. 02298 */ 02299 void (*GetRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02300 GLint x, GLint y, void *values); 02301 02302 /* Get/Read values at arbitrary locations. 02303 * The values will be of format _BaseFormat and type DataType. 02304 */ 02305 void (*GetValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02306 const GLint x[], const GLint y[], void *values); 02307 02308 /* Put/Write a row of values. 02309 * The values will be of format _BaseFormat and type DataType. 02310 */ 02311 void (*PutRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02312 GLint x, GLint y, const void *values, const GLubyte *mask); 02313 02314 /* Put/Write a row of RGB values. This is a special-case routine that's 02315 * only used for RGBA renderbuffers when the source data is GL_RGB. That's 02316 * a common case for glDrawPixels and some triangle routines. 02317 * The values will be of format GL_RGB and type DataType. 02318 */ 02319 void (*PutRowRGB)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02320 GLint x, GLint y, const void *values, const GLubyte *mask); 02321 02322 02323 /* Put/Write a row of identical values. 02324 * The values will be of format _BaseFormat and type DataType. 02325 */ 02326 void (*PutMonoRow)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02327 GLint x, GLint y, const void *value, const GLubyte *mask); 02328 02329 /* Put/Write values at arbitrary locations. 02330 * The values will be of format _BaseFormat and type DataType. 02331 */ 02332 void (*PutValues)(GLcontext *ctx, struct gl_renderbuffer *rb, GLuint count, 02333 const GLint x[], const GLint y[], const void *values, 02334 const GLubyte *mask); 02335 /* Put/Write identical values at arbitrary locations. 02336 * The values will be of format _BaseFormat and type DataType. 02337 */ 02338 void (*PutMonoValues)(GLcontext *ctx, struct gl_renderbuffer *rb, 02339 GLuint count, const GLint x[], const GLint y[], 02340 const void *value, const GLubyte *mask); 02341 }; 02342 02343 02349 struct gl_renderbuffer_attachment 02350 { 02351 GLenum Type; 02352 GLboolean Complete; 02353 02358 struct gl_renderbuffer *Renderbuffer; 02359 02364 struct gl_texture_object *Texture; 02365 GLuint TextureLevel; 02366 GLuint CubeMapFace; 02367 GLuint Zoffset; 02369 }; 02370 02371 02377 struct gl_framebuffer 02378 { 02379 _glthread_Mutex Mutex; 02387 GLuint Name; 02388 02389 GLint RefCount; 02390 GLboolean DeletePending; 02391 02392 GLvisual Visual; 02396 GLboolean Initialized; 02397 02398 GLuint Width, Height; 02402 GLint _Xmin, _Xmax; 02403 GLint _Ymin, _Ymax; 02405 02408 GLuint _DepthMax; 02409 GLfloat _DepthMaxF; 02410 GLfloat _MRD; 02412 02413 GLenum _Status; /* One of the GL_FRAMEBUFFER_(IN)COMPLETE_* tokens */ 02414 02415 /* Array of all renderbuffer attachments, indexed by BUFFER_* tokens. */ 02416 struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; 02417 02418 /* In unextended OpenGL these vars are part of the GL_COLOR_BUFFER 02419 * attribute group and GL_PIXEL attribute group, respectively. 02420 */ 02421 GLenum ColorDrawBuffer[MAX_DRAW_BUFFERS]; 02422 GLenum ColorReadBuffer; 02423 02425 GLuint _NumColorDrawBuffers; 02426 GLint _ColorDrawBufferIndexes[MAX_DRAW_BUFFERS]; 02427 GLint _ColorReadBufferIndex; /* -1 = None */ 02428 struct gl_renderbuffer *_ColorDrawBuffers[MAX_DRAW_BUFFERS]; 02429 struct gl_renderbuffer *_ColorReadBuffer; 02430 02433 struct gl_renderbuffer *_DepthBuffer; 02434 struct gl_renderbuffer *_StencilBuffer; 02435 02437 void (*Delete)(struct gl_framebuffer *fb); 02438 }; 02439 02440 02444 struct gl_program_constants 02445 { 02446 /* logical limits */ 02447 GLuint MaxInstructions; 02448 GLuint MaxAluInstructions; /* fragment programs only, for now */ 02449 GLuint MaxTexInstructions; /* fragment programs only, for now */ 02450 GLuint MaxTexIndirections; /* fragment programs only, for now */ 02451 GLuint MaxAttribs; 02452 GLuint MaxTemps; 02453 GLuint MaxAddressRegs; /* vertex program only, for now */ 02454 GLuint MaxParameters; 02455 GLuint MaxLocalParams; 02456 GLuint MaxEnvParams; 02457 /* native/hardware limits */ 02458 GLuint MaxNativeInstructions; 02459 GLuint MaxNativeAluInstructions; /* fragment programs only, for now */ 02460 GLuint MaxNativeTexInstructions; /* fragment programs only, for now */ 02461 GLuint MaxNativeTexIndirections; /* fragment programs only, for now */ 02462 GLuint MaxNativeAttribs; 02463 GLuint MaxNativeTemps; 02464 GLuint MaxNativeAddressRegs; /* vertex program only, for now */ 02465 GLuint MaxNativeParameters; 02466 /* For shaders */ 02467 GLuint MaxUniformComponents; 02468 }; 02469 02470 02475 struct gl_constants 02476 { 02477 GLint MaxTextureLevels; 02478 GLint Max3DTextureLevels; 02479 GLint MaxCubeTextureLevels; 02480 GLint MaxArrayTextureLayers; 02481 GLint MaxTextureRectSize; /* GL_NV_texture_rectangle */ 02482 GLuint MaxTextureCoordUnits; 02483 GLuint MaxTextureImageUnits; 02484 GLuint MaxTextureUnits; 02485 GLfloat MaxTextureMaxAnisotropy; 02486 GLfloat MaxTextureLodBias; 02487 GLuint MaxArrayLockSize; 02488 GLint SubPixelBits; 02489 GLfloat MinPointSize, MaxPointSize; /* aliased */ 02490 GLfloat MinPointSizeAA, MaxPointSizeAA; /* antialiased */ 02491 GLfloat PointSizeGranularity; 02492 GLfloat MinLineWidth, MaxLineWidth; /* aliased */ 02493 GLfloat MinLineWidthAA, MaxLineWidthAA; /* antialiased */ 02494 GLfloat LineWidthGranularity; 02495 GLuint MaxColorTableSize; 02496 GLuint MaxConvolutionWidth; 02497 GLuint MaxConvolutionHeight; 02498 GLuint MaxClipPlanes; 02499 GLuint MaxLights; 02500 GLfloat MaxShininess; /* GL_NV_light_max_exponent */ 02501 GLfloat MaxSpotExponent; /* GL_NV_light_max_exponent */ 02502 GLuint MaxViewportWidth, MaxViewportHeight; 02503 struct gl_program_constants VertexProgram; /* GL_ARB_vertex_program */ 02504 struct gl_program_constants FragmentProgram; /* GL_ARB_fragment_program */ 02505 /* shared by vertex and fragment program: */ 02506 GLuint MaxProgramMatrices; 02507 GLuint MaxProgramMatrixStackDepth; 02508 /* vertex array / buffer object bounds checking */ 02509 GLboolean CheckArrayBounds; 02510 /* GL_ARB_draw_buffers */ 02511 GLuint MaxDrawBuffers; 02512 /* GL_OES_read_format */ 02513 GLenum ColorReadFormat; 02514 GLenum ColorReadType; 02515 /* GL_EXT_framebuffer_object */ 02516 GLuint MaxColorAttachments; 02517 GLuint MaxRenderbufferSize; 02518 /* GL_ARB_vertex_shader */ 02519 GLuint MaxVertexTextureImageUnits; 02520 GLuint MaxVarying; 02521 }; 02522 02523 02528 struct gl_extensions 02529 { 02536 GLboolean dummy; /* don't remove this! */ 02537 GLboolean ARB_depth_texture; 02538 GLboolean ARB_draw_buffers; 02539 GLboolean ARB_fragment_program; 02540 GLboolean ARB_fragment_program_shadow; 02541 GLboolean ARB_fragment_shader; 02542 GLboolean ARB_half_float_pixel; 02543 GLboolean ARB_imaging; 02544 GLboolean ARB_multisample; 02545 GLboolean ARB_multitexture; 02546 GLboolean ARB_occlusion_query; 02547 GLboolean ARB_point_sprite; 02548 GLboolean ARB_shader_objects; 02549 GLboolean ARB_shading_language_100; 02550 GLboolean ARB_shading_language_120; 02551 GLboolean ARB_shadow; 02552 GLboolean ARB_texture_border_clamp; 02553 GLboolean ARB_texture_compression; 02554 GLboolean ARB_texture_cube_map; 02555 GLboolean ARB_texture_env_combine; 02556 GLboolean ARB_texture_env_crossbar; 02557 GLboolean ARB_texture_env_dot3; 02558 GLboolean ARB_texture_float; 02559 GLboolean ARB_texture_mirrored_repeat; 02560 GLboolean ARB_texture_non_power_of_two; 02561 GLboolean ARB_transpose_matrix; 02562 GLboolean ARB_vertex_buffer_object; 02563 GLboolean ARB_vertex_program; 02564 GLboolean ARB_vertex_shader; 02565 GLboolean ARB_window_pos; 02566 GLboolean EXT_abgr; 02567 GLboolean EXT_bgra; 02568 GLboolean EXT_blend_color; 02569 GLboolean EXT_blend_equation_separate; 02570 GLboolean EXT_blend_func_separate; 02571 GLboolean EXT_blend_logic_op; 02572 GLboolean EXT_blend_minmax; 02573 GLboolean EXT_blend_subtract; 02574 GLboolean EXT_clip_volume_hint; 02575 GLboolean EXT_cull_vertex; 02576 GLboolean EXT_convolution; 02577 GLboolean EXT_compiled_vertex_array; 02578 GLboolean EXT_copy_texture; 02579 GLboolean EXT_depth_bounds_test; 02580 GLboolean EXT_draw_range_elements; 02581 GLboolean EXT_framebuffer_object; 02582 GLboolean EXT_fog_coord; 02583 GLboolean EXT_framebuffer_blit; 02584 GLboolean EXT_gpu_program_parameters; 02585 GLboolean EXT_histogram; 02586 GLboolean EXT_multi_draw_arrays; 02587 GLboolean EXT_paletted_texture; 02588 GLboolean EXT_packed_depth_stencil; 02589 GLboolean EXT_packed_pixels; 02590 GLboolean EXT_pixel_buffer_object; 02591 GLboolean EXT_point_parameters; 02592 GLboolean EXT_polygon_offset; 02593 GLboolean EXT_rescale_normal; 02594 GLboolean EXT_shadow_funcs; 02595 GLboolean EXT_secondary_color; 02596 GLboolean EXT_separate_specular_color; 02597 GLboolean EXT_shared_texture_palette; 02598 GLboolean EXT_stencil_wrap; 02599 GLboolean EXT_stencil_two_side; 02600 GLboolean EXT_subtexture; 02601 GLboolean EXT_texture; 02602 GLboolean EXT_texture_object; 02603 GLboolean EXT_texture3D; 02604 GLboolean EXT_texture_compression_s3tc; 02605 GLboolean EXT_texture_env_add; 02606 GLboolean EXT_texture_env_combine; 02607 GLboolean EXT_texture_env_dot3; 02608 GLboolean EXT_texture_filter_anisotropic; 02609 GLboolean EXT_texture_lod_bias; 02610 GLboolean EXT_texture_mirror_clamp; 02611 GLboolean EXT_texture_sRGB; 02612 GLboolean EXT_timer_query; 02613 GLboolean EXT_vertex_array; 02614 GLboolean EXT_vertex_array_set; 02615 /* vendor extensions */ 02616 GLboolean APPLE_client_storage; 02617 GLboolean APPLE_packed_pixels; 02618 GLboolean APPLE_vertex_array_object; 02619 GLboolean ATI_texture_mirror_once; 02620 GLboolean ATI_texture_env_combine3; 02621 GLboolean ATI_fragment_shader; 02622 GLboolean ATI_separate_stencil; 02623 GLboolean IBM_rasterpos_clip; 02624 GLboolean IBM_multimode_draw_arrays; 02625 GLboolean MESA_pack_invert; 02626 GLboolean MESA_packed_depth_stencil; 02627 GLboolean MESA_program_debug; 02628 GLboolean MESA_resize_buffers; 02629 GLboolean MESA_ycbcr_texture; 02630 GLboolean MESA_texture_array; 02631 GLboolean NV_blend_square; 02632 GLboolean NV_fragment_program; 02633 GLboolean NV_light_max_exponent; 02634 GLboolean NV_point_sprite; 02635 GLboolean NV_texgen_reflection; 02636 GLboolean NV_texture_rectangle; 02637 GLboolean NV_vertex_program; 02638 GLboolean NV_vertex_program1_1; 02639 GLboolean OES_read_format; 02640 GLboolean SGI_color_matrix; 02641 GLboolean SGI_color_table; 02642 GLboolean SGI_texture_color_table; 02643 GLboolean SGIS_generate_mipmap; 02644 GLboolean SGIS_texture_edge_clamp; 02645 GLboolean SGIS_texture_lod; 02646 GLboolean SGIX_shadow; 02647 GLboolean SGIX_shadow_ambient; /* or GL_ARB_shadow_ambient */ 02648 GLboolean TDFX_texture_compression_FXT1; 02649 GLboolean S3_s3tc; 02651 /* The extension string */ 02652 const GLubyte *String; 02653 }; 02654 02655 02659 struct gl_matrix_stack 02660 { 02661 GLmatrix *Top; 02662 GLmatrix *Stack; 02663 GLuint Depth; 02664 GLuint MaxDepth; 02665 GLuint DirtyFlag; 02666 }; 02667 02668 02675 #define IMAGE_SCALE_BIAS_BIT 0x1 02676 #define IMAGE_SHIFT_OFFSET_BIT 0x2 02677 #define IMAGE_MAP_COLOR_BIT 0x4 02678 #define IMAGE_COLOR_TABLE_BIT 0x8 02679 #define IMAGE_CONVOLUTION_BIT 0x10 02680 #define IMAGE_POST_CONVOLUTION_SCALE_BIAS 0x20 02681 #define IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT 0x40 02682 #define IMAGE_COLOR_MATRIX_BIT 0x80 02683 #define IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT 0x100 02684 #define IMAGE_HISTOGRAM_BIT 0x200 02685 #define IMAGE_MIN_MAX_BIT 0x400 02686 #define IMAGE_CLAMP_BIT 0x800 /* extra */ 02687 02688 02690 #define IMAGE_PRE_CONVOLUTION_BITS (IMAGE_SCALE_BIAS_BIT | \ 02691 IMAGE_SHIFT_OFFSET_BIT | \ 02692 IMAGE_MAP_COLOR_BIT | \ 02693 IMAGE_COLOR_TABLE_BIT) 02694 02696 #define IMAGE_POST_CONVOLUTION_BITS (IMAGE_POST_CONVOLUTION_SCALE_BIAS | \ 02697 IMAGE_POST_CONVOLUTION_COLOR_TABLE_BIT | \ 02698 IMAGE_COLOR_MATRIX_BIT | \ 02699 IMAGE_POST_COLOR_MATRIX_COLOR_TABLE_BIT |\ 02700 IMAGE_HISTOGRAM_BIT | \ 02701 IMAGE_MIN_MAX_BIT) 02702 02711 #define _NEW_MODELVIEW 0x1 02712 #define _NEW_PROJECTION 0x2 02713 #define _NEW_TEXTURE_MATRIX 0x4 02714 #define _NEW_COLOR_MATRIX 0x8 02715 #define _NEW_ACCUM 0x10 02716 #define _NEW_COLOR 0x20 02717 #define _NEW_DEPTH 0x40 02718 #define _NEW_EVAL 0x80 02719 #define _NEW_FOG 0x100 02720 #define _NEW_HINT 0x200 02721 #define _NEW_LIGHT 0x400 02722 #define _NEW_LINE 0x800 02723 #define _NEW_PIXEL 0x1000 02724 #define _NEW_POINT 0x2000 02725 #define _NEW_POLYGON 0x4000 02726 #define _NEW_POLYGONSTIPPLE 0x8000 02727 #define _NEW_SCISSOR 0x10000 02728 #define _NEW_STENCIL 0x20000 02729 #define _NEW_TEXTURE 0x40000 02730 #define _NEW_TRANSFORM 0x80000 02731 #define _NEW_VIEWPORT 0x100000 02732 #define _NEW_PACKUNPACK 0x200000 02733 #define _NEW_ARRAY 0x400000 02734 #define _NEW_RENDERMODE 0x800000 02735 #define _NEW_BUFFERS 0x1000000 02736 #define _NEW_MULTISAMPLE 0x2000000 02737 #define _NEW_TRACK_MATRIX 0x4000000 02738 #define _NEW_PROGRAM 0x8000000 02739 #define _NEW_ALL ~0 02740 02749 #define _NEW_ARRAY_VERTEX VERT_BIT_POS 02750 #define _NEW_ARRAY_WEIGHT VERT_BIT_WEIGHT 02751 #define _NEW_ARRAY_NORMAL VERT_BIT_NORMAL 02752 #define _NEW_ARRAY_COLOR0 VERT_BIT_COLOR0 02753 #define _NEW_ARRAY_COLOR1 VERT_BIT_COLOR1 02754 #define _NEW_ARRAY_FOGCOORD VERT_BIT_FOG 02755 #define _NEW_ARRAY_INDEX VERT_BIT_COLOR_INDEX 02756 #define _NEW_ARRAY_EDGEFLAG VERT_BIT_EDGEFLAG 02757 #define _NEW_ARRAY_POINT_SIZE VERT_BIT_COLOR_INDEX /* aliased */ 02758 #define _NEW_ARRAY_TEXCOORD_0 VERT_BIT_TEX0 02759 #define _NEW_ARRAY_TEXCOORD_1 VERT_BIT_TEX1 02760 #define _NEW_ARRAY_TEXCOORD_2 VERT_BIT_TEX2 02761 #define _NEW_ARRAY_TEXCOORD_3 VERT_BIT_TEX3 02762 #define _NEW_ARRAY_TEXCOORD_4 VERT_BIT_TEX4 02763 #define _NEW_ARRAY_TEXCOORD_5 VERT_BIT_TEX5 02764 #define _NEW_ARRAY_TEXCOORD_6 VERT_BIT_TEX6 02765 #define _NEW_ARRAY_TEXCOORD_7 VERT_BIT_TEX7 02766 #define _NEW_ARRAY_ATTRIB_0 VERT_BIT_GENERIC0 /* start at bit 16 */ 02767 #define _NEW_ARRAY_ALL 0xffffffff 02768 02769 02770 #define _NEW_ARRAY_TEXCOORD(i) (_NEW_ARRAY_TEXCOORD_0 << (i)) 02771 #define _NEW_ARRAY_ATTRIB(i) (_NEW_ARRAY_ATTRIB_0 << (i)) 02772 02782 #define DD_FLATSHADE 0x1 02783 #define DD_SEPARATE_SPECULAR 0x2 02784 #define DD_TRI_CULL_FRONT_BACK 0x4 /* special case on some hw */ 02785 #define DD_TRI_LIGHT_TWOSIDE 0x8 02786 #define DD_TRI_UNFILLED 0x10 02787 #define DD_TRI_SMOOTH 0x20 02788 #define DD_TRI_STIPPLE 0x40 02789 #define DD_TRI_OFFSET 0x80 02790 #define DD_LINE_SMOOTH 0x100 02791 #define DD_LINE_STIPPLE 0x200 02792 #define DD_LINE_WIDTH 0x400 02793 #define DD_POINT_SMOOTH 0x800 02794 #define DD_POINT_SIZE 0x1000 02795 #define DD_POINT_ATTEN 0x2000 02796 #define DD_TRI_TWOSTENCIL 0x4000 02797 02804 #define _DD_NEW_FLATSHADE _NEW_LIGHT 02805 #define _DD_NEW_SEPARATE_SPECULAR (_NEW_LIGHT | _NEW_FOG | _NEW_PROGRAM) 02806 #define _DD_NEW_TRI_CULL_FRONT_BACK _NEW_POLYGON 02807 #define _DD_NEW_TRI_LIGHT_TWOSIDE _NEW_LIGHT 02808 #define _DD_NEW_TRI_UNFILLED _NEW_POLYGON 02809 #define _DD_NEW_TRI_SMOOTH _NEW_POLYGON 02810 #define _DD_NEW_TRI_STIPPLE _NEW_POLYGON 02811 #define _DD_NEW_TRI_OFFSET _NEW_POLYGON 02812 #define _DD_NEW_LINE_SMOOTH _NEW_LINE 02813 #define _DD_NEW_LINE_STIPPLE _NEW_LINE 02814 #define _DD_NEW_LINE_WIDTH _NEW_LINE 02815 #define _DD_NEW_POINT_SMOOTH _NEW_POINT 02816 #define _DD_NEW_POINT_SIZE _NEW_POINT 02817 #define _DD_NEW_POINT_ATTEN _NEW_POINT 02818 02821 #define _MESA_NEW_NEED_EYE_COORDS (_NEW_LIGHT | \ 02822 _NEW_TEXTURE | \ 02823 _NEW_POINT | \ 02824 _NEW_PROGRAM | \ 02825 _NEW_MODELVIEW) 02826 02827 #define _MESA_NEW_NEED_NORMALS (_NEW_LIGHT | \ 02828 _NEW_TEXTURE) 02829 02830 #define _IMAGE_NEW_TRANSFER_STATE (_NEW_PIXEL | _NEW_COLOR_MATRIX) 02831 02832 02833 02834 02835 /* 02836 * Forward declaration of display list data types: 02837 */ 02838 union node; 02839 typedef union node Node; 02840 02841 02842 /* This has to be included here. */ 02843 #include "dd.h" 02844 02845 02846 #define NUM_VERTEX_FORMAT_ENTRIES (sizeof(GLvertexformat) / sizeof(void *)) 02847 02851 struct gl_tnl_module 02852 { 02856 const GLvertexformat *Current; 02857 02863 struct { 02864 _glapi_proc * location; 02865 _glapi_proc function; 02866 } Swapped[NUM_VERTEX_FORMAT_ENTRIES]; 02867 GLuint SwapCount; 02869 }; 02870 02871 /* Strictly this is a tnl/ private concept, but it doesn't seem 02872 * worthwhile adding a tnl private structure just to hold this one bit 02873 * of information: 02874 */ 02875 #define MESA_DLIST_DANGLING_REFS 0x1 02876 02877 /* Provide a location where information about a display list can be 02878 * collected. Could be extended with driverPrivate structures, 02879 * etc. in the future. 02880 */ 02881 struct mesa_display_list 02882 { 02883 Node *node; 02884 GLuint id; 02885 GLbitfield flags; 02886 }; 02887 02888 02892 struct gl_dlist_state 02893 { 02894 GLuint CallDepth; 02896 struct mesa_display_list *CurrentList; 02897 Node *CurrentListPtr; 02898 GLuint CurrentListNum; 02899 Node *CurrentBlock; 02900 GLuint CurrentPos; 02902 GLvertexformat ListVtxfmt; 02903 02904 GLubyte ActiveAttribSize[VERT_ATTRIB_MAX]; 02905 GLfloat CurrentAttrib[VERT_ATTRIB_MAX][4]; 02906 02907 GLubyte ActiveMaterialSize[MAT_ATTRIB_MAX]; 02908 GLfloat CurrentMaterial[MAT_ATTRIB_MAX][4]; 02909 02910 GLubyte ActiveIndex; 02911 GLfloat CurrentIndex; 02912 02913 GLubyte ActiveEdgeFlag; 02914 GLboolean CurrentEdgeFlag; 02915 }; 02916 02917 02928 struct __GLcontextRec 02929 { 02931 struct gl_shared_state *Shared; 02932 02935 struct _glapi_table *Save; 02936 struct _glapi_table *Exec; 02937 struct _glapi_table *CurrentDispatch; 02939 02940 GLvisual Visual; 02941 GLframebuffer *DrawBuffer; 02942 GLframebuffer *ReadBuffer; 02943 GLframebuffer *WinSysDrawBuffer; 02944 GLframebuffer *WinSysReadBuffer; 02949 struct dd_function_table Driver; 02950 02951 void *DriverCtx; 02954 struct gl_constants Const; 02955 02958 struct gl_matrix_stack ModelviewMatrixStack; 02959 struct gl_matrix_stack ProjectionMatrixStack; 02960 struct gl_matrix_stack ColorMatrixStack; 02961 struct gl_matrix_stack TextureMatrixStack[MAX_TEXTURE_UNITS]; 02962 struct gl_matrix_stack ProgramMatrixStack[MAX_PROGRAM_MATRICES]; 02963 struct gl_matrix_stack *CurrentStack; 02965 02967 GLmatrix _ModelProjectMatrix; 02968 02970 struct gl_dlist_state ListState; 02971 02972 GLboolean ExecuteFlag; 02973 GLboolean CompileFlag; 02976 struct gl_extensions Extensions; 02977 02980 GLuint AttribStackDepth; 02981 struct gl_attrib_node *AttribStack[MAX_ATTRIB_STACK_DEPTH]; 02990 struct gl_accum_attrib Accum; 02991 struct gl_colorbuffer_attrib Color; 02992 struct gl_current_attrib Current; 02993 struct gl_depthbuffer_attrib Depth; 02994 struct gl_eval_attrib Eval; 02995 struct gl_fog_attrib Fog; 02996 struct gl_hint_attrib Hint; 02997 struct gl_light_attrib Light; 02998 struct gl_line_attrib Line; 02999 struct gl_list_attrib List; 03000 struct gl_multisample_attrib Multisample; 03001 struct gl_pixel_attrib Pixel; 03002 struct gl_point_attrib Point; 03003 struct gl_polygon_attrib Polygon; 03004 GLuint PolygonStipple[32]; 03005 struct gl_scissor_attrib Scissor; 03006 struct gl_stencil_attrib Stencil; 03007 struct gl_texture_attrib Texture; 03008 struct gl_transform_attrib Transform; 03009 struct gl_viewport_attrib Viewport; 03011 03014 GLuint ClientAttribStackDepth; 03015 struct gl_attrib_node *ClientAttribStack[MAX_CLIENT_ATTRIB_STACK_DEPTH]; 03020 struct gl_array_attrib Array; 03021 struct gl_pixelstore_attrib Pack; 03022 struct gl_pixelstore_attrib Unpack; 03023 struct gl_pixelstore_attrib DefaultPacking; 03025 03028 struct gl_pixelmaps PixelMaps; 03029 struct gl_histogram_attrib Histogram; 03030 struct gl_minmax_attrib MinMax; 03031 struct gl_convolution_attrib Convolution1D; 03032 struct gl_convolution_attrib Convolution2D; 03033 struct gl_convolution_attrib Separable2D; 03034 03035 struct gl_evaluators EvalMap; 03036 struct gl_feedback Feedback; 03037 struct gl_selection Select; 03039 struct gl_color_table ColorTable[COLORTABLE_MAX]; 03040 struct gl_color_table ProxyColorTable[COLORTABLE_MAX]; 03041 #if 0 03042 struct gl_color_table PostConvolutionColorTable; 03043 struct gl_color_table ProxyPostConvolutionColorTable; 03044 struct gl_color_table PostColorMatrixColorTable; 03045 struct gl_color_table ProxyPostColorMatrixColorTable; 03046 #endif 03047 03048 struct gl_program_state Program; 03049 struct gl_vertex_program_state VertexProgram; 03050 struct gl_fragment_program_state FragmentProgram; 03051 struct gl_ati_fragment_shader_state ATIFragmentShader; 03053 struct gl_query_state Query; 03055 struct gl_shader_state Shader; 03057 03058 #if FEATURE_EXT_framebuffer_object 03059 struct gl_renderbuffer *CurrentRenderbuffer; 03060 #endif 03061 03062 GLenum ErrorValue; 03063 GLenum RenderMode; 03064 GLbitfield NewState; 03071 GLbitfield _TriangleCaps; 03072 GLbitfield _ImageTransferState; 03073 GLfloat _EyeZDir[3]; 03074 GLfloat _ModelViewInvScale; 03075 GLboolean _NeedEyeCoords; 03076 GLboolean _ForceEyeCoords; 03077 GLenum _CurrentProgram; /* currently executing program */ 03078 03079 GLuint TextureStateTimestamp; /* detect changes to shared state */ 03080 03081 struct gl_shine_tab *_ShineTable[2]; 03082 struct gl_shine_tab *_ShineTabList; 03085 struct gl_list_extensions ListExt; 03089 GLboolean FirstTimeCurrent; 03093 GLboolean NoDither; 03094 03096 GLboolean Mesa_DXTn; 03097 03099 struct gl_tnl_module TnlModule; 03100 03107 void *swrast_context; 03108 void *swsetup_context; 03109 void *swtnl_context; 03110 void *swtnl_im; 03111 void *acache_context; 03112 void *aelt_context; 03114 }; 03115 03116 03118 extern const char *_mesa_prim_name[GL_POLYGON+4]; 03119 03120 03121 #ifdef DEBUG 03122 extern int MESA_VERBOSE; 03123 extern int MESA_DEBUG_FLAGS; 03124 # define MESA_FUNCTION __FUNCTION__ 03125 #else 03126 # define MESA_VERBOSE 0 03127 # define MESA_DEBUG_FLAGS 0 03128 # define MESA_FUNCTION "a function" 03129 # ifndef NDEBUG 03130 # define NDEBUG 03131 # endif 03132 #endif 03133 03134 03135 enum _verbose 03136 { 03137 VERBOSE_VARRAY = 0x0001, 03138 VERBOSE_TEXTURE = 0x0002, 03139 VERBOSE_IMMEDIATE = 0x0004, 03140 VERBOSE_PIPELINE = 0x0008, 03141 VERBOSE_DRIVER = 0x0010, 03142 VERBOSE_STATE = 0x0020, 03143 VERBOSE_API = 0x0040, 03144 VERBOSE_DISPLAY_LIST = 0x0100, 03145 VERBOSE_LIGHTING = 0x0200, 03146 VERBOSE_PRIMS = 0x0400, 03147 VERBOSE_VERTS = 0x0800, 03148 VERBOSE_DISASSEM = 0x1000, 03149 VERBOSE_GLSL = 0x2000, 03150 VERBOSE_GLSL_DUMP = 0x4000 03151 }; 03152 03153 03154 enum _debug 03155 { 03156 DEBUG_ALWAYS_FLUSH = 0x1 03157 }; 03158 03159 03160 03161 #define Elements(x) sizeof(x)/sizeof(*(x)) 03162 03163 03164 #endif /* TYPES_H */ Generated on Sun May 27 2012 04:20:25 for ReactOS by
1.7.6.1
|