Quake II RTX doxygen  1.0 dev
state.c File Reference
#include "gl.h"
#include "arbfp.h"

Go to the source code of this file.

Functions

void GL_ForceTexture (GLuint tmu, GLuint texnum)
 
void GL_BindTexture (GLuint tmu, GLuint texnum)
 
void GL_StateBits (glStateBits_t bits)
 
void GL_ArrayBits (glArrayBits_t bits)
 
void GL_Ortho (GLfloat xmin, GLfloat xmax, GLfloat ymin, GLfloat ymax, GLfloat znear, GLfloat zfar)
 
void GL_Setup2D (void)
 
static void GL_Frustum (void)
 
static void GL_RotateForViewer (void)
 
void GL_Setup3D (void)
 
void GL_SetDefaultState (void)
 
byte * IMG_ReadPixels_GL (int *width, int *height, int *rowbytes)
 
void GL_EnableOutlines (void)
 
void GL_DisableOutlines (void)
 
void GL_InitPrograms (void)
 
void GL_ShutdownPrograms (void)
 

Variables

glState_t gls
 

Function Documentation

◆ GL_ArrayBits()

void GL_ArrayBits ( glArrayBits_t  bits)

Definition at line 185 of file state.c.

186 {
187  glArrayBits_t diff = bits ^ gls.array_bits;
188 
189  if (!diff) {
190  return;
191  }
192 
193  if (diff & GLA_VERTEX) {
194  if (bits & GLA_VERTEX) {
195  qglEnableClientState(GL_VERTEX_ARRAY);
196  } else {
197  qglDisableClientState(GL_VERTEX_ARRAY);
198  }
199  }
200 
201  if (diff & GLA_TC) {
203  if (bits & GLA_TC) {
204  qglEnableClientState(GL_TEXTURE_COORD_ARRAY);
205  } else {
206  qglDisableClientState(GL_TEXTURE_COORD_ARRAY);
207  }
208  }
209 
210  if (diff & GLA_LMTC) {
212  if (bits & GLA_LMTC) {
213  qglEnableClientState(GL_TEXTURE_COORD_ARRAY);
214  } else {
215  qglDisableClientState(GL_TEXTURE_COORD_ARRAY);
216  }
217  }
218 
219  if (diff & GLA_COLOR) {
220  if (bits & GLA_COLOR) {
221  qglEnableClientState(GL_COLOR_ARRAY);
222  } else {
223  qglDisableClientState(GL_COLOR_ARRAY);
224  }
225  }
226 
227  gls.array_bits = bits;
228 }

Referenced by draw_alias_mesh(), draw_celshading(), draw_shadow(), GL_DrawBeams(), GL_DrawNullModel(), GL_DrawParticles(), GL_EnableOutlines(), GL_Flush2D(), GL_Flush3D(), and R_DrawSkyBox().

◆ GL_BindTexture()

void GL_BindTexture ( GLuint  tmu,
GLuint  texnum 
)

Definition at line 40 of file state.c.

41 {
42 #ifdef _DEBUG
43  if (gl_nobind->integer && !tmu) {
44  texnum = TEXNUM_DEFAULT;
45  }
46 #endif
47 
48  if (gls.texnums[tmu] == texnum) {
49  return;
50  }
51 
52  GL_ActiveTexture(tmu);
53 
54  qglBindTexture(GL_TEXTURE_2D, texnum);
55  gls.texnums[tmu] = texnum;
56 
57  c.texSwitches++;
58 }

Referenced by draw_alias_mesh(), draw_celshading(), draw_shadow(), GL_DrawBeams(), GL_DrawNullModel(), GL_DrawParticles(), GL_EnableOutlines(), GL_Flush2D(), GL_Flush3D(), and R_DrawSkyBox().

◆ GL_DisableOutlines()

void GL_DisableOutlines ( void  )

Definition at line 471 of file state.c.

472 {
473  qglDepthRange(0, 1);
474  qglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
475 }

Referenced by draw_alias_mesh(), GL_DrawParticles(), GL_Flush2D(), and GL_Flush3D().

◆ GL_EnableOutlines()

void GL_EnableOutlines ( void  )

Definition at line 460 of file state.c.

