doom3-gpl
Doom 3 GPL source release
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
draw_r200.cpp
Go to the documentation of this file.
1 /*
2 ===========================================================================
3 
4 Doom 3 GPL Source Code
5 Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company.
6 
7 This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?).
8 
9 Doom 3 Source Code is free software: you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation, either version 3 of the License, or
12 (at your option) any later version.
13 
14 Doom 3 Source Code 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
17 GNU General Public License for more details.
18 
19 You should have received a copy of the GNU General Public License
20 along with Doom 3 Source Code. If not, see <http://www.gnu.org/licenses/>.
21 
22 In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below.
23 
24 If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA.
25 
26 ===========================================================================
27 */
28 #include "../idlib/precompiled.h"
29 #pragma hdrstop
30 
31 #include "tr_local.h"
32 
33 /*
34 
35  There are not enough vertex program texture coordinate outputs
36  to have unique texture coordinates for bump, specular, and diffuse,
37  so diffuse and specular are assumed to be the same mapping.
38 
39  To handle properly, those cases with different diffuse and specular
40  mapping will need to be run as two passes.
41 
42 */
43 
44 // changed from 1 to 255 to not conflict with ARB2 program names
45 static int FPROG_FAST_PATH = 255;
46 
47 typedef struct {
57 
58 static atiFragmentShaderInfo_t fsi;
59 
60 typedef struct {
61  // vertex shader invariants
62  int lightPos; // light position in object coordinates
63  int viewerPos; // viewer position in object coordinates
64  int lightProjectS; // projected light s texgen
65  int lightProjectT; // projected light t texgen
66  int lightProjectQ; // projected light q texgen
67  int lightFalloffS; // projected light falloff s texgen
68  int bumpTransformS; // bump TEX0 S transformation
69  int bumpTransformT; // bump TEX0 T transformation
70  int colorTransformS; // diffuse/specular texture matrix
71  int colorTransformT; // diffuse/specular texture matrix
72 
73  // vertex shader variants
74  int texCoords;
76  int normals;
77  int tangents;
79 
81 
82 static atiVertexShaderInfo_t vsi;
83 
84 /*
85 ===================
86 RB_R200_ARB_DrawInteraction
87 
88 ===================
89 */
90 static void RB_R200_ARB_DrawInteraction( const drawInteraction_t *din ) {
91  // check for the case we can't handle in a single pass (we could calculate this at shader parse time to optimize)
93  && memcmp( din->specularMatrix, din->diffuseMatrix, sizeof( din->diffuseMatrix ) ) ) {
94 // common->Printf( "Note: Shader %s drawn as two pass on R200\n", din->surf->shader->getName() );
95 
96  // draw the specular as a separate pass with a black diffuse map
98  d = *din;
100  memcpy( d.diffuseMatrix, d.specularMatrix, sizeof( d.diffuseMatrix ) );
101  RB_R200_ARB_DrawInteraction( &d );
102 
103  // now fall through and draw the diffuse pass with a black specular map
104  d = *din;
105  din = &d;
107  }
108 
109  // load all the vertex program parameters
122 
123  const srfTriangles_t *tri = din->surf->geo;
124  idDrawVert *ac = (idDrawVert *)vertexCache.Position( tri->ambientCache );
125  qglVertexPointer( 3, GL_FLOAT, sizeof( idDrawVert ), (void *)&ac->xyz );
126 
127  static const float zero[4] = { 0, 0, 0, 0 };
128  static const float one[4] = { 1, 1, 1, 1 };
129  static const float negOne[4] = { -1, -1, -1, -1 };
130 
131  switch ( din->vertexColor ) {
132  case SVC_IGNORE:
135  break;
136  case SVC_MODULATE:
139  break;
143  break;
144  }
145 
146 
147  // texture 0 = light projection
148  // texture 1 = light falloff
149  // texture 2 = surface diffuse
150  // texture 3 = surface specular
151  // texture 4 = surface bump
152  // texture 5 = normalization cube map
153 
154  GL_SelectTexture( 5 );
155  if ( din->ambientLight ) {
157  } else {
159  }
160 
161  GL_SelectTexture( 4 );
162  din->bumpImage->Bind();
163 
164  GL_SelectTexture( 3 );
165  din->specularImage->Bind();
166  qglTexCoordPointer( 3, GL_FLOAT, sizeof( idDrawVert ), (void *)&ac->normal );
167 
168  GL_SelectTexture( 2 );
169  din->diffuseImage->Bind();
170  qglTexCoordPointer( 3, GL_FLOAT, sizeof( idDrawVert ), (void *)&ac->tangents[1][0] );
171 
172  GL_SelectTexture( 1 );
173  din->lightFalloffImage->Bind();
174  qglTexCoordPointer( 3, GL_FLOAT, sizeof( idDrawVert ), (void *)&ac->tangents[0][0] );
175 
176  GL_SelectTexture( 0 );
177  din->lightImage->Bind();
178  qglTexCoordPointer( 2, GL_FLOAT, sizeof( idDrawVert ), (void *)&ac->st[0] );
179 
182 
183  if ( din->vertexColor != SVC_IGNORE ) {
184  qglColorPointer( 4, GL_UNSIGNED_BYTE, sizeof(idDrawVert), (void *)&ac->color );
185  qglEnableClientState( GL_COLOR_ARRAY );
186 
188 
189  qglDisableClientState( GL_COLOR_ARRAY );
190  qglColor4f( 1, 1, 1, 1 );
191  } else {
193  }
194 }
195 
196 /*
197 ==================
198 RB_R200_ARB_CreateDrawInteractions
199 ==================
200 */
201 static void RB_R200_ARB_CreateDrawInteractions( const drawSurf_t *surf ) {
202  if ( !surf ) {
203  return;
204  }
205 
206  // force a space calculation for light vectors
208 
209  // set the depth test
210  if ( surf->material->Coverage() == MC_TRANSLUCENT /* != C_PERFORATED */ ) {
212  } else {
213  // only draw on the alpha tested pixels that made it to the depth buffer
215  }
216 
217  // start the vertex shader
220 
221  // start the fragment shader
222  qglBindFragmentShaderATI( FPROG_FAST_PATH );
223 #if defined( MACOS_X )
225 #else
227 #endif
228 
229  qglColor4f( 1, 1, 1, 1 );
230 
231  GL_SelectTexture( 1 );
232  qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
233  GL_SelectTexture( 2 );
234  qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
235  GL_SelectTexture( 3 );
236  qglEnableClientState( GL_TEXTURE_COORD_ARRAY );
237 
238  for ( ; surf ; surf=surf->nextOnLight ) {
239  RB_CreateSingleDrawInteractions( surf, RB_R200_ARB_DrawInteraction );
240  }
241 
242  GL_SelectTexture( 5 );
244 
245  GL_SelectTexture( 4 );
247 
248  GL_SelectTexture( 3 );
250  qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
251 
252  GL_SelectTexture( 2 );
254  qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
255 
256  GL_SelectTexture( 1 );
258  qglDisableClientState( GL_TEXTURE_COORD_ARRAY );
259 
260  GL_SelectTexture( 0 );
261 
263 #if defined( MACOS_X )
265 #else
267 #endif
268 }
269 
270 
271 
272 /*
273 ==================
274 RB_R200_DrawInteractions
275 
276 ==================
277 */
279  qglEnable( GL_STENCIL_TEST );
280 
281  for ( viewLight_t *vLight = backEnd.viewDef->viewLights ; vLight ; vLight = vLight->next ) {
282  // do fogging later
283  if ( vLight->lightShader->IsFogLight() ) {
284  continue;
285  }
286  if ( vLight->lightShader->IsBlendLight() ) {
287  continue;
288  }
289 
290  backEnd.vLight = vLight;
291 
292  RB_LogComment( "---------- RB_RenderViewLight 0x%p ----------\n", vLight );
293 
294  // clear the stencil buffer if needed
295  if ( vLight->globalShadows || vLight->localShadows ) {
296  backEnd.currentScissor = vLight->scissorRect;
297  if ( r_useScissor.GetBool() ) {
302  }
303  qglClear( GL_STENCIL_BUFFER_BIT );
304  } else {
305  // no shadows, so no need to read or write the stencil buffer
306  // we might in theory want to use GL_ALWAYS instead of disabling
307  // completely, to satisfy the invarience rules
308  qglStencilFunc( GL_ALWAYS, 128, 255 );
309  }
310 
314  RB_StencilShadowPass( vLight->globalShadows );
315 
316  RB_R200_ARB_CreateDrawInteractions( vLight->localInteractions );
317 
320  RB_StencilShadowPass( vLight->localShadows );
321 
322  RB_R200_ARB_CreateDrawInteractions( vLight->globalInteractions );
323 
324  qglDisable( GL_VERTEX_PROGRAM_ARB ); // if there weren't any globalInteractions, it would have stayed on
325  } else {
326  RB_StencilShadowPass( vLight->globalShadows );
327  RB_R200_ARB_CreateDrawInteractions( vLight->localInteractions );
328 
329  RB_StencilShadowPass( vLight->localShadows );
330  RB_R200_ARB_CreateDrawInteractions( vLight->globalInteractions );
331  }
332 
333  if ( r_skipTranslucent.GetBool() ) {
334  continue;
335  }
336 
337  // disable stencil testing for translucent interactions, because
338  // the shadow isn't calculated at their point, and the shadow
339  // behind them may be depth fighting with a back side, so there
340  // isn't any reasonable thing to do
341  qglStencilFunc( GL_ALWAYS, 128, 255 );
342  RB_R200_ARB_CreateDrawInteractions( vLight->translucentInteractions );
343  }
344 }
345 
346 
347 /*
348 =================
349 R_BuildSurfaceFragmentProgram
350 =================
351 */
352 static void R_BuildSurfaceFragmentProgram( int programNum ) {
353  qglBindFragmentShaderATI( programNum );
354 
356 
357  // texture 0 = light projection
358  // texture 1 = light falloff
359  // texture 2 = surface diffuse
360  // texture 3 = surface specular
361  // texture 4 = surface bump
362  // texture 5 = normalization cube map
363 
364  // texcoord 0 = light projection texGen
365  // texcoord 1 = light falloff texGen
366  // texcoord 2 = bumpmap texCoords
367  // texcoord 3 = specular / diffuse texCoords
368  // texcoord 4 = halfangle vector in local tangent space
369  // texcoord 5 = vector to light in local tangent space
370 
371  // constant 0 = diffuse modulate
372  // constant 1 = specular modulate
373  // constant 5 = internal use for 0.75 constant
374 
379 
380  // move the alpha component to the red channel to support rxgb normal map compression
383  GL_REG_4_ATI, GL_ALPHA, GL_NONE );
384  }
385 
386  // light projection * light falloff
387  qglColorFragmentOp2ATI( GL_MUL_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE,
388  GL_REG_0_ATI, GL_NONE, GL_NONE,
389  GL_REG_1_ATI, GL_NONE, GL_NONE );
390 
391  // vectorToLight dot bumpMap
395 
396  // bump * light
397  qglColorFragmentOp2ATI( GL_MUL_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE,
398  GL_REG_0_ATI, GL_NONE, GL_NONE,
399  GL_REG_1_ATI, GL_NONE, GL_NONE );
400 
401  //-------------------
402 
403  // carry over the incomingLight calculation
405 
406  // sample the diffuse surface map
408 
409  // sample the specular surface map
411 
412  // we will use the surface bump map again
414 
415  // normalize the specular halfangle
417 
418  // R1 = halfangle dot surfaceNormal
422 
423  // R1 = 4 * ( R1 - 0.75 )
424  // subtract 0.75 and quadruple to tighten the specular spot
425  float data[4] = { 0.75, 0.75, 0.75, 0.75 };
428  GL_REG_1_ATI, GL_NONE, GL_NONE,
429  GL_CON_5_ATI, GL_NONE, GL_NONE );
430 
431  // R1 = R1 * R1
432  // sqare the stretched specular result
434  GL_REG_1_ATI, GL_NONE, GL_NONE,
435  GL_REG_1_ATI, GL_NONE, GL_NONE );
436 
437  // R1 = R1 * R3
438  // R1 = specular power * specular texture * 2
440  GL_REG_1_ATI, GL_NONE, GL_NONE,
441  GL_REG_3_ATI, GL_NONE, GL_NONE );
442 
443  // R2 = R2 * CONST0
444  // down modulate the diffuse map
446  GL_REG_2_ATI, GL_NONE, GL_NONE,
447  GL_CON_0_ATI, GL_NONE, GL_NONE );
448 
449  // R2 = R2 + R1 * CONST1
450  // diffuse + specular * specular color
452  GL_REG_1_ATI, GL_NONE, GL_NONE,
453  GL_CON_1_ATI, GL_NONE, GL_NONE,
454  GL_REG_2_ATI, GL_NONE, GL_NONE );
455 
456  // out = reflectance * incoming light
458  GL_REG_0_ATI, GL_NONE, GL_NONE,
459  GL_REG_2_ATI, GL_NONE, GL_NONE );
460 
461  // out * vertex color
462  qglColorFragmentOp2ATI( GL_MUL_ATI, GL_REG_0_ATI, GL_NONE, GL_NONE,
463  GL_REG_0_ATI, GL_NONE, GL_NONE,
464  GL_PRIMARY_COLOR_ARB, GL_NONE, GL_NONE );
465 
466  // out alpha = 0 to allow blending optimization
468  GL_ZERO, GL_NONE, GL_NONE );
469 
471 
472  GL_CheckErrors();
473 }
474 
475 /*
476 =================
477 R_R200_Init
478 =================
479 */
480 void R_R200_Init( void ) {
481  glConfig.allowR200Path = false;
482 
483  common->Printf( "----------- R200_Init -----------\n" );
484 
486  common->Printf( "Not available.\n" );
487  return;
488  }
489 
490  GL_CheckErrors();
491 
500 
501  common->Printf( "GL_NUM_FRAGMENT_REGISTERS_ATI: %i\n", fsi.numFragmentRegisters );
502  common->Printf( "GL_NUM_FRAGMENT_CONSTANTS_ATI: %i\n", fsi.numFragmentConstants );
503  common->Printf( "GL_NUM_PASSES_ATI: %i\n", fsi.numPasses );
504  common->Printf( "GL_NUM_INSTRUCTIONS_PER_PASS_ATI: %i\n", fsi.numInstructionsPerPass );
505  common->Printf( "GL_NUM_INSTRUCTIONS_TOTAL_ATI: %i\n", fsi.numInstructionsTotal );
506  common->Printf( "GL_COLOR_ALPHA_PAIRING_ATI: %i\n", fsi.colorAlphaPairing );
507  common->Printf( "GL_NUM_LOOPBACK_COMPONENTS_ATI: %i\n", fsi.numLoopbackComponenets );
508  common->Printf( "GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI: %i\n", fsi.numInputInterpolatorComponents );
509 
510  common->Printf( "FPROG_FAST_PATH\n" );
511  R_BuildSurfaceFragmentProgram( FPROG_FAST_PATH );
512 
513  common->Printf( "---------------------\n" );
514 
515  glConfig.allowR200Path = true;
516 }
#define GL_MUL_ATI
Definition: glext.h:2342
const int GLS_DSTBLEND_ONE
Definition: tr_local.h:1017
#define GL_SUB_ATI
Definition: glext.h:2343
idVec4 localLightOrigin
Definition: tr_local.h:453
#define qglTexCoordPointer
Definition: qgl_linked.h:318
void R_R200_Init(void)
Definition: draw_r200.cpp:480
const srfTriangles_t * geo
Definition: tr_local.h:112
#define GL_BIAS_BIT_ATI
Definition: glext.h:2378
const int GLS_DEPTHFUNC_LESS
Definition: tr_local.h:1040
#define qglScissor
Definition: qgl_linked.h:280
#define GL_NUM_INSTRUCTIONS_TOTAL_ATI
Definition: glext.h:2356
#define qglEnableClientState
Definition: qgl_linked.h:102
#define qglDisable
Definition: qgl_linked.h:92
#define qglDisableClientState
Definition: qgl_linked.h:93
void GL_CheckErrors(void)
stageVertexColor_t vertexColor
Definition: tr_local.h:447
#define GL_REG_2_ATI
Definition: glext.h:2278
short x2
Definition: tr_local.h:55
#define GL_TEXTURE1_ARB
Definition: glext.h:378
bool allowR200Path
Definition: RenderSystem.h:95
idCVar r_skipTranslucent("r_skipTranslucent","0", CVAR_RENDERER|CVAR_BOOL,"skip the translucent interaction rendering")
void RB_R200_DrawInteractions(void)
Definition: draw_r200.cpp:278
idCVar r_useShadowVertexProgram("r_useShadowVertexProgram","1", CVAR_RENDERER|CVAR_BOOL,"do the shadow projection in the vertex program on capable cards")
#define GL_REG_5_ATI
Definition: glext.h:2281
#define GL_TEXTURE4_ARB
Definition: glext.h:381
#define GL_TEXTURE5_ARB
Definition: glext.h:382
#define GL_FRAGMENT_SHADER_ATI
Definition: glext.h:2275
idVec3 xyz
Definition: DrawVert.h:42
PFNGLENDFRAGMENTSHADERATIPROC qglEndFragmentShaderATI
idVec4 diffuseMatrix[2]
Definition: tr_local.h:457
PFNGLSAMPLEMAPATIPROC qglSampleMapATI
PFNGLCOLORFRAGMENTOP2ATIPROC qglColorFragmentOp2ATI
idVec3 tangents[2]
Definition: DrawVert.h:45
#define GL_CON_1_ATI
Definition: glext.h:2309
idScreenRect viewport
Definition: tr_local.h:398
#define qglGetIntegerv
Definition: qgl_linked.h:133
const drawSurf_t * surf
Definition: tr_local.h:437
#define GL_NUM_FRAGMENT_CONSTANTS_ATI
Definition: glext.h:2353
GLint
Definition: qgl.h:120
idImage * diffuseImage
Definition: tr_local.h:442
PFNGLALPHAFRAGMENTOP1ATIPROC qglAlphaFragmentOp1ATI
#define GL_4X_BIT_ATI
Definition: glext.h:2370
short x1
Definition: tr_local.h:55
PFNGLBINDFRAGMENTSHADERATIPROC qglBindFragmentShaderATI
#define GL_NUM_LOOPBACK_COMPONENTS_ATI
Definition: glext.h:2358
#define GL_REG_1_ATI
Definition: glext.h:2277
#define GL_SWIZZLE_STR_ATI
Definition: glext.h:2360
const idMaterial * material
Definition: tr_local.h:114
#define qglEnable
Definition: qgl_linked.h:101
const viewEntity_t * currentSpace
Definition: tr_local.h:644
#define GL_TEXTURE2_ARB
Definition: glext.h:379
backEndState_t backEnd
Definition: tr_backend.cpp:35
#define GL_CON_0_ATI
Definition: glext.h:2308
PFNGLCOLORFRAGMENTOP1ATIPROC qglColorFragmentOp1ATI
idVec4 diffuseColor
Definition: tr_local.h:445
const int GLS_DEPTHFUNC_EQUAL
Definition: tr_local.h:1039
void RB_CreateSingleDrawInteractions(const drawSurf_t *surf, void(*DrawInteraction)(const drawInteraction_t *))
Definition: tr_render.cpp:689
struct viewLight_s * next
Definition: tr_local.h:299
idImage * specularImage
Definition: tr_local.h:443
idImage * ambientNormalMap
Definition: Image.h:394
struct viewLight_s * viewLights
Definition: tr_local.h:415
materialCoverage_t Coverage(void) const
Definition: Material.h:428
idVec2 st
Definition: DrawVert.h:43
#define GL_REG_0_ATI
Definition: glext.h:2276
#define qglStencilFunc
Definition: qgl_linked.h:283
PFNGLPASSTEXCOORDATIPROC qglPassTexCoordATI
#define GL_COLOR_ALPHA_PAIRING_ATI
Definition: glext.h:2359
#define GL_MOV_ATI
Definition: glext.h:2340
#define GL_RED_BIT_ATI
Definition: glext.h:2366
viewLight_t * vLight
Definition: tr_local.h:648
idImage * normalCubeMapImage
Definition: Image.h:400
idImage * lightImage
Definition: tr_local.h:439
bool ARBVertexBufferObjectAvailable
Definition: RenderSystem.h:73
idImage * lightFalloffImage
Definition: tr_local.h:440
#define GL_2X_BIT_ATI
Definition: glext.h:2369
#define GL_NUM_INPUT_INTERPOLATOR_COMPONENTS_ATI
Definition: glext.h:2357
idCommon * common
Definition: Common.cpp:206
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
idVec4 specularColor
Definition: tr_local.h:446
#define NULL
Definition: Lib.h:88
GLsizei GLsizei GLenum GLenum const GLvoid * data
Definition: glext.h:2853
int GetInteger(void) const
Definition: CVarSystem.h:143
#define GL_TEXTURE3_ARB
Definition: glext.h:380
#define GL_REG_4_ATI
Definition: glext.h:2280
const int GLS_SRCBLEND_ONE
Definition: tr_local.h:1006
idImageManager * globalImages
Definition: Image_init.cpp:74
bool ARBVertexProgramAvailable
Definition: RenderSystem.h:74
idVec4 bumpMatrix[2]
Definition: tr_local.h:456
static idCVar image_useNormalCompression
Definition: Image.h:375
idVec4 specularMatrix[2]
Definition: tr_local.h:458
idImage * blackImage
Definition: Image.h:399
#define GL_SATURATE_BIT_ATI
Definition: glext.h:2375
idVec3 normal
Definition: DrawVert.h:44
bool atiFragmentShaderAvailable
Definition: RenderSystem.h:81
virtual void Printf(const char *fmt,...) id_attribute((format(printf
#define GL_NUM_FRAGMENT_REGISTERS_ATI
Definition: glext.h:2352
void RB_DrawElementsWithCounters(const srfTriangles_t *tri)
Definition: tr_render.cpp:78
const float * ToFloatPtr(void) const
Definition: Vector.h:1051
#define GL_PRIMARY_COLOR_ARB
Definition: glext.h:555
void RB_LogComment(const char *comment,...)
Definition: tr_backend.cpp:112
#define qglColorPointer
Definition: qgl_linked.h:80
bool GetBool(void) const
Definition: CVarSystem.h:142
glconfig_t glConfig
#define GL_NUM_INSTRUCTIONS_PER_PASS_ATI
Definition: glext.h:2355
idVec4 lightProjection[4]
Definition: tr_local.h:455
void * Position(vertCache_t *buffer)
#define GL_DOT3_ATI
Definition: glext.h:2344
PFNGLSETFRAGMENTSHADERCONSTANTATIPROC qglSetFragmentShaderConstantATI
const struct drawSurf_s * nextOnLight
Definition: tr_local.h:117
#define GL_VERTEX_PROGRAM_ARB
Definition: glext.h:594
#define qglClear
Definition: qgl_linked.h:39
#define qglColor4f
Definition: qgl_linked.h:66
idImage * bumpImage
Definition: tr_local.h:441
PFNGLPROGRAMENVPARAMETER4FVARBPROC qglProgramEnvParameter4fvARB
byte color[4]
Definition: DrawVert.h:46
GLint numInputInterpolatorComponents
Definition: draw_r200.cpp:55
#define GL_SWIZZLE_STQ_DQ_ATI
Definition: glext.h:2363
#define GL_TEXT_FRAGMENT_SHADER_ATI
Definition: glext.h:2598
#define GL_CON_5_ATI
Definition: glext.h:2313
idVertexCache vertexCache
Definition: VertexCache.cpp:41
#define GL_TEXTURE0_ARB
Definition: glext.h:377
#define GL_MAD_ATI
Definition: glext.h:2346
void GL_State(int stateBits)
Definition: tr_backend.cpp:239
void RB_StencilShadowPass(const drawSurf_t *drawSurfs)
PFNGLCOLORFRAGMENTOP3ATIPROC qglColorFragmentOp3ATI
short y1
Definition: tr_local.h:55
idCVar r_useScissor("r_useScissor","1", CVAR_RENDERER|CVAR_BOOL,"scissor clip as portals and lights are processed")
void GL_SelectTexture(int unit)
Definition: tr_backend.cpp:135
PFNGLBEGINFRAGMENTSHADERATIPROC qglBeginFragmentShaderATI
short y2
Definition: tr_local.h:55
void Bind()
#define GL_REG_3_ATI
Definition: glext.h:2279
idScreenRect currentScissor
Definition: tr_local.h:645
#define qglVertexPointer
Definition: qgl_linked.h:363
#define GL_NUM_PASSES_ATI
Definition: glext.h:2354
const int GLS_DEPTHMASK
Definition: tr_local.h:1029
idVec4 localViewOrigin
Definition: tr_local.h:454
const viewDef_t * viewDef
Definition: tr_local.h:641