Quake II RTX doxygen  1.0 dev
world.c
Go to the documentation of this file.
1 /*
2 Copyright (C) 2003-2006 Andrey Nazarov
3 
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
8 
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
13 
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18 
19 #include "gl.h"
20 
22 {
23  mface_t *surf;
24  int s, t, i;
25  byte *lightmap;
26  byte *b1, *b2, *b3, *b4;
27  int fracu, fracv;
28  int w1, w2, w3, w4;
29  byte temp[3];
30  int smax, tmax, size;
31  lightstyle_t *style;
32 
33  fracu = glr.lightpoint.s & 15;
34  fracv = glr.lightpoint.t & 15;
35 
36  // compute weights of lightmap blocks
37  w1 = (16 - fracu) * (16 - fracv);
38  w2 = fracu * (16 - fracv);
39  w3 = fracu * fracv;
40  w4 = (16 - fracu) * fracv;
41 
42  s = glr.lightpoint.s >> 4;
43  t = glr.lightpoint.t >> 4;
44 
45  surf = glr.lightpoint.surf;
46 
47  smax = S_MAX(surf);
48  tmax = T_MAX(surf);
49  size = smax * tmax * 3;
50 
51  VectorClear(color);
52 
53  // add all the lightmaps with bilinear filtering
54  lightmap = surf->lightmap;
55  for (i = 0; i < surf->numstyles; i++) {
56  b1 = &lightmap[3 * ((t + 0) * smax + (s + 0))];
57  b2 = &lightmap[3 * ((t + 0) * smax + (s + 1))];
58  b3 = &lightmap[3 * ((t + 1) * smax + (s + 1))];
59  b4 = &lightmap[3 * ((t + 1) * smax + (s + 0))];
60 
61  temp[0] = (w1 * b1[0] + w2 * b2[0] + w3 * b3[0] + w4 * b4[0]) >> 8;
62  temp[1] = (w1 * b1[1] + w2 * b2[1] + w3 * b3[1] + w4 * b4[1]) >> 8;
63  temp[2] = (w1 * b1[2] + w2 * b2[2] + w3 * b3[2] + w4 * b4[2]) >> 8;
64 
65  style = LIGHT_STYLE(surf, i);
66 
67  color[0] += temp[0] * style->rgb[0];
68  color[1] += temp[1] * style->rgb[1];
69  color[2] += temp[2] * style->rgb[2];
70 
71  lightmap += size;
72  }
73 }
74 
75 static qboolean _GL_LightPoint(vec3_t start, vec3_t color)
76 {
77  bsp_t *bsp;
78  int i, index;
79  lightpoint_t pt;
80  vec3_t end, mins, maxs;
81  entity_t *ent;
82  mmodel_t *model;
83  vec_t *angles;
84 
85  bsp = gl_static.world.cache;
86  if (!bsp || !bsp->lightmap)
87  return qfalse;
88 
89  end[0] = start[0];
90  end[1] = start[1];
91  end[2] = start[2] - 8192;
92 
93  // get base lightpoint from world
94  BSP_LightPoint(&glr.lightpoint, start, end, bsp->nodes);
95 
96  // trace to other BSP models
97  for (i = 0; i < glr.fd.num_entities; i++) {
98  ent = &glr.fd.entities[i];
99  index = ent->model;
100  if (!(index & 0x80000000))
101  break; // BSP models are at the start of entity array
102 
103  index = ~index;
104  if (index < 1 || index >= bsp->nummodels)
105  continue;
106 
107  model = &bsp->models[index];
108  if (!model->numfaces)
109  continue;
110 
111  // cull in X/Y plane
112  if (ent->angles[0] || ent->angles[1] || ent->angles[2]) {
113  if (fabs(start[0] - ent->origin[0]) > model->radius)
114  continue;
115  if (fabs(start[1] - ent->origin[1]) > model->radius)
116  continue;
117  angles = ent->angles;
118  } else {
119  VectorAdd(model->mins, ent->origin, mins);
120  VectorAdd(model->maxs, ent->origin, maxs);
121  if (start[0] < mins[0] || start[0] > maxs[0])
122  continue;
123  if (start[1] < mins[1] || start[1] > maxs[1])
124  continue;
125  angles = NULL;
126  }
127 
128  BSP_TransformedLightPoint(&pt, start, end, model->headnode,
129  ent->origin, angles);
130 
131  if (pt.fraction < glr.lightpoint.fraction)
132  glr.lightpoint = pt;
133  }
134 
135  if (!glr.lightpoint.surf)
136  return qfalse;
137 
139 
141 
142  return qtrue;
143 }
144 
145 #if USE_DLIGHTS
146 static void GL_MarkLights_r(mnode_t *node, dlight_t *light, int lightbit)
147 {
148  vec_t dot;
149  int count;
150  mface_t *face;
151 
152  while (node->plane) {
153  dot = PlaneDiffFast(light->transformed, node->plane);
154  if (dot > light->intensity - DLIGHT_CUTOFF) {
155  node = node->children[0];
156  continue;
157  }
158  if (dot < -light->intensity + DLIGHT_CUTOFF) {
159  node = node->children[1];
160  continue;
161  }
162 
163  face = node->firstface;
164  count = node->numfaces;
165  while (count--) {
166  if (!(face->drawflags & SURF_NOLM_MASK)) {
167  if (face->dlightframe != glr.dlightframe) {
168  face->dlightframe = glr.dlightframe;
169  face->dlightbits = 0;
170  }
171 
172  face->dlightbits |= lightbit;
173  }
174 
175  face++;
176  }
177 
178  GL_MarkLights_r(node->children[0], light, lightbit);
179  node = node->children[1];
180  }
181 }
182 
183 static void GL_MarkLights(void)
184 {
185  int i;
186  dlight_t *light;
187 
188  glr.dlightframe++;
189 
190  for (i = 0, light = glr.fd.dlights; i < glr.fd.num_dlights; i++, light++) {
191  VectorCopy(light->origin, light->transformed);
192  GL_MarkLights_r(gl_static.world.cache->nodes, light, 1 << i);
193  }
194 }
195 
196 static void GL_TransformLights(mmodel_t *model)
197 {
198  int i;
199  dlight_t *light;
200  vec3_t temp;
201 
202  glr.dlightframe++;
203 
204  for (i = 0, light = glr.fd.dlights; i < glr.fd.num_dlights; i++, light++) {
205  VectorSubtract(light->origin, glr.ent->origin, temp);
206  light->transformed[0] = DotProduct(temp, glr.entaxis[0]);
207  light->transformed[1] = DotProduct(temp, glr.entaxis[1]);
208  light->transformed[2] = DotProduct(temp, glr.entaxis[2]);
209  GL_MarkLights_r(model->headnode, light, 1 << i);
210  }
211 }
212 
213 static void GL_AddLights(vec3_t origin, vec3_t color)
214 {
215  dlight_t *light;
216  vec_t f;
217  int i;
218 
219  for (i = 0, light = glr.fd.dlights; i < glr.fd.num_dlights; i++, light++) {
220  f = light->intensity - DLIGHT_CUTOFF - Distance(light->origin, origin);
221  if (f > 0) {
222  f *= (1.0f / 255);
223  VectorMA(color, f, light->color, color);
224  }
225  }
226 }
227 #else
228 #define GL_MarkLights() (void)0
229 #define GL_TransformLights() (void)0
230 #define GL_AddLights(origin, color) (void)0
231 #endif
232 
233 void GL_LightPoint(vec3_t origin, vec3_t color)
234 {
235  if (gl_fullbright->integer) {
236  VectorSet(color, 1, 1, 1);
237  return;
238  }
239 
240  // get lighting from world
241  if (!_GL_LightPoint(origin, color)) {
242  VectorSet(color, 1, 1, 1);
243  }
244 
245  // add dynamic lights
247 
248  if (gl_doublelight_entities->integer) {
249  // apply modulate twice to mimic original ref_gl behavior
250  VectorScale(color, gl_static.entity_modulate, color);
251  }
252 }
253 
254 void R_LightPoint_GL(vec3_t origin, vec3_t color)
255 {
256  int i;
257 
259 
260  for (i = 0; i < 3; i++) {
261  clamp(color[i], 0, 1);
262  }
263 }
264 
265 static void GL_MarkLeaves(void)
266 {
267  static int lastNodesVisible;
268  byte vis1[VIS_MAX_BYTES];
269  byte vis2[VIS_MAX_BYTES];
270  mleaf_t *leaf;
271  mnode_t *node;
272  uint_fast32_t *src1, *src2;
273  int cluster1, cluster2, longs;
274  vec3_t tmp;
275  int i;
276  bsp_t *bsp = gl_static.world.cache;
277 
278  leaf = BSP_PointLeaf(bsp->nodes, glr.fd.vieworg);
279  cluster1 = cluster2 = leaf->cluster;
280  VectorCopy(glr.fd.vieworg, tmp);
281  if (!leaf->contents) {
282  tmp[2] -= 16;
283  } else {
284  tmp[2] += 16;
285  }
286  leaf = BSP_PointLeaf(bsp->nodes, tmp);
287  if (!(leaf->contents & CONTENTS_SOLID)) {
288  cluster2 = leaf->cluster;
289  }
290 
291  if (cluster1 == glr.viewcluster1 && cluster2 == glr.viewcluster2) {
292  goto finish;
293  }
294 
295  if (gl_lockpvs->integer) {
296  goto finish;
297  }
298 
299  glr.visframe++;
300  glr.viewcluster1 = cluster1;
301  glr.viewcluster2 = cluster2;
302 
303  if (!bsp->vis || gl_novis->integer || cluster1 == -1) {
304  // mark everything visible
305  for (i = 0; i < bsp->numnodes; i++) {
306  bsp->nodes[i].visframe = glr.visframe;
307  }
308  for (i = 0; i < bsp->numleafs; i++) {
309  bsp->leafs[i].visframe = glr.visframe;
310  }
311  lastNodesVisible = bsp->numnodes;
312  goto finish;
313  }
314 
315  BSP_ClusterVis(bsp, vis1, cluster1, DVIS_PVS);
316  if (cluster1 != cluster2) {
317  BSP_ClusterVis(bsp, vis2, cluster2, DVIS_PVS);
318  longs = VIS_FAST_LONGS(bsp);
319  src1 = (uint_fast32_t *)vis1;
320  src2 = (uint_fast32_t *)vis2;
321  while (longs--) {
322  *src1++ |= *src2++;
323  }
324  }
325 
326  lastNodesVisible = 0;
327  for (i = 0, leaf = bsp->leafs; i < bsp->numleafs; i++, leaf++) {
328  cluster1 = leaf->cluster;
329  if (cluster1 == -1) {
330  continue;
331  }
332  if (Q_IsBitSet(vis1, cluster1)) {
333  node = (mnode_t *)leaf;
334 
335  // mark parent nodes visible
336  do {
337  if (node->visframe == glr.visframe) {
338  break;
339  }
340  node->visframe = glr.visframe;
341  node = node->parent;
342  lastNodesVisible++;
343  } while (node);
344  }
345  }
346 
347 finish:
348  c.nodesVisible = lastNodesVisible;
349 
350 }
351 
352 #define BACKFACE_EPSILON 0.01f
353 
354 #define BSP_CullFace(face, dot) \
355  (((dot) < -BACKFACE_EPSILON && !((face)->drawflags & DSURF_PLANEBACK)) || \
356  ((dot) > BACKFACE_EPSILON && ((face)->drawflags & DSURF_PLANEBACK)))
357 
358 void GL_DrawBspModel(mmodel_t *model)
359 {
360  mface_t *face, *last;
361  vec3_t bounds[2];
362  vec_t dot;
363  vec3_t transformed, temp;
364  entity_t *ent = glr.ent;
365  glCullResult_t cull;
366 
367  if (!model->numfaces)
368  return;
369 
370  if (glr.entrotated) {
371  cull = GL_CullSphere(ent->origin, model->radius);
372  if (cull == CULL_OUT) {
373  c.spheresCulled++;
374  return;
375  }
376  if (cull == CULL_CLIP) {
377  VectorCopy(model->mins, bounds[0]);
378  VectorCopy(model->maxs, bounds[1]);
379  cull = GL_CullLocalBox(ent->origin, bounds);
380  if (cull == CULL_OUT) {
382  return;
383  }
384  }
385  VectorSubtract(glr.fd.vieworg, ent->origin, temp);
386  transformed[0] = DotProduct(temp, glr.entaxis[0]);
387  transformed[1] = DotProduct(temp, glr.entaxis[1]);
388  transformed[2] = DotProduct(temp, glr.entaxis[2]);
389  } else {
390  VectorAdd(model->mins, ent->origin, bounds[0]);
391  VectorAdd(model->maxs, ent->origin, bounds[1]);
392  cull = GL_CullBox(bounds);
393  if (cull == CULL_OUT) {
394  c.boxesCulled++;
395  return;
396  }
397  VectorSubtract(glr.fd.vieworg, ent->origin, transformed);
398  }
399 
400  GL_TransformLights(model);
401 
402  GL_RotateForEntity(ent->origin, 1.f);
403 
404  GL_BindArrays();
405 
406  // draw visible faces
407  last = model->firstface + model->numfaces;
408  for (face = model->firstface; face < last; face++) {
409  dot = PlaneDiffFast(transformed, face->plane);
410  if (BSP_CullFace(face, dot)) {
411  c.facesCulled++;
412  continue;
413  }
414 
415  // sky faces don't have their polygon built
416  if (face->drawflags & SURF_SKY) {
417  continue;
418  }
419 
420  // alpha faces on transformed inline models are drawn with world GL
421  // matrix. this bug is intentional: some maps exploit this to hide
422  // surfaces that would otherwise be visible.
423  if (face->drawflags & SURF_TRANS_MASK) {
424  if (model->drawframe != glr.drawframe)
425  GL_AddAlphaFace(face);
426  continue;
427  }
428 
429  if (gl_dynamic->integer) {
430  GL_PushLights(face);
431  }
432 
433  GL_DrawFace(face);
434  }
435 
436  GL_Flush3D();
437 
438  // protect against infinite loop if the same inline model
439  // with alpha faces is referenced by multiple entities
440  model->drawframe = glr.drawframe;
441 }
442 
443 #define NODE_CLIPPED 0
444 #define NODE_UNCLIPPED 15
445 
446 static inline qboolean GL_ClipNode(mnode_t *node, int *clipflags)
447 {
448  int flags = *clipflags;
449  int i, bits, mask;
450 
451  if (flags == NODE_UNCLIPPED) {
452  return qtrue;
453  }
454  for (i = 0, mask = 1; i < 4; i++, mask <<= 1) {
455  if (flags & mask) {
456  continue;
457  }
458  bits = BoxOnPlaneSide(node->mins, node->maxs,
459  &glr.frustumPlanes[i]);
460  if (bits == BOX_BEHIND) {
461  return qfalse;
462  }
463  if (bits == BOX_INFRONT) {
464  flags |= mask;
465  }
466  }
467 
468  *clipflags = flags;
469 
470  return qtrue;
471 }
472 
473 static inline void GL_DrawLeaf(mleaf_t *leaf)
474 {
475  mface_t **face, **last;
476 
477  if (leaf->contents == CONTENTS_SOLID) {
478  return; // solid leaf
479  }
480  if (glr.fd.areabits && !Q_IsBitSet(glr.fd.areabits, leaf->area)) {
481  return; // door blocks sight
482  }
483 
484  last = leaf->firstleafface + leaf->numleaffaces;
485  for (face = leaf->firstleafface; face < last; face++) {
486  (*face)->drawframe = glr.drawframe;
487  }
488 
489  c.leavesDrawn++;
490 }
491 
492 static inline void GL_DrawNode(mnode_t *node)
493 {
494  mface_t *face, *last = node->firstface + node->numfaces;
495 
496  for (face = node->firstface; face < last; face++) {
497  if (face->drawframe != glr.drawframe) {
498  continue;
499  }
500 
501  if (face->drawflags & SURF_SKY) {
502  R_AddSkySurface(face);
503  continue;
504  }
505 
506  if (face->drawflags & SURF_TRANS_MASK) {
507  GL_AddAlphaFace(face);
508  continue;
509  }
510 
511  if (gl_dynamic->integer) {
512  GL_PushLights(face);
513  }
514 
515  if (gl_hash_faces->integer) {
516  GL_AddSolidFace(face);
517  } else {
518  GL_DrawFace(face);
519  }
520  }
521 
522  c.nodesDrawn++;
523 }
524 
525 static void GL_WorldNode_r(mnode_t *node, int clipflags)
526 {
527  int side;
528  vec_t dot;
529 
530  while (node->visframe == glr.visframe) {
531  if (!GL_ClipNode(node, &clipflags)) {
532  c.nodesCulled++;
533  break;
534  }
535 
536  if (!node->plane) {
537  GL_DrawLeaf((mleaf_t *)node);
538  break;
539  }
540 
541  dot = PlaneDiffFast(glr.fd.vieworg, node->plane);
542  side = dot < 0;
543 
544  GL_WorldNode_r(node->children[side], clipflags);
545 
546  GL_DrawNode(node);
547 
548  node = node->children[side ^ 1];
549  }
550 }
551 
552 void GL_DrawWorld(void)
553 {
554  // auto cycle the world frame for texture animation
555  gl_world.frame = (int)(glr.fd.time * 2);
556 
557  glr.ent = &gl_world;
558 
559  GL_MarkLeaves();
560 
561  GL_MarkLights();
562 
563  R_ClearSkyBox();
564 
566 
567  GL_BindArrays();
568 
570 
573 
575 
576  GL_Flush3D();
577 
578  R_DrawSkyBox();
579 }
580 
gl_fullbright
cvar_t * gl_fullbright
Definition: main.c:79
statCounters_t::nodesCulled
int nodesCulled
Definition: gl.h:144
glStatic_t::entity_modulate
float entity_modulate
Definition: gl.h:71
GL_AdjustColor
void GL_AdjustColor(vec3_t color)
Definition: surf.c:94
GL_MarkLights
#define GL_MarkLights()
Definition: world.c:228
GL_ClipNode
static qboolean GL_ClipNode(mnode_t *node, int *clipflags)
Definition: world.c:446
NODE_CLIPPED
#define NODE_CLIPPED
Definition: world.c:443
GL_PushLights
void GL_PushLights(mface_t *surf)
Definition: surf.c:271
gl_cull_nodes
cvar_t * gl_cull_nodes
Definition: main.c:71
glStatic_t::cache
bsp_t * cache
Definition: gl.h:62
BSP_ClusterVis
byte * BSP_ClusterVis(bsp_t *bsp, byte *mask, int cluster, int vis)
Definition: bsp.c:1339
GL_DrawLeaf
static void GL_DrawLeaf(mleaf_t *leaf)
Definition: world.c:473
glRefdef_t::entrotated
qboolean entrotated
Definition: gl.h:93
BSP_CullFace
#define BSP_CullFace(face, dot)
Definition: world.c:354
GL_AddAlphaFace
void GL_AddAlphaFace(mface_t *face)
Definition: tess.c:476
GL_ClearSolidFaces
void GL_ClearSolidFaces(void)
Definition: tess.c:427
GL_CullSphere
glCullResult_t GL_CullSphere(const vec3_t origin, float radius)
Definition: main.c:145
statCounters_t::nodesDrawn
int nodesDrawn
Definition: gl.h:135
statCounters_t::boxesCulled
int boxesCulled
Definition: gl.h:146
gl_world
entity_t gl_world
Definition: main.c:32
gl_hash_faces
cvar_t * gl_hash_faces
Definition: main.c:75
BSP_PointLeaf
mleaf_t * BSP_PointLeaf(mnode_t *node, vec3_t p)
Definition: bsp.c:1439
gl_lockpvs
cvar_t * gl_lockpvs
Definition: main.c:77
GL_AddLights
#define GL_AddLights(origin, color)
Definition: world.c:230
glRefdef_t::visframe
int visframe
Definition: gl.h:84
NODE_UNCLIPPED
#define NODE_UNCLIPPED
Definition: world.c:444
R_LightPoint_GL
void R_LightPoint_GL(vec3_t origin, vec3_t color)
Definition: world.c:254
GL_RotateForEntity
void GL_RotateForEntity(vec3_t origin, float scale)
Definition: main.c:305
GL_DrawFace
void GL_DrawFace(mface_t *surf)
Definition: tess.c:367
glStatic_t::world
struct glStatic_t::@11 world
R_AddSkySurface
void R_AddSkySurface(mface_t *surf)
Definition: sky.c:234
glRefdef_t::frustumPlanes
cplane_t frustumPlanes[4]
Definition: gl.h:91
statCounters_t::leavesDrawn
int leavesDrawn
Definition: gl.h:136
origin
static vec3_t origin
Definition: mesh.c:27
GL_CullLocalBox
glCullResult_t GL_CullLocalBox(const vec3_t origin, vec3_t bounds[2])
Definition: main.c:185
glRefdef_t::viewmatrix
GLfloat viewmatrix[16]
Definition: gl.h:83
glRefdef_t::lightpoint
lightpoint_t lightpoint
Definition: gl.h:96
GL_TransformLights
#define GL_TransformLights()
Definition: world.c:229
GL_AddSolidFace
void GL_AddSolidFace(mface_t *face)
Definition: tess.c:462
GL_DrawSolidFaces
void GL_DrawSolidFaces(void)
Definition: tess.c:436
R_DrawSkyBox
void R_DrawSkyBox(void)
Definition: sky.c:337
GL_BindArrays
void GL_BindArrays(void)
Definition: tess.c:255
_GL_LightPoint
static qboolean _GL_LightPoint(vec3_t start, vec3_t color)
Definition: world.c:75
gl_static
glStatic_t gl_static
Definition: main.c:28
GL_LightPoint
void GL_LightPoint(vec3_t origin, vec3_t color)
Definition: world.c:233
c
statCounters_t c
Definition: main.c:30
GL_DrawNode
static void GL_DrawNode(mnode_t *node)
Definition: world.c:492
gl_dynamic
cvar_t * gl_dynamic
Definition: main.c:46
glr
glRefdef_t glr
Definition: main.c:27
GL_Flush3D
void GL_Flush3D(void)
Definition: tess.c:284
gl_doublelight_entities
cvar_t * gl_doublelight_entities
Definition: main.c:51
GL_LoadMatrix
static void GL_LoadMatrix(const GLfloat *matrix)
Definition: gl.h:375
glRefdef_t::viewcluster1
int viewcluster1
Definition: gl.h:89
intensity
cvar_t * intensity
Definition: god_rays.c:38
R_ClearSkyBox
void R_ClearSkyBox(void)
Definition: sky.c:274
LIGHT_STYLE
#define LIGHT_STYLE(surf, i)
Definition: gl.h:251
gl.h
statCounters_t::rotatedBoxesCulled
int rotatedBoxesCulled
Definition: gl.h:148
GL_WorldNode_r
static void GL_WorldNode_r(mnode_t *node, int clipflags)
Definition: world.c:525
color
static vec4_t color
Definition: mesh.c:33
statCounters_t::spheresCulled
int spheresCulled
Definition: gl.h:147
GL_DrawBspModel
void GL_DrawBspModel(mmodel_t *model)
Definition: world.c:358
glRefdef_t::entaxis
vec3_t entaxis[3]
Definition: gl.h:94
GL_DrawWorld
void GL_DrawWorld(void)
Definition: world.c:552
GL_CullBox
glCullResult_t GL_CullBox(vec3_t bounds[2])
Definition: main.c:122
glCullResult_t
glCullResult_t
Definition: gl.h:190
int
CONST PIXELFORMATDESCRIPTOR int
Definition: wgl.c:26
glRefdef_t::viewcluster2
int viewcluster2
Definition: gl.h:90
gl_novis
cvar_t * gl_novis
Definition: main.c:76
CULL_CLIP
@ CULL_CLIP
Definition: gl.h:193
GL_MarkLeaves
static void GL_MarkLeaves(void)
Definition: world.c:265
statCounters_t::nodesVisible
int nodesVisible
Definition: gl.h:134
glRefdef_t::drawframe
int drawframe
Definition: gl.h:85
glRefdef_t::ent
entity_t * ent
Definition: gl.h:92
BoxOnPlaneSide
int BoxOnPlaneSide(vec3_t emins, vec3_t emaxs, cplane_t *p)
Definition: math.c:322
CULL_OUT
@ CULL_OUT
Definition: gl.h:191
GL_SampleLightPoint
void GL_SampleLightPoint(vec3_t color)
Definition: world.c:21
glRefdef_t::fd
refdef_t fd
Definition: gl.h:81
statCounters_t::facesCulled
int facesCulled
Definition: gl.h:145