461 {
465  qglColor4f(1, 1, 1, 1);
466 
467  qglPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
468  qglDepthRange(0, 0);
469 }

Referenced by draw_alias_mesh(), GL_DrawParticles(), GL_Flush2D(), and GL_Flush3D().

◆ GL_ForceTexture()

void GL_ForceTexture ( GLuint  tmu,
GLuint  texnum 
)

◆ GL_Frustum()

static void GL_Frustum ( void  )
static

Definition at line 282 of file state.c.

283 {
284  GLfloat xmin, xmax, ymin, ymax, zfar, znear;
285  GLfloat width, height, depth;
286  GLfloat matrix[16];
287 
288  znear = gl_znear->value;
289 
290  if (glr.fd.rdflags & RDF_NOWORLDMODEL)
291  zfar = 2048;
292  else
293  zfar = gl_static.world.size * 2;
294 
295  ymax = znear * tan(glr.fd.fov_y * M_PI / 360.0);
296  ymin = -ymax;
297 
298  xmax = znear * tan(glr.fd.fov_x * M_PI / 360.0);
299  xmin = -xmax;
300 
301  width = xmax - xmin;
302  height = ymax - ymin;
303  depth = zfar - znear;
304 
305  matrix[0] = 2 * znear / width;
306  matrix[4] = 0;
307  matrix[8] = (xmax + xmin) / width;
308  matrix[12] = 0;
309 
310  matrix[1] = 0;
311  matrix[5] = 2 * znear / height;
312  matrix[9] = (ymax + ymin) / height;
313  matrix[13] = 0;
314 
315  matrix[2] = 0;
316  matrix[6] = 0;
317  matrix[10] = -(zfar + znear) / depth;
318  matrix[14] = -2 * zfar * znear / depth;
319 
320  matrix[3] = 0;
321  matrix[7] = 0;
322  matrix[11] = -1;
323  matrix[15] = 0;
324 
325  qglMatrixMode(GL_PROJECTION);
326  qglLoadMatrixf(matrix);
327 }

Referenced by GL_Setup3D().

◆ GL_InitPrograms()

void GL_InitPrograms ( void  )

Definition at line 477 of file state.c.

478 {
479 #ifdef GL_ARB_fragment_program
480  GLuint prog = 0;
481 
483  if (gl_fragment_program->integer) {
484  Com_Printf("...enabling GL_ARB_fragment_program\n");
487  } else {
488  Com_Printf("...ignoring GL_ARB_fragment_program\n");
489  }
490  } else if (gl_fragment_program->integer) {
491  Com_Printf("GL_ARB_fragment_program not found\n");
492  Cvar_Set("gl_fragment_program", "0");
493  }
494 
497  return;
498  }
499 
500  QGL_ClearErrors();
501 
502  qglGenProgramsARB(1, &prog);
503  qglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, prog);
504  qglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB,
505  sizeof(gl_prog_warp) - 1, gl_prog_warp);
506 
507  if (GL_ShowErrors("Failed to initialize fragment program")) {
508  qglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
509  qglDeleteProgramsARB(1, &prog);
510  return;
511  }
512 
513  qglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
514  gl_static.prognum_warp = prog;
515 #endif
516 }

Referenced by R_EndFrame_GL(), and R_Init_GL().

◆ GL_Ortho()

void GL_Ortho ( GLfloat  xmin,
GLfloat  xmax,
GLfloat  ymin,
GLfloat  ymax,
GLfloat  znear,
GLfloat  zfar 
)

Definition at line 230 of file state.c.

231 {
232  GLfloat width, height, depth;
233  GLfloat matrix[16];
234 
235  width = xmax - xmin;
236  height = ymax - ymin;
237  depth = zfar - znear;
238 
239  matrix[0] = 2 / width;
240  matrix[4] = 0;
241  matrix[8] = 0;
242  matrix[12] = -(xmax + xmin) / width;
243 
244  matrix[1] = 0;
245  matrix[5] = 2 / height;
246  matrix[9] = 0;
247  matrix[13] = -(ymax + ymin) / height;
248 
249  matrix[2] = 0;
250  matrix[6] = 0;
251  matrix[10] = -2 / depth;
252  matrix[14] = -(zfar + znear) / depth;
253 
254  matrix[3] = 0;
255  matrix[7] = 0;
256  matrix[11] = 0;
257  matrix[15] = 1;
258 
259  qglMatrixMode(GL_PROJECTION);
260  qglLoadMatrixf(matrix);
261 }

Referenced by GL_Setup2D(), and R_SetScale_GL().

◆ GL_RotateForViewer()

static void GL_RotateForViewer ( void  )
static

Definition at line 329 of file state.c.

330 {
331  GLfloat *matrix = glr.viewmatrix;
332 
333  AnglesToAxis(glr.fd.viewangles, glr.viewaxis);
334 
335  matrix[0] = -glr.viewaxis[1][0];
336  matrix[4] = -glr.viewaxis[1][1];
337  matrix[8] = -glr.viewaxis[1][2];
338  matrix[12] = DotProduct(glr.viewaxis[1], glr.fd.vieworg);
339 
340  matrix[1] = glr.viewaxis[2][0];
341  matrix[5] = glr.viewaxis[2][1];
342  matrix[9] = glr.viewaxis[2][2];
343  matrix[13] = -DotProduct(glr.viewaxis[2], glr.fd.vieworg);
344 
345  matrix[2] = -glr.viewaxis[0][0];
346  matrix[6] = -glr.viewaxis[0][1];
347  matrix[10] = -glr.viewaxis[0][2];
348  matrix[14] = DotProduct(glr.viewaxis[0], glr.fd.vieworg);
349 
350  matrix[3] = 0;
351  matrix[7] = 0;
352  matrix[11] = 0;
353  matrix[15] = 1;
354 
355  qglMatrixMode(GL_MODELVIEW);
356  qglLoadMatrixf(matrix);
357 
358  // forced matrix upload
359  gls.currentmatrix = matrix;
360 }

Referenced by GL_Setup3D().

◆ GL_SetDefaultState()

void GL_SetDefaultState ( void  )

Definition at line 377 of file state.c.

378 {
379  qglClearColor(0, 0, 0, 1);
380  qglClearDepth(1);
381  qglClearStencil(0);
382 
383  qglEnable(GL_DEPTH_TEST);
384  qglDepthFunc(GL_LEQUAL);
385  qglDepthRange(0, 1);
386  qglDepthMask(GL_TRUE);
387  qglDisable(GL_BLEND);
388  qglDisable(GL_ALPHA_TEST);
389  qglAlphaFunc(GL_GREATER, 0.666f);
390  qglPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
391  qglFrontFace(GL_CW);
392  qglCullFace(GL_BACK);
393  qglEnable(GL_CULL_FACE);
394  qglShadeModel(GL_FLAT);
395 
397  qglActiveTextureARB(GL_TEXTURE1_ARB);
398  qglBindTexture(GL_TEXTURE_2D, 0);
399  qglDisable(GL_TEXTURE_2D);
400  qglClientActiveTextureARB(GL_TEXTURE1_ARB);
401  qglDisableClientState(GL_TEXTURE_COORD_ARRAY);
402 
403  qglActiveTextureARB(GL_TEXTURE0_ARB);
404  qglBindTexture(GL_TEXTURE_2D, 0);
405  qglEnable(GL_TEXTURE_2D);
406  qglClientActiveTextureARB(GL_TEXTURE0_ARB);
407  qglDisableClientState(GL_TEXTURE_COORD_ARRAY);
408  } else {
409  qglBindTexture(GL_TEXTURE_2D, 0);
410  qglEnable(GL_TEXTURE_2D);
411  qglDisableClientState(GL_TEXTURE_COORD_ARRAY);
412  }
413 
414  qglMatrixMode(GL_TEXTURE);
415  qglLoadIdentity();
416  qglMatrixMode(GL_MODELVIEW);
417 
418  qglDisableClientState(GL_VERTEX_ARRAY);
419  qglDisableClientState(GL_COLOR_ARRAY);
420 
421  qglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | gl_static.stencil_buffer_bit);
422 
423  memset(&gls, 0, sizeof(gls));
424 }

Referenced by GL_PostInit().

◆ GL_Setup2D()

void GL_Setup2D ( void  )

Definition at line 263 of file state.c.

264 {
265  qglViewport(0, 0, r_config.width, r_config.height);
266 
267  GL_Ortho(0, r_config.width, r_config.height, 0, -1, 1);
268  draw.scale = 1;
269 
270  draw.colors[0].u32 = U32_WHITE;
271  draw.colors[1].u32 = U32_WHITE;
272 
273  if (draw.scissor) {
274  qglDisable(GL_SCISSOR_TEST);
275  draw.scissor = qfalse;
276  }
277 
278  qglMatrixMode(GL_MODELVIEW);
279  qglLoadIdentity();
280 }

Referenced by R_BeginFrame_GL(), and R_RenderFrame_GL().

◆ GL_Setup3D()

void GL_Setup3D ( void  )

Definition at line 362 of file state.c.

363 {
364  qglViewport(glr.fd.x, r_config.height - (glr.fd.y + glr.fd.height),
365  glr.fd.width, glr.fd.height);
366 
367  GL_Frustum();
368 
370 
371  // enable depth writes before clearing
373 
374  qglClear(GL_DEPTH_BUFFER_BIT | gl_static.stencil_buffer_bit);
375 }

Referenced by R_RenderFrame_GL().

◆ GL_ShutdownPrograms()

void GL_ShutdownPrograms ( void  )

Definition at line 518 of file state.c.

519 {
520 #ifdef GL_ARB_fragment_program
521  if (!qglDeleteProgramsARB) {
522  return;
523  }
524 
525  if (gl_static.prognum_warp) {
528  }
529 
532 #endif
533 }

Referenced by R_EndFrame_GL(), and R_Shutdown_GL().

◆ GL_StateBits()

void GL_StateBits ( glStateBits_t  bits)

Definition at line 60 of file state.c.

61 {
63 
64  if (!diff) {
65  return;
66  }
67 
68  if (diff & GLS_BLEND_MASK) {
69  if (bits & GLS_BLEND_MASK) {
70  qglEnable(GL_BLEND);
71  if (bits & GLS_BLEND_BLEND) {
72  qglBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
73  } else if (bits & GLS_BLEND_ADD) {
74  qglBlendFunc(GL_SRC_ALPHA, GL_ONE);
75  } else if (bits & GLS_BLEND_MODULATE) {
76  qglBlendFunc(GL_DST_COLOR, GL_ONE);
77  }
78  } else {
79  qglDisable(GL_BLEND);
80  }
81  }
82 
83  if (diff & GLS_DEPTHMASK_FALSE) {
84  if (bits & GLS_DEPTHMASK_FALSE) {
85  qglDepthMask(GL_FALSE);
86  } else {
87  qglDepthMask(GL_TRUE);
88  }
89  }
90 
92  if (bits & GLS_DEPTHTEST_DISABLE) {
93  qglDisable(GL_DEPTH_TEST);
94  } else {
95  qglEnable(GL_DEPTH_TEST);
96  }
97  }
98 
99  if (diff & GLS_ALPHATEST_ENABLE) {
100  if (bits & GLS_ALPHATEST_ENABLE) {
101  qglEnable(GL_ALPHA_TEST);
102  } else {
103  qglDisable(GL_ALPHA_TEST);
104  }
105  }
106 
107  if (diff & GLS_TEXTURE_REPLACE) {
108  GL_ActiveTexture(0);
109  if (bits & GLS_TEXTURE_REPLACE) {
110  qglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
111  } else {
112  qglTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
113  }
114  }
115 
116  if (diff & GLS_FLOW_ENABLE) {
117  GL_ActiveTexture(0);
118  qglMatrixMode(GL_TEXTURE);
119 
120  if (bits & GLS_FLOW_ENABLE) {
121  float scaled, scroll;
122 
123  if (bits & GLS_WARP_ENABLE) {
124  scaled = glr.fd.time * 0.5f;
125  scroll = -scaled;
126  } else {
127  scaled = glr.fd.time / 40;
128  scroll = -64 * (scaled - (int)scaled);
129  }
130 
131  qglTranslatef(scroll, 0, 0);
132  } else {
133  qglLoadIdentity();
134  }
135 
136  qglMatrixMode(GL_MODELVIEW);
137  }
138 
139  if (diff & GLS_LIGHTMAP_ENABLE) {
140  GL_ActiveTexture(1);
141  if (bits & GLS_LIGHTMAP_ENABLE) {
142  qglEnable(GL_TEXTURE_2D);
143  } else {
144  qglDisable(GL_TEXTURE_2D);
145  }
146  }
147 
148 #ifdef GL_ARB_fragment_program
150  if (bits & GLS_WARP_ENABLE) {
151  vec4_t param;
152 
153  qglEnable(GL_FRAGMENT_PROGRAM_ARB);
154  qglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, gl_static.prognum_warp);
155  param[0] = glr.fd.time;
156  param[1] = glr.fd.time;
157  param[2] = param[3] = 0;
158  qglProgramLocalParameter4fvARB(GL_FRAGMENT_PROGRAM_ARB, 0, param);
159  } else {
160  qglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, 0);
161  qglDisable(GL_FRAGMENT_PROGRAM_ARB);
162  }
163  }
164 #endif
165 
166  if (diff & GLS_CULL_DISABLE) {
167  if (bits & GLS_CULL_DISABLE) {
168  qglDisable(GL_CULL_FACE);
169  } else {
170  qglEnable(GL_CULL_FACE);
171  }
172  }
173 
174  if (diff & GLS_SHADE_SMOOTH) {
175  if (bits & GLS_SHADE_SMOOTH) {
176  qglShadeModel(GL_SMOOTH);
177  } else {
178  qglShadeModel(GL_FLAT);
179  }
180  }
181 
182  gls.state_bits = bits;
183 }

Referenced by draw_alias_mesh(), draw_celshading(), draw_shadow(), GL_DrawBeams(), GL_DrawNullModel(), GL_DrawParticles(), GL_EnableOutlines(), GL_Flush2D(), GL_Flush3D(), GL_Setup3D(), and R_DrawSkyBox().

◆ IMG_ReadPixels_GL()

byte* IMG_ReadPixels_GL ( int width,
int height,
int rowbytes 
)

Definition at line 427 of file state.c.

428 {
429  int align = 4;
430  int pitch;
431  byte *pixels;
432 
433  qglGetIntegerv(GL_PACK_ALIGNMENT, &align);
434  pitch = (r_config.width * 3 + align - 1) & ~(align - 1);
435  pixels = FS_AllocTempMem(pitch * r_config.height);
436 
437  qglReadPixels(0, 0, r_config.width, r_config.height,
438  GL_RGB, GL_UNSIGNED_BYTE, pixels);
439 
440  int ideal_pitch = r_config.width * 3;
441  if (pitch > ideal_pitch)
442  {
443  for (int row = 1; row < r_config.height; row++)
444  {
445  byte* src = pixels + row * pitch;
446  byte* dst = pixels + row * ideal_pitch;
447  memcpy(dst, src, ideal_pitch);
448  }
449 
450  pitch = ideal_pitch;
451  }
452 
453  *width = r_config.width;
454  *height = r_config.height;
455  *rowbytes = pitch;
456 
457  return pixels;
458 }

Referenced by R_RegisterFunctionsGL().

Variable Documentation

◆ gls

qglBindTexture
#define qglBindTexture
Definition: fixed.h:37
GLS_BLEND_MODULATE
@ GLS_BLEND_MODULATE
Definition: gl.h:287
qglDepthFunc
#define qglDepthFunc
Definition: fixed.h:51
qglPolygonMode
#define qglPolygonMode
Definition: fixed.h:92
GLS_SHADE_SMOOTH
@ GLS_SHADE_SMOOTH
Definition: gl.h:294
Cvar_Set
cvar_t * Cvar_Set(const char *var_name, const char *value)
Definition: cvar.c:466
qglClientActiveTextureARB
PFNGLCLIENTACTIVETEXTUREARBPROC qglClientActiveTextureARB
Definition: fixed.c:39
qglClearDepth
#define qglClearDepth
Definition: fixed.h:41
GLS_DEPTHTEST_DISABLE
@ GLS_DEPTHTEST_DISABLE
Definition: gl.h:284
glArrayBits_t
glArrayBits_t
Definition: gl.h:299
height
static int height
Definition: physical_sky.c:39
glState_t::array_bits
glArrayBits_t array_bits
Definition: gl.h:312
qglDepthMask
#define qglDepthMask
Definition: fixed.h:52
GLS_CULL_DISABLE
@ GLS_CULL_DISABLE
Definition: gl.h:293
GL_Frustum
static void GL_Frustum(void)
Definition: state.c:282
qglMatrixMode
#define qglMatrixMode
Definition: fixed.h:84
qglProgramLocalParameter4fvARB
PFNGLPROGRAMLOCALPARAMETER4FVARBPROC qglProgramLocalParameter4fvARB
Definition: fixed.c:35
align
static size_t align(size_t x, size_t alignment)
Definition: vk_util.h:143
qglCullFace
#define qglCullFace
Definition: fixed.h:49
qglDepthRange
#define qglDepthRange
Definition: fixed.h:53
qglProgramStringARB
PFNGLPROGRAMSTRINGARBPROC qglProgramStringARB
Definition: fixed.c:30
glStatic_t::size
vec_t size
Definition: gl.h:66
qglClearColor
#define qglClearColor
Definition: fixed.h:40
gls
glState_t gls
Definition: state.c:22
qglDisableClientState
#define qglDisableClientState
Definition: fixed.h:55
qglColor4f
#define qglColor4f
Definition: fixed.h:43
drawStatic_t::colors
color_t colors[2]
Definition: gl.h:402
GLS_TEXTURE_REPLACE
@ GLS_TEXTURE_REPLACE
Definition: gl.h:289
qglDeleteProgramsARB
PFNGLDELETEPROGRAMSARBPROC qglDeleteProgramsARB
Definition: fixed.c:32
qglBlendFunc
#define qglBlendFunc
Definition: fixed.h:38
GL_ClientActiveTexture
static void GL_ClientActiveTexture(GLuint tmu)
Definition: gl.h:326
glState_t::texnums
GLuint texnums[MAX_TMUS]
Definition: gl.h:310
GLS_WARP_ENABLE
@ GLS_WARP_ENABLE
Definition: gl.h:292
GLS_BLEND_BLEND
@ GLS_BLEND_BLEND
Definition: gl.h:285
GLS_LIGHTMAP_ENABLE
@ GLS_LIGHTMAP_ENABLE
Definition: gl.h:291
glConfig_t::ext_supported
unsigned ext_supported
Definition: gl.h:106
qglReadPixels
#define qglReadPixels
Definition: fixed.h:96
GLA_VERTEX
@ GLA_VERTEX
Definition: gl.h:301
glStatic_t::stencil_buffer_bit
GLbitfield stencil_buffer_bit
Definition: gl.h:70
gl_config
glConfig_t gl_config
Definition: main.c:29
qglClear
#define qglClear
Definition: fixed.h:39
draw
drawStatic_t draw
Definition: draw.c:21
width
static int width
Definition: physical_sky.c:38
GLS_BLEND_MASK
#define GLS_BLEND_MASK
Definition: gl.h:297
GLS_FLOW_ENABLE
@ GLS_FLOW_ENABLE
Definition: gl.h:290
GLS_BLEND_ADD
@ GLS_BLEND_ADD
Definition: gl.h:286
TEXNUM_DEFAULT
#define TEXNUM_DEFAULT
Definition: gl.h:439
QGL_ARB_fragment_program
#define QGL_ARB_fragment_program
Definition: dynamic.h:155
QGL_ClearErrors
void QGL_ClearErrors(void)
Definition: main.c:531
glRefdef_t::viewaxis
vec3_t viewaxis[3]
Definition: gl.h:82
statCounters_t::texSwitches
int texSwitches
Definition: gl.h:140
glStatic_t::world
struct glStatic_t::@11 world
glStateBits_t
glStateBits_t
Definition: gl.h:281
qglDisable
#define qglDisable
Definition: fixed.h:54
GL_ArrayBits
void GL_ArrayBits(glArrayBits_t bits)
Definition: state.c:185
qglFrontFace
#define qglFrontFace
Definition: fixed.h:64
qglEnableClientState
#define qglEnableClientState
Definition: fixed.h:59
glRefdef_t::viewmatrix
GLfloat viewmatrix[16]
Definition: gl.h:83
QGL_ShutdownExtensions
void QGL_ShutdownExtensions(unsigned mask)
Definition: dynamic.c:643
qglGetIntegerv
#define qglGetIntegerv
Definition: fixed.h:69
qglLoadIdentity
#define qglLoadIdentity
Definition: fixed.h:79
GL_ActiveTexture
static void GL_ActiveTexture(GLuint tmu)
Definition: gl.h:318
GLS_DEFAULT
@ GLS_DEFAULT
Definition: gl.h:282
qglLoadMatrixf
#define qglLoadMatrixf
Definition: fixed.h:80
qglActiveTextureARB
PFNGLACTIVETEXTUREARBPROC qglActiveTextureARB
Definition: fixed.c:38
GLA_LMTC
@ GLA_LMTC
Definition: gl.h:303
gl_znear
cvar_t * gl_znear
Definition: main.c:57
GL_Ortho
void GL_Ortho(GLfloat xmin, GLfloat xmax, GLfloat ymin, GLfloat ymax, GLfloat znear, GLfloat zfar)
Definition: state.c:230
gl_static
glStatic_t gl_static
Definition: main.c:28
GLA_TC
@ GLA_TC
Definition: gl.h:302
c
statCounters_t c
Definition: main.c:30
qglGenProgramsARB
PFNGLGENPROGRAMSARBPROC qglGenProgramsARB
Definition: fixed.c:33
glr
glRefdef_t glr
Definition: main.c:27
GL_BindTexture
void GL_BindTexture(GLuint tmu, GLuint texnum)
Definition: state.c:40
TEXNUM_WHITE
#define TEXNUM_WHITE
Definition: gl.h:443
glStatic_t::prognum_warp
GLuint prognum_warp
Definition: gl.h:68
qglClearStencil
#define qglClearStencil
Definition: fixed.h:42
glConfig_t::ext_enabled
unsigned ext_enabled
Definition: gl.h:107
qglShadeModel
#define qglShadeModel
Definition: fixed.h:100
QGL_InitExtensions
void QGL_InitExtensions(unsigned mask)
Definition: dynamic.c:683
GLA_COLOR
@ GLA_COLOR
Definition: gl.h:304
qglViewport
#define qglViewport
Definition: fixed.h:113
diff
static q_noinline int diff(uint32_t A_u32, uint32_t B_u32)
Definition: hq2x.c:55
qglAlphaFunc
#define qglAlphaFunc
Definition: fixed.h:36
qglTranslatef
#define qglTranslatef
Definition: fixed.h:111
gl_fragment_program
cvar_t * gl_fragment_program
Definition: main.c:52
gl_prog_warp
static const char gl_prog_warp[]
Definition: arbfp.h:1
GLS_ALPHATEST_ENABLE
@ GLS_ALPHATEST_ENABLE
Definition: gl.h:288
qglTexEnvf
#define qglTexEnvf
Definition: fixed.h:105
drawStatic_t::scale
float scale
Definition: gl.h:404
glState_t::currentmatrix
const GLfloat * currentmatrix
Definition: gl.h:313
int
CONST PIXELFORMATDESCRIPTOR int
Definition: wgl.c:26
GL_RotateForViewer
static void GL_RotateForViewer(void)
Definition: state.c:329
GLS_DEPTHMASK_FALSE
@ GLS_DEPTHMASK_FALSE
Definition: gl.h:283
drawStatic_t::scissor
qboolean scissor
Definition: gl.h:403
qglBindProgramARB
PFNGLBINDPROGRAMARBPROC qglBindProgramARB
Definition: fixed.c:31
GL_ShowErrors
qboolean GL_ShowErrors(const char *func)
Definition: main.c:539
glState_t::state_bits
glStateBits_t state_bits
Definition: gl.h:311
GL_StateBits
void GL_StateBits(glStateBits_t bits)
Definition: state.c:60
r_config
refcfg_t r_config
Definition: refresh.c:401
glRefdef_t::fd
refdef_t fd
Definition: gl.h:81
qglEnable
#define qglEnable
Definition: fixed.h:58