vkQuake2 doxygen  1.0 dev
gl_local.h File Reference
#include <windows.h>
#include <stdio.h>
#include <GL/gl.h>
#include <GL/glu.h>
#include <math.h>
#include "../client/ref.h"
#include "qgl.h"
#include "gl_model.h"

Go to the source code of this file.

Classes

struct  viddef_t
 
struct  image_s
 
struct  glvert_t
 
struct  glconfig_t
 
struct  glstate_t
 

Macros

#define GL_COLOR_INDEX8_EXT   GL_COLOR_INDEX
 
#define REF_VERSION   "GL 0.01"
 
#define PITCH   0
 
#define YAW   1
 
#define ROLL   2
 
#define __VIDDEF_T
 
#define TEXNUM_LIGHTMAPS   1024
 
#define TEXNUM_SCRAPS   1152
 
#define TEXNUM_IMAGES   1153
 
#define MAX_GLTEXTURES   1024
 
#define MAX_LBM_HEIGHT   480
 
#define BACKFACE_EPSILON   0.01
 
#define GL_RENDERER_VOODOO   0x00000001
 
#define GL_RENDERER_VOODOO2   0x00000002
 
#define GL_RENDERER_VOODOO_RUSH   0x00000004
 
#define GL_RENDERER_BANSHEE   0x00000008
 
#define GL_RENDERER_3DFX   0x0000000F
 
#define GL_RENDERER_PCX1   0x00000010
 
#define GL_RENDERER_PCX2   0x00000020
 
#define GL_RENDERER_PMX   0x00000040
 
#define GL_RENDERER_POWERVR   0x00000070
 
#define GL_RENDERER_PERMEDIA2   0x00000100
 
#define GL_RENDERER_GLINT_MX   0x00000200
 
#define GL_RENDERER_GLINT_TX   0x00000400
 
#define GL_RENDERER_3DLABS_MISC   0x00000800
 
#define GL_RENDERER_3DLABS   0x00000F00
 
#define GL_RENDERER_REALIZM   0x00001000
 
#define GL_RENDERER_REALIZM2   0x00002000
 
#define GL_RENDERER_INTERGRAPH   0x00003000
 
#define GL_RENDERER_3DPRO   0x00004000
 
#define GL_RENDERER_REAL3D   0x00008000
 
#define GL_RENDERER_RIVA128   0x00010000
 
#define GL_RENDERER_DYPIC   0x00020000
 
#define GL_RENDERER_V1000   0x00040000
 
#define GL_RENDERER_V2100   0x00080000
 
#define GL_RENDERER_V2200   0x00100000
 
#define GL_RENDERER_RENDITION   0x001C0000
 
#define GL_RENDERER_O2   0x00100000
 
#define GL_RENDERER_IMPACT   0x00200000
 
#define GL_RENDERER_RE   0x00400000
 
#define GL_RENDERER_IR   0x00800000
 
#define GL_RENDERER_SGI   0x00F00000
 
#define GL_RENDERER_MCD   0x01000000
 
#define GL_RENDERER_OTHER   0x80000000
 

Typedefs

typedef struct image_s image_t
 

Enumerations

enum  imagetype_t {
  it_skin, it_sprite, it_wall, it_pic,
  it_sky, it_skin, it_sprite, it_wall,
  it_pic, it_sky, it_skin, it_sprite,
  it_wall, it_pic, it_sky
}
 
enum  rserr_t {
  rserr_ok, rserr_invalid_fullscreen, rserr_invalid_mode, rserr_unknown,
  rserr_ok, rserr_invalid_fullscreen, rserr_invalid_mode, rserr_unknown,
  rserr_ok, rserr_invalid_fullscreen, rserr_invalid_mode, rserr_unknown
}
 

Functions

void GL_BeginRendering (int *x, int *y, int *width, int *height)
 
void GL_EndRendering (void)
 
void GL_SetDefaultState (void)
 
void GL_UpdateSwapInterval (void)
 
void R_TranslatePlayerSkin (int playernum)
 
void GL_Bind (int texnum)
 
void GL_MBind (GLenum target, int texnum)
 
void GL_TexEnv (GLenum value)
 
void GL_EnableMultitexture (qboolean enable)
 
void GL_SelectTexture (GLenum)
 
void R_LightPoint (vec3_t p, vec3_t color)
 
void R_PushDlights (void)
 
void V_AddBlend (float r, float g, float b, float a, float *v_blend)
 
qboolean R_Init (void *hinstance, void *hWnd)
 
void R_Shutdown (void)
 
void R_RenderView (refdef_t *fd)
 
void GL_ScreenShot_f (void)
 
void R_DrawAliasModel (entity_t *e)
 
void R_DrawBrushModel (entity_t *e)
 
void R_DrawSpriteModel (entity_t *e)
 
void R_DrawBeam (entity_t *e)
 
void R_DrawWorld (void)
 
void R_RenderDlights (void)
 
void R_DrawAlphaSurfaces (void)
 
void R_RenderBrushPoly (msurface_t *fa)
 
void R_InitParticleTexture (void)
 
void Draw_InitLocal (void)
 
void GL_SubdivideSurface (msurface_t *fa)
 
qboolean R_CullBox (vec3_t mins, vec3_t maxs)
 
void R_RotateForEntity (entity_t *e)
 
void R_MarkLeaves (void)
 
glpoly_tWaterWarpPolyVerts (glpoly_t *p)
 
void EmitWaterPolys (msurface_t *fa)
 
void R_AddSkySurface (msurface_t *fa)
 
void R_ClearSkyBox (void)
 
void R_DrawSkyBox (void)
 
void R_MarkLights (dlight_t *light, int bit, mnode_t *node)
 
void COM_StripExtension (char *in, char *out)
 
void Draw_GetPicSize (int *w, int *h, char *name)
 
void Draw_Pic (int x, int y, char *name)
 
void Draw_StretchPic (int x, int y, int w, int h, char *name)
 
void Draw_Char (int x, int y, int c)
 
void Draw_TileClear (int x, int y, int w, int h, char *name)
 
void Draw_Fill (int x, int y, int w, int h, int c)
 
void Draw_FadeScreen (void)
 
void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data)
 
void R_BeginFrame (float camera_separation)
 
void R_SwapBuffers (int)
 
void R_SetPalette (const unsigned char *palette)
 
int Draw_GetPalette (void)
 
void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight)
 
struct image_sR_RegisterSkin (char *name)
 
void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height)
 
image_tGL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits)
 
image_tGL_FindImage (char *name, imagetype_t type)
 
void GL_TextureMode (char *string)
 
void GL_ImageList_f (void)
 
void GL_SetTexturePalette (unsigned palette[256])
 
void GL_InitImages (void)
 
void GL_ShutdownImages (void)
 
void GL_FreeUnusedImages (void)
 
void GL_TextureAlphaMode (char *string)
 
void GL_TextureSolidMode (char *string)
 
void GL_DrawParticles (int n, const particle_t particles[], const unsigned colortable[768])
 
void GLimp_BeginFrame (float camera_separation)
 
void GLimp_EndFrame (void)
 
qboolean GLimp_Init (void *hinstance, void *hWnd)
 
void GLimp_Shutdown (void)
 
rserr_t GLimp_SetMode (int *pwidth, int *pheight, int mode, qboolean fullscreen)
 
void GLimp_AppActivate (qboolean active)
 
void GLimp_EnableLogging (qboolean enable)
 
void GLimp_LogNewFrame (void)
 

Variables

viddef_t vid
 
float gldepthmin
 
float gldepthmax
 
image_t gltextures [MAX_GLTEXTURES]
 
int numgltextures
 
image_tr_notexture
 
image_tr_particletexture
 
entity_tcurrententity
 
model_tcurrentmodel
 
int r_visframecount
 
int r_framecount
 
cplane_t frustum [4]
 
int c_brush_polys
 
int c_alias_polys
 
int gl_filter_min
 
int gl_filter_max
 
vec3_t vup
 
vec3_t vpn
 
vec3_t vright
 
vec3_t r_origin
 
refdef_t r_newrefdef
 
int r_viewcluster
 
int r_viewcluster2
 
int r_oldviewcluster
 
int r_oldviewcluster2
 
cvar_tr_norefresh
 
cvar_tr_lefthand
 
cvar_tr_drawentities
 
cvar_tr_drawworld
 
cvar_tr_speeds
 
cvar_tr_fullbright
 
cvar_tr_novis
 
cvar_tr_nocull
 
cvar_tr_lerpmodels
 
cvar_tr_lightlevel
 
cvar_tgl_vertex_arrays
 
cvar_tgl_ext_swapinterval
 
cvar_tgl_ext_palettedtexture
 
cvar_tgl_ext_multitexture
 
cvar_tgl_ext_pointparameters
 
cvar_tgl_ext_compiled_vertex_array
 
cvar_tgl_particle_min_size
 
cvar_tgl_particle_max_size
 
cvar_tgl_particle_size
 
cvar_tgl_particle_att_a
 
cvar_tgl_particle_att_b
 
cvar_tgl_particle_att_c
 
cvar_tgl_nosubimage
 
cvar_tgl_bitdepth
 
cvar_tgl_mode
 
cvar_tgl_log
 
cvar_tgl_lightmap
 
cvar_tgl_shadows
 
cvar_tgl_dynamic
 
cvar_tgl_monolightmap
 
cvar_tgl_nobind
 
cvar_tgl_round_down
 
cvar_tgl_picmip
 
cvar_tgl_skymip
 
cvar_tgl_showtris
 
cvar_tgl_finish
 
cvar_tgl_ztrick
 
cvar_tgl_clear
 
cvar_tgl_cull
 
cvar_tgl_poly
 
cvar_tgl_texsort
 
cvar_tgl_polyblend
 
cvar_tgl_flashblend
 
cvar_tgl_lightmaptype
 
cvar_tgl_modulate
 
cvar_tgl_playermip
 
cvar_tgl_drawbuffer
 
cvar_tgl_3dlabs_broken
 
cvar_tgl_driver
 
cvar_tgl_swapinterval
 
cvar_tgl_texturemode
 
cvar_tgl_texturealphamode
 
cvar_tgl_texturesolidmode
 
cvar_tgl_saturatelighting
 
cvar_tgl_lockpvs
 
cvar_tvid_fullscreen
 
cvar_tvid_gamma
 
cvar_tintensity
 
int gl_lightmap_format
 
int gl_solid_format
 
int gl_alpha_format
 
int gl_tex_solid_format
 
int gl_tex_alpha_format
 
int c_visible_lightmaps
 
int c_visible_textures
 
float r_world_matrix [16]
 
model_tr_worldmodel
 
unsigned d_8to24table [256]
 
int registration_sequence
 
glconfig_t gl_config
 
glstate_t gl_state
 
refimport_t ri
 

Macro Definition Documentation

◆ __VIDDEF_T

#define __VIDDEF_T

Definition at line 55 of file gl_local.h.

◆ BACKFACE_EPSILON

#define BACKFACE_EPSILON   0.01

Definition at line 141 of file gl_local.h.

◆ GL_COLOR_INDEX8_EXT

#define GL_COLOR_INDEX8_EXT   GL_COLOR_INDEX

Definition at line 34 of file gl_local.h.

◆ GL_RENDERER_3DFX

#define GL_RENDERER_3DFX   0x0000000F

Definition at line 360 of file gl_local.h.

◆ GL_RENDERER_3DLABS

#define GL_RENDERER_3DLABS   0x00000F00

Definition at line 371 of file gl_local.h.

◆ GL_RENDERER_3DLABS_MISC

#define GL_RENDERER_3DLABS_MISC   0x00000800

Definition at line 370 of file gl_local.h.

◆ GL_RENDERER_3DPRO

#define GL_RENDERER_3DPRO   0x00004000

Definition at line 377 of file gl_local.h.

◆ GL_RENDERER_BANSHEE

#define GL_RENDERER_BANSHEE   0x00000008

Definition at line 359 of file gl_local.h.

◆ GL_RENDERER_DYPIC

#define GL_RENDERER_DYPIC   0x00020000

Definition at line 380 of file gl_local.h.

◆ GL_RENDERER_GLINT_MX

#define GL_RENDERER_GLINT_MX   0x00000200

Definition at line 368 of file gl_local.h.

◆ GL_RENDERER_GLINT_TX

#define GL_RENDERER_GLINT_TX   0x00000400

Definition at line 369 of file gl_local.h.

◆ GL_RENDERER_IMPACT

#define GL_RENDERER_IMPACT   0x00200000

Definition at line 388 of file gl_local.h.

◆ GL_RENDERER_INTERGRAPH

#define GL_RENDERER_INTERGRAPH   0x00003000

Definition at line 375 of file gl_local.h.

◆ GL_RENDERER_IR

#define GL_RENDERER_IR   0x00800000

Definition at line 390 of file gl_local.h.

◆ GL_RENDERER_MCD

#define GL_RENDERER_MCD   0x01000000

Definition at line 393 of file gl_local.h.

◆ GL_RENDERER_O2

#define GL_RENDERER_O2   0x00100000

Definition at line 387 of file gl_local.h.

◆ GL_RENDERER_OTHER

#define GL_RENDERER_OTHER   0x80000000

Definition at line 394 of file gl_local.h.

◆ GL_RENDERER_PCX1

#define GL_RENDERER_PCX1   0x00000010

Definition at line 362 of file gl_local.h.

◆ GL_RENDERER_PCX2

#define GL_RENDERER_PCX2   0x00000020

Definition at line 363 of file gl_local.h.

◆ GL_RENDERER_PERMEDIA2

#define GL_RENDERER_PERMEDIA2   0x00000100

Definition at line 367 of file gl_local.h.

◆ GL_RENDERER_PMX

#define GL_RENDERER_PMX   0x00000040

Definition at line 364 of file gl_local.h.

◆ GL_RENDERER_POWERVR

#define GL_RENDERER_POWERVR   0x00000070

Definition at line 365 of file gl_local.h.

◆ GL_RENDERER_RE

#define GL_RENDERER_RE   0x00400000

Definition at line 389 of file gl_local.h.

◆ GL_RENDERER_REAL3D

#define GL_RENDERER_REAL3D   0x00008000

Definition at line 378 of file gl_local.h.

◆ GL_RENDERER_REALIZM

#define GL_RENDERER_REALIZM   0x00001000

Definition at line 373 of file gl_local.h.

◆ GL_RENDERER_REALIZM2

#define GL_RENDERER_REALIZM2   0x00002000

Definition at line 374 of file gl_local.h.

◆ GL_RENDERER_RENDITION

#define GL_RENDERER_RENDITION   0x001C0000

Definition at line 385 of file gl_local.h.

◆ GL_RENDERER_RIVA128

#define GL_RENDERER_RIVA128   0x00010000

Definition at line 379 of file gl_local.h.

◆ GL_RENDERER_SGI

#define GL_RENDERER_SGI   0x00F00000

Definition at line 391 of file gl_local.h.

◆ GL_RENDERER_V1000

#define GL_RENDERER_V1000   0x00040000

Definition at line 382 of file gl_local.h.

◆ GL_RENDERER_V2100

#define GL_RENDERER_V2100   0x00080000

Definition at line 383 of file gl_local.h.

◆ GL_RENDERER_V2200

#define GL_RENDERER_V2200   0x00100000

Definition at line 384 of file gl_local.h.

◆ GL_RENDERER_VOODOO

#define GL_RENDERER_VOODOO   0x00000001

Definition at line 356 of file gl_local.h.

◆ GL_RENDERER_VOODOO2

#define GL_RENDERER_VOODOO2   0x00000002

Definition at line 357 of file gl_local.h.

◆ GL_RENDERER_VOODOO_RUSH

#define GL_RENDERER_VOODOO_RUSH   0x00000004

Definition at line 358 of file gl_local.h.

◆ MAX_GLTEXTURES

#define MAX_GLTEXTURES   1024

Definition at line 107 of file gl_local.h.

◆ MAX_LBM_HEIGHT

#define MAX_LBM_HEIGHT   480

Definition at line 139 of file gl_local.h.

◆ PITCH

#define PITCH   0

Definition at line 45 of file gl_local.h.

◆ REF_VERSION

#define REF_VERSION   "GL 0.01"

Definition at line 42 of file gl_local.h.

◆ ROLL

#define ROLL   2

Definition at line 51 of file gl_local.h.

◆ TEXNUM_IMAGES

#define TEXNUM_IMAGES   1153

Definition at line 105 of file gl_local.h.

◆ TEXNUM_LIGHTMAPS

#define TEXNUM_LIGHTMAPS   1024

Definition at line 103 of file gl_local.h.

◆ TEXNUM_SCRAPS

#define TEXNUM_SCRAPS   1152

Definition at line 104 of file gl_local.h.

◆ YAW

#define YAW   1

Definition at line 48 of file gl_local.h.

Typedef Documentation

◆ image_t

typedef struct image_s image_t

Enumeration Type Documentation

◆ imagetype_t

Enumerator
it_skin 
it_sprite 
it_wall 
it_pic 
it_sky 
it_skin 
it_sprite 
it_wall 
it_pic 
it_sky 
it_skin 
it_sprite 
it_wall 
it_pic 
it_sky 

Definition at line 78 of file gl_local.h.

79 {
80  it_skin,
81  it_sprite,
82  it_wall,
83  it_pic,
84  it_sky
85 } imagetype_t;

◆ rserr_t

enum rserr_t
Enumerator
rserr_ok 
rserr_invalid_fullscreen 
rserr_invalid_mode 
rserr_unknown 
rserr_ok 
rserr_invalid_fullscreen 
rserr_invalid_mode 
rserr_unknown 
rserr_ok 
rserr_invalid_fullscreen 
rserr_invalid_mode 
rserr_unknown 

Definition at line 111 of file gl_local.h.

112 {
113  rserr_ok,
114 
117 
119 } rserr_t;

Function Documentation

◆ COM_StripExtension()

void COM_StripExtension ( char *  in,
char *  out 
)

Definition at line 826 of file q_shared.c.

827 {
828  while (*in && *in != '.')
829  *out++ = *in++;
830  *out = 0;
831 }

◆ Draw_Char()

void Draw_Char ( int  x,
int  y,
int  c 
)

Definition at line 242 of file r_draw.c.

243 {
244  byte *dest;
245  byte *source;
246  byte *src;
247  int drawline;
248  int row, col, f, i, v, skip = 0;
249  int fstep, tbyte, sv;
250 
251  num &= 255;
252 
253  if (num == 32 || num == 32 + 128)
254  return;
255 
256  if (y <= -8)
257  return; // totally off screen
258 
259  // if ( ( y + 8 ) >= vid.height )
260  if ((y + 8) > vid.height) // PGM - status text was missing in sw...
261  return;
262 
263  cvar_t *scale = ri.Cvar_Get("hudscale", "1", 0);
264 
265 #ifdef PARANOID
266  if (y > vid.height - 8 || x < 0 || x > vid.width - 8)
267  ri.Sys_Error(ERR_FATAL, "Con_DrawCharacter: (%i, %i)", x, y);
268  if (num < 0 || num > 255)
269  ri.Sys_Error(ERR_FATAL, "Con_DrawCharacter: char %i", num);
270 #endif
271 
272  row = num >> 4;
273  col = num & 15;
274  source = draw_chars->pixels[0] + (row << 10) + (col << 3);
275 
276  if (y < 0)
277  { // clipped
278  skip = y;
279  drawline = 8 * scale->value + y;
280  source -= 128 * y;
281  y = 0;
282  }
283  else
284  drawline = 8 * scale->value;
285 
286  dest = vid.buffer + y*vid.rowbytes + x;
287  fstep = 0x8000 / scale->value;
288 
289  for (v = 0; v < drawline; v++, dest += vid.rowbytes)
290  {
291  sv = (skip + v) / scale->value;
292  src = source + sv * draw_chars->width;
293  f = 0;
294 
295  for (i = 0; i < 8 * scale->value; i += 4)
296  {
297  if ((tbyte = src[f >> 15]) != TRANSPARENT_COLOR)
298  dest[i] = tbyte;
299  f += fstep;
300 
301  if ((tbyte = src[f >> 15]) != TRANSPARENT_COLOR)
302  dest[i + 1] = tbyte;
303  f += fstep;
304 
305  if ((tbyte = src[f >> 15]) != TRANSPARENT_COLOR)
306  dest[i + 2] = tbyte;
307  f += fstep;
308 
309  if ((tbyte = src[f >> 15]) != TRANSPARENT_COLOR)
310  dest[i + 3] = tbyte;
311  f += fstep;
312  }
313  }
314 }

◆ Draw_FadeScreen()

void Draw_FadeScreen ( void  )

Definition at line 620 of file r_draw.c.

621 {
622  int x, y;
623  byte *pbuf;
624  int t;
625 
626  for (y = 0; y < vid.height; y++)
627  {
628  pbuf = (byte *)(vid.buffer + vid.rowbytes*y);
629  t = (y & 1) << 1;
630 
631  for (x = 0; x < vid.width; x++)
632  {
633  if ((x & 3) != t)
634  pbuf[x] = 0;
635  }
636  }
637 }

◆ Draw_Fill()

void Draw_Fill ( int  x,
int  y,
int  w,
int  h,
int  c 
)

Definition at line 586 of file r_draw.c.

587 {
588  byte *dest;
589  int u, v;
590 
591  if (x + w > vid.width)
592  w = vid.width - x;
593  if (y + h > vid.height)
594  h = vid.height - y;
595  if (x < 0)
596  {
597  w += x;
598  x = 0;
599  }
600  if (y < 0)
601  {
602  h += y;
603  y = 0;
604  }
605  if (w < 0 || h < 0)
606  return;
607  dest = vid.buffer + y*vid.rowbytes + x;
608  for (v = 0; v < h; v++, dest += vid.rowbytes)
609  for (u = 0; u < w; u++)
610  dest[u] = c;
611 }

◆ Draw_GetPalette()

int Draw_GetPalette ( void  )

Definition at line 1423 of file r_main.c.

1424 {
1425  byte *out;
1426  int i;
1427  int r, g, b;
1428 
1429  // get the palette and colormap
1430  LoadPCX("pics/colormap.pcx", &vid.colormap, &thepalette, NULL, NULL);
1431  if (!vid.colormap)
1432  ri.Sys_Error(ERR_FATAL, "Couldn't load pics/colormap.pcx");
1433  vid.alphamap = vid.colormap + 64 * 256;
1434  out = (byte *)d_8to24table;
1435  for (i=0 ; i<256 ; i++, out+=4)
1436  {
1437  r = thepalette[i*3+0];
1438  g = thepalette[i*3+1];
1439  b = thepalette[i*3+2];
1440 
1441  out[0] = r;
1442  out[1] = g;
1443  out[2] = b;
1444  }
1445 }

◆ Draw_GetPicSize()

void Draw_GetPicSize ( int w,
int h,
char *  name 
)

Definition at line 321 of file r_draw.c.

322 {
323  image_t *gl;
324 
325  gl = Draw_FindPic(pic);
326  if (!gl)
327  {
328  *w = *h = -1;
329  return;
330  }
331  cvar_t *scale = ri.Cvar_Get("hudscale", "1", 0);
332 
333  *w = gl->width*scale->value;
334  *h = gl->height*scale->value;
335 }

◆ Draw_InitLocal()

void Draw_InitLocal ( void  )

Definition at line 222 of file r_draw.c.

223 {
224  draw_chars = Draw_FindPic("conchars");
225  // Knightmare- error out instead of crashing if we can't load this
226  if (!draw_chars)
227  ri.Sys_Error(ERR_FATAL, "Couldn't load pics/conchars.pcx");
228  // end Knightmare
229 }

◆ Draw_Pic()

void Draw_Pic ( int  x,
int  y,
char *  name 
)

Definition at line 438 of file r_draw.c.

439 {
440  image_t *pic;
441  byte *dest, *source;
442  int v, u;
443  int tbyte;
444  int height;
445 
446  pic = Draw_FindPic(name);
447  if (!pic)
448  {
449  ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
450  return;
451  }
452 
453  cvar_t *scale = ri.Cvar_Get("hudscale", "1", 0);
454  if (scale->value > 1.f)
455  {
456  Draw_StretchPicImplementation(x, y, pic->width*scale->value, pic->height*scale->value, pic);
457  return;
458  }
459 
460  if ((x < 0) ||
461  (x + pic->width > vid.width) ||
462  (y + pic->height > vid.height))
463  return; // ri.Sys_Error (ERR_FATAL,"Draw_Pic: bad coordinates");
464 
465  height = pic->height;
466  source = pic->pixels[0];
467  if (y < 0)
468  {
469  height += y;
470  source += pic->width*-y;
471  y = 0;
472  }
473 
474  dest = vid.buffer + y * vid.rowbytes + x;
475 
476  if (!pic->transparent)
477  {
478  for (v = 0; v < height; v++)
479  {
480  memcpy(dest, source, pic->width);
481  dest += vid.rowbytes;
482  source += pic->width;
483  }
484  }
485  else
486  {
487  if (pic->width & 7)
488  { // general
489  for (v = 0; v < height; v++)
490  {
491  for (u = 0; u < pic->width; u++)
492  if ((tbyte = source[u]) != TRANSPARENT_COLOR)
493  dest[u] = tbyte;
494 
495  dest += vid.rowbytes;
496  source += pic->width;
497  }
498  }
499  else
500  { // unwound
501  for (v = 0; v < height; v++)
502  {
503  for (u = 0; u < pic->width; u += 8)
504  {
505  if ((tbyte = source[u]) != TRANSPARENT_COLOR)
506  dest[u] = tbyte;
507  if ((tbyte = source[u + 1]) != TRANSPARENT_COLOR)
508  dest[u + 1] = tbyte;
509  if ((tbyte = source[u + 2]) != TRANSPARENT_COLOR)
510  dest[u + 2] = tbyte;
511  if ((tbyte = source[u + 3]) != TRANSPARENT_COLOR)
512  dest[u + 3] = tbyte;
513  if ((tbyte = source[u + 4]) != TRANSPARENT_COLOR)
514  dest[u + 4] = tbyte;
515  if ((tbyte = source[u + 5]) != TRANSPARENT_COLOR)
516  dest[u + 5] = tbyte;
517  if ((tbyte = source[u + 6]) != TRANSPARENT_COLOR)
518  dest[u + 6] = tbyte;
519  if ((tbyte = source[u + 7]) != TRANSPARENT_COLOR)
520  dest[u + 7] = tbyte;
521  }
522  dest += vid.rowbytes;
523  source += pic->width;
524  }
525  }
526  }
527 }

◆ Draw_StretchPic()

void Draw_StretchPic ( int  x,
int  y,
int  w,
int  h,
char *  name 
)

Definition at line 405 of file r_draw.c.

406 {
407  image_t *pic;
408 
409  pic = Draw_FindPic(name);
410  if (!pic)
411  {
412  ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
413  return;
414  }
415  Draw_StretchPicImplementation(x, y, w, h, pic);
416 }

◆ Draw_StretchRaw()

void Draw_StretchRaw ( int  x,
int  y,
int  w,
int  h,
int  cols,
int  rows,
byte data 
)

Definition at line 423 of file r_draw.c.

424 {
425  image_t pic;
426 
427  pic.pixels[0] = data;
428  pic.width = cols;
429  pic.height = rows;
430  Draw_StretchPicImplementation(x, y, w, h, &pic);
431 }

◆ Draw_TileClear()

void Draw_TileClear ( int  x,
int  y,
int  w,
int  h,
char *  name 
)

Definition at line 537 of file r_draw.c.

538 {
539  int i, j;
540  byte *psrc;
541  byte *pdest;
542  image_t *pic;
543  int x2;
544 
545  if (x < 0)
546  {
547  w += x;
548  x = 0;
549  }
550  if (y < 0)
551  {
552  h += y;
553  y = 0;
554  }
555  if (x + w > vid.width)
556  w = vid.width - x;
557  if (y + h > vid.height)
558  h = vid.height - y;
559  if (w <= 0 || h <= 0)
560  return;
561 
562  pic = Draw_FindPic(name);
563  if (!pic)
564  {
565  ri.Con_Printf(PRINT_ALL, "Can't find pic: %s\n", name);
566  return;
567  }
568  x2 = x + w;
570  for (i = 0; i < h; i++, pdest += vid.rowbytes)
571  {
572  psrc = pic->pixels[0] + pic->width * ((i + y) & 63);
573  for (j = x; j < x2; j++)
574  pdest[j] = psrc[j & 63];
575  }
576 }

◆ EmitWaterPolys()

void EmitWaterPolys ( msurface_t fa)

Definition at line 211 of file gl_warp.c.

212 {
213  glpoly_t *p, *bp;
214  float *v;
215  int i;
216  float s, t, os, ot;
217  float scroll;
218  float rdt = r_newrefdef.time;
219 
220  if (fa->texinfo->flags & SURF_FLOWING)
221  scroll = -64 * ( (r_newrefdef.time*0.5) - (int)(r_newrefdef.time*0.5) );
222  else
223  scroll = 0;
224  for (bp=fa->polys ; bp ; bp=bp->next)
225  {
226  p = bp;
227 
228  qglBegin (GL_TRIANGLE_FAN);
229  for (i=0,v=p->verts[0] ; i<p->numverts ; i++, v+=VERTEXSIZE)
230  {
231  os = v[3];
232  ot = v[4];
233 
234 #if !id386
235  s = os + r_turbsin[(int)((ot*0.125+r_newrefdef.time) * TURBSCALE) & 255];
236 #else
237  s = os + r_turbsin[Q_ftol( ((ot*0.125+rdt) * TURBSCALE) ) & 255];
238 #endif
239  s += scroll;
240  s *= (1.0/64);
241 
242 #if !id386
243  t = ot + r_turbsin[(int)((os*0.125+rdt) * TURBSCALE) & 255];
244 #else
245  t = ot + r_turbsin[Q_ftol( ((os*0.125+rdt) * TURBSCALE) ) & 255];
246 #endif
247  t *= (1.0/64);
248 
249  qglTexCoord2f (s, t);
250  qglVertex3fv (v);
251  }
252  qglEnd ();
253  }
254 }

Referenced by R_DrawAlphaSurfaces(), and R_RenderBrushPoly().

◆ GL_BeginRendering()

void GL_BeginRendering ( int x,
int y,
int width,
int height 
)

◆ GL_Bind()

void GL_Bind ( int  texnum)

◆ GL_DrawParticles()

void GL_DrawParticles ( int  n,
const particle_t  particles[],
const unsigned  colortable[768] 
)

Definition at line 415 of file gl_rmain.c.

416 {
417  const particle_t *p;
418  int i;
419  vec3_t up, right;
420  float scale;
421  byte color[4];
422 
424  qglDepthMask( GL_FALSE ); // no z buffering
425  qglEnable( GL_BLEND );
426  GL_TexEnv( GL_MODULATE );
427  qglBegin( GL_TRIANGLES );
428 
429  VectorScale (vup, 1.5, up);
430  VectorScale (vright, 1.5, right);
431 
432  for ( p = particles, i=0 ; i < num_particles ; i++,p++)
433  {
434  // hack a scale up to keep particles from disapearing
435  scale = ( p->origin[0] - r_origin[0] ) * vpn[0] +
436  ( p->origin[1] - r_origin[1] ) * vpn[1] +
437  ( p->origin[2] - r_origin[2] ) * vpn[2];
438 
439  if (scale < 20)
440  scale = 1;
441  else
442  scale = 1 + scale * 0.004;
443 
444  *(int *)color = colortable[p->color];
445  color[3] = p->alpha*255;
446 
447  qglColor4ubv( color );
448 
449  qglTexCoord2f( 0.0625, 0.0625 );
450  qglVertex3fv( p->origin );
451 
452  qglTexCoord2f( 1.0625, 0.0625 );
453  qglVertex3f( p->origin[0] + up[0]*scale,
454  p->origin[1] + up[1]*scale,
455  p->origin[2] + up[2]*scale);
456 
457  qglTexCoord2f( 0.0625, 1.0625 );
458  qglVertex3f( p->origin[0] + right[0]*scale,
459  p->origin[1] + right[1]*scale,
460  p->origin[2] + right[2]*scale);
461  }
462 
463  qglEnd ();
464  qglDisable( GL_BLEND );
465  qglColor4f( 1,1,1,1 );
466  qglDepthMask( 1 ); // back to normal Z buffering
467  GL_TexEnv( GL_REPLACE );
468 }

Referenced by R_DrawParticles().

◆ GL_EnableMultitexture()

void GL_EnableMultitexture ( qboolean  enable)

Definition at line 71 of file gl_image.c.

72 {
73  if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
74  return;
75 
76  if ( enable )
77  {
79  qglEnable( GL_TEXTURE_2D );
80  GL_TexEnv( GL_REPLACE );
81  }
82  else
83  {
85  qglDisable( GL_TEXTURE_2D );
86  GL_TexEnv( GL_REPLACE );
87  }
89  GL_TexEnv( GL_REPLACE );
90 }

Referenced by DrawTextureChains(), GL_BeginBuildingLightmaps(), GL_EndBuildingLightmaps(), R_DrawBrushModel(), R_DrawInlineBModel(), and R_DrawWorld().

◆ GL_EndRendering()

void GL_EndRendering ( void  )

◆ GL_FindImage()

image_t* GL_FindImage ( char *  name,
imagetype_t  type 
)

Definition at line 1363 of file gl_image.c.

1364 {
1365  image_t *image;
1366  int i, len;
1367  byte *pic, *palette;
1368  int width, height;
1369 
1370  if (!name)
1371  return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: NULL name");
1372  len = (int)strlen(name);
1373  if (len<5)
1374  return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad name: %s", name);
1375 
1376  // look for it
1377  for (i=0, image=gltextures ; i<numgltextures ; i++,image++)
1378  {
1379  if (!strcmp(name, image->name))
1380  {
1382  return image;
1383  }
1384  }
1385 
1386  //
1387  // load the pic from disk
1388  //
1389  pic = NULL;
1390  palette = NULL;
1391  if (!strcmp(name+len-4, ".pcx"))
1392  {
1393  LoadPCX (name, &pic, &palette, &width, &height);
1394  if (!pic)
1395  return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: can't load %s", name);
1396  image = GL_LoadPic (name, pic, width, height, type, 8);
1397  }
1398  else if (!strcmp(name+len-4, ".wal"))
1399  {
1400  image = GL_LoadWal (name);
1401  }
1402  else if (!strcmp(name+len-4, ".tga"))
1403  {
1404  LoadTGA (name, &pic, &width, &height);
1405  if (!pic)
1406  return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: can't load %s", name);
1407  image = GL_LoadPic (name, pic, width, height, type, 32);
1408  }
1409  else
1410  return NULL; // ri.Sys_Error (ERR_DROP, "GL_FindImage: bad extension on: %s", name);
1411 
1412 
1413  if (pic)
1414  free(pic);
1415  if (palette)
1416  free(palette);
1417 
1418  return image;
1419 }

Referenced by Draw_FindPic(), Draw_InitLocal(), Mod_LoadAliasModel(), Mod_LoadSpriteModel(), Mod_LoadTexinfo(), R_RegisterModel(), R_RegisterSkin(), and R_SetSky().

◆ GL_FreeUnusedImages()

void GL_FreeUnusedImages ( void  )

Definition at line 1442 of file gl_image.c.

1443 {
1444  int i;
1445  image_t *image;
1446 
1447  // never free r_notexture or particle texture
1450 
1451  for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
1452  {
1454  continue; // used this sequence
1455  if (!image->registration_sequence)
1456  continue; // free image_t slot
1457  if (image->type == it_pic)
1458  continue; // don't free pics
1459  // free it
1460  qglDeleteTextures (1, &image->texnum);
1461  memset (image, 0, sizeof(*image));
1462  }
1463 }

Referenced by R_EndRegistration().

◆ GL_ImageList_f()

void GL_ImageList_f ( void  )

Definition at line 303 of file gl_image.c.

304 {
305  int i;
306  image_t *image;
307  int texels;
308  const char *palstrings[2] =
309  {
310  "RGB",
311  "PAL"
312  };
313 
314  ri.Con_Printf (PRINT_ALL, "------------------\n");
315  texels = 0;
316 
317  for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
318  {
319  if (image->texnum <= 0)
320  continue;
321  texels += image->upload_width*image->upload_height;
322  switch (image->type)
323  {
324  case it_skin:
325  ri.Con_Printf (PRINT_ALL, "M");
326  break;
327  case it_sprite:
328  ri.Con_Printf (PRINT_ALL, "S");
329  break;
330  case it_wall:
331  ri.Con_Printf (PRINT_ALL, "W");
332  break;
333  case it_pic:
334  ri.Con_Printf (PRINT_ALL, "P");
335  break;
336  default:
337  ri.Con_Printf (PRINT_ALL, " ");
338  break;
339  }
340 
341  ri.Con_Printf (PRINT_ALL, " %3i %3i %s: %s\n",
342  image->upload_width, image->upload_height, palstrings[image->paletted], image->name);
343  }
344  ri.Con_Printf (PRINT_ALL, "Total texel count (not counting mipmaps): %i\n", texels);
345 }

Referenced by R_Register().

◆ GL_InitImages()

void GL_InitImages ( void  )

Definition at line 1509 of file gl_image.c.

1510 {
1511  int i, j;
1512  float g = vid_gamma->value;
1513 
1515 
1516  // init intensity conversions
1517  intensity = ri.Cvar_Get ("intensity", "2", 0);
1518 
1519  if ( intensity->value <= 1 )
1520  ri.Cvar_Set( "intensity", "1" );
1521 
1523 
1524  Draw_GetPalette ();
1525 
1526  if ( qglColorTableEXT )
1527  {
1528  ri.FS_LoadFile( "pics/16to8.dat", (void **)&gl_state.d_16to8table );
1529  if ( !gl_state.d_16to8table )
1530  ri.Sys_Error( ERR_FATAL, "Couldn't load pics/16to8.pcx");
1531  }
1532 
1534  {
1535  g = 1.0F;
1536  }
1537 
1538  for ( i = 0; i < 256; i++ )
1539  {
1540  if ( g == 1 )
1541  {
1542  gammatable[i] = i;
1543  }
1544  else
1545  {
1546  float inf;
1547 
1548  inf = 255 * pow ( (i+0.5)/255.5 , g ) + 0.5;
1549  if (inf < 0)
1550  inf = 0;
1551  if (inf > 255)
1552  inf = 255;
1553  gammatable[i] = inf;
1554  }
1555  }
1556 
1557  for (i=0 ; i<256 ; i++)
1558  {
1559  j = i*intensity->value;
1560  if (j > 255)
1561  j = 255;
1562  intensitytable[i] = j;
1563  }
1564 }

Referenced by R_Init().

◆ GL_LoadPic()

image_t* GL_LoadPic ( char *  name,
byte pic,
int  width,
int  height,
imagetype_t  type,
int  bits 
)

Definition at line 1247 of file gl_image.c.

1248 {
1249  image_t *image;
1250  int i;
1251 
1252  // find a free image_t
1253  for (i=0, image=gltextures ; i<numgltextures ; i++,image++)
1254  {
1255  if (!image->texnum)
1256  break;
1257  }
1258  if (i == numgltextures)
1259  {
1261  ri.Sys_Error (ERR_DROP, "MAX_GLTEXTURES");
1262  numgltextures++;
1263  }
1264  image = &gltextures[i];
1265 
1266  if (strlen(name) >= sizeof(image->name))
1267  ri.Sys_Error (ERR_DROP, "Draw_LoadPic: \"%s\" is too long", name);
1268  strcpy (image->name, name);
1270 
1271  image->width = width;
1272  image->height = height;
1273  image->type = type;
1274 
1275  if (type == it_skin && bits == 8)
1276  R_FloodFillSkin(pic, width, height);
1277 
1278  // load little pics into the scrap
1279  if (image->type == it_pic && bits == 8
1280  && image->width < 64 && image->height < 64)
1281  {
1282  int x, y;
1283  int i, j, k;
1284  int texnum;
1285 
1286  texnum = Scrap_AllocBlock (image->width, image->height, &x, &y);
1287  if (texnum == -1)
1288  goto nonscrap;
1289  scrap_dirty = true;
1290 
1291  // copy the texels into the scrap block
1292  k = 0;
1293  for (i=0 ; i<image->height ; i++)
1294  for (j=0 ; j<image->width ; j++, k++)
1295  scrap_texels[texnum][(y+i)*BLOCK_WIDTH + x + j] = pic[k];
1296  image->texnum = TEXNUM_SCRAPS + texnum;
1297  image->scrap = true;
1298  image->has_alpha = true;
1299  image->sl = (x+0.01)/(float)BLOCK_WIDTH;
1300  image->sh = (x+image->width-0.01)/(float)BLOCK_WIDTH;
1301  image->tl = (y+0.01)/(float)BLOCK_WIDTH;
1302  image->th = (y+image->height-0.01)/(float)BLOCK_WIDTH;
1303  }
1304  else
1305  {
1306 nonscrap:
1307  image->scrap = false;
1308  image->texnum = TEXNUM_IMAGES + (image - gltextures);
1309  GL_Bind(image->texnum);
1310  if (bits == 8)
1311  image->has_alpha = GL_Upload8 (pic, width, height, (image->type != it_pic && image->type != it_sky), image->type == it_sky );
1312  else
1313  image->has_alpha = GL_Upload32 ((unsigned *)pic, width, height, (image->type != it_pic && image->type != it_sky) );
1314  image->upload_width = upload_width; // after power of 2 and scales
1315  image->upload_height = upload_height;
1316  image->paletted = uploaded_paletted;
1317  image->sl = 0;
1318  image->sh = 1;
1319  image->tl = 0;
1320  image->th = 1;
1321  }
1322 
1323  return image;
1324 }

Referenced by GL_FindImage(), and GL_LoadWal().

◆ GL_MBind()

void GL_MBind ( GLenum  target,
int  texnum 
)

Definition at line 149 of file gl_image.c.

150 {
151  GL_SelectTexture( target );
152  if ( target == gl_texture0 )
153  {
154  if ( gl_state.currenttextures[0] == texnum )
155  return;
156  }
157  else
158  {
159  if ( gl_state.currenttextures[1] == texnum )
160  return;
161  }
162  GL_Bind( texnum );
163 }

Referenced by GL_RenderLightmappedPoly().

◆ GL_ResampleTexture()

void GL_ResampleTexture ( unsigned *  in,
int  inwidth,
int  inheight,
unsigned *  out,
int  outwidth,
int  outheight 
)

Definition at line 827 of file gl_image.c.

828 {
829  int i, j;
830  unsigned *inrow, *inrow2;
831  unsigned frac, fracstep;
832  unsigned p1[1024], p2[1024];
833  byte *pix1, *pix2, *pix3, *pix4;
834 
835  fracstep = inwidth*0x10000/outwidth;
836 
837  frac = fracstep>>2;
838  for (i=0 ; i<outwidth ; i++)
839  {
840  p1[i] = 4*(frac>>16);
841  frac += fracstep;
842  }
843  frac = 3*(fracstep>>2);
844  for (i=0 ; i<outwidth ; i++)
845  {
846  p2[i] = 4*(frac>>16);
847  frac += fracstep;
848  }
849 
850  for (i=0 ; i<outheight ; i++, out += outwidth)
851  {
852  inrow = in + inwidth*(int)((i+0.25)*inheight/outheight);
853  inrow2 = in + inwidth*(int)((i+0.75)*inheight/outheight);
854  frac = fracstep >> 1;
855  for (j=0 ; j<outwidth ; j++)
856  {
857  pix1 = (byte *)inrow + p1[j];
858  pix2 = (byte *)inrow + p2[j];
859  pix3 = (byte *)inrow2 + p1[j];
860  pix4 = (byte *)inrow2 + p2[j];
861  ((byte *)(out+j))[0] = (pix1[0] + pix2[0] + pix3[0] + pix4[0])>>2;
862  ((byte *)(out+j))[1] = (pix1[1] + pix2[1] + pix3[1] + pix4[1])>>2;
863  ((byte *)(out+j))[2] = (pix1[2] + pix2[2] + pix3[2] + pix4[2])>>2;
864  ((byte *)(out+j))[3] = (pix1[3] + pix2[3] + pix3[3] + pix4[3])>>2;
865  }
866  }
867 }

Referenced by GL_Upload32().

◆ GL_ScreenShot_f()

void GL_ScreenShot_f ( void  )

Definition at line 100 of file gl_rmisc.c.

101 {
102  byte *buffer;
103  char picname[80];
104  char checkname[MAX_OSPATH];
105  int i, c, temp;
106  FILE *f;
107 
108  // create the scrnshots directory if it doesn't exist
109  Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot", ri.FS_Gamedir());
110  Sys_Mkdir (checkname);
111 
112 //
113 // find a file name to save it to
114 //
115  strcpy(picname,"quake00.tga");
116 
117  for (i=0 ; i<=99 ; i++)
118  {
119  picname[5] = i/10 + '0';
120  picname[6] = i%10 + '0';
121  Com_sprintf (checkname, sizeof(checkname), "%s/scrnshot/%s", ri.FS_Gamedir(), picname);
122  f = fopen (checkname, "rb");
123  if (!f)
124  break; // file doesn't exist
125  fclose (f);
126  }
127  if (i==100)
128  {
129  ri.Con_Printf (PRINT_ALL, "SCR_ScreenShot_f: Couldn't create a file\n");
130  return;
131  }
132 
133 
134  buffer = malloc(vid.width*vid.height*3 + 18);
135  memset (buffer, 0, 18);
136  buffer[2] = 2; // uncompressed type
137  buffer[12] = vid.width&255;
138  buffer[13] = vid.width>>8;
139  buffer[14] = vid.height&255;
140  buffer[15] = vid.height>>8;
141  buffer[16] = 24; // pixel size
142 
143  qglReadPixels (0, 0, vid.width, vid.height, GL_RGB, GL_UNSIGNED_BYTE, buffer+18 );
144 
145  // swap rgb to bgr
146  c = 18+vid.width*vid.height*3;
147  for (i=18 ; i<c ; i+=3)
148  {
149  temp = buffer[i];
150  buffer[i] = buffer[i+2];
151  buffer[i+2] = temp;
152  }
153 
154  f = fopen (checkname, "wb");
155  fwrite (buffer, 1, c, f);
156  fclose (f);
157 
158  free (buffer);
159  ri.Con_Printf (PRINT_ALL, "Wrote %s\n", picname);
160 }

Referenced by R_Register().

◆ GL_SelectTexture()

void GL_SelectTexture ( GLenum  )

Definition at line 92 of file gl_image.c.

93 {
94  int tmu;
95 
96  if ( !qglSelectTextureSGIS && !qglActiveTextureARB )
97  return;
98 
99  if ( texture == gl_texture0 )
100  {
101  tmu = 0;
102  }
103  else
104  {
105  tmu = 1;
106  }
107 
108  if ( tmu == gl_state.currenttmu )
109  {
110  return;
111  }
112 
113  gl_state.currenttmu = tmu;
114 
115  if ( qglSelectTextureSGIS )
116  {
117  qglSelectTextureSGIS( texture );
118  }
119  else if ( qglActiveTextureARB )
120  {
121  qglActiveTextureARB( texture );
122  qglClientActiveTextureARB( texture );
123  }
124 }

Referenced by GL_BeginBuildingLightmaps(), GL_EnableMultitexture(), GL_MBind(), R_DrawBrushModel(), and R_DrawWorld().

◆ GL_SetDefaultState()

void GL_SetDefaultState ( void  )

Definition at line 176 of file gl_rmisc.c.

177 {
178  qglClearColor (1,0, 0.5 , 0.5);
179  qglCullFace(GL_FRONT);
180  qglEnable(GL_TEXTURE_2D);
181 
182  qglEnable(GL_ALPHA_TEST);
183  qglAlphaFunc(GL_GREATER, 0.666);
184 
185  qglDisable (GL_DEPTH_TEST);
186  qglDisable (GL_CULL_FACE);
187  qglDisable (GL_BLEND);
188 
189  qglColor4f (1,1,1,1);
190 
191  qglPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
192  qglShadeModel (GL_FLAT);
193 
197 
198  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
199  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
200 
201  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
202  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT);
203 
204  qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
205 
206  GL_TexEnv( GL_REPLACE );
207 
208  if ( qglPointParameterfEXT )
209  {
210  float attenuations[3];
211 
212  attenuations[0] = gl_particle_att_a->value;
213  attenuations[1] = gl_particle_att_b->value;
214  attenuations[2] = gl_particle_att_c->value;
215 
216  qglEnable( GL_POINT_SMOOTH );
217  qglPointParameterfEXT( GL_POINT_SIZE_MIN_EXT, gl_particle_min_size->value );
218  qglPointParameterfEXT( GL_POINT_SIZE_MAX_EXT, gl_particle_max_size->value );
219  qglPointParameterfvEXT( GL_DISTANCE_ATTENUATION_EXT, attenuations );
220  }
221 
222  if ( qglColorTableEXT && gl_ext_palettedtexture->value )
223  {
224  qglEnable( GL_SHARED_TEXTURE_PALETTE_EXT );
225 
227  }
228 
230 }

Referenced by R_Init().

◆ GL_SetTexturePalette()

void GL_SetTexturePalette ( unsigned  palette[256])

Definition at line 48 of file gl_image.c.

49 {
50  int i;
51  unsigned char temptable[768];
52 
53  if ( qglColorTableEXT && gl_ext_palettedtexture->value )
54  {
55  for ( i = 0; i < 256; i++ )
56  {
57  temptable[i*3+0] = ( palette[i] >> 0 ) & 0xff;
58  temptable[i*3+1] = ( palette[i] >> 8 ) & 0xff;
59  temptable[i*3+2] = ( palette[i] >> 16 ) & 0xff;
60  }
61 
62  qglColorTableEXT( GL_SHARED_TEXTURE_PALETTE_EXT,
63  GL_RGB,
64  256,
65  GL_RGB,
66  GL_UNSIGNED_BYTE,
67  temptable );
68  }
69 }

Referenced by GL_SetDefaultState(), and R_SetPalette().

◆ GL_ShutdownImages()

void GL_ShutdownImages ( void  )

Definition at line 1571 of file gl_image.c.

1572 {
1573  int i;
1574  image_t *image;
1575 
1576  for (i=0, image=gltextures ; i<numgltextures ; i++, image++)
1577  {
1578  if (!image->registration_sequence)
1579  continue; // free image_t slot
1580  // free it
1581  qglDeleteTextures (1, &image->texnum);
1582  memset (image, 0, sizeof(*image));
1583  }
1584 }

Referenced by R_Shutdown().

◆ GL_SubdivideSurface()

void GL_SubdivideSurface ( msurface_t fa)

Definition at line 164 of file gl_warp.c.

165 {
166  vec3_t verts[64];
167  int numverts;
168  int i;
169  int lindex;
170  float *vec;
171 
172  warpface = fa;
173 
174  //
175  // convert edges back to a normal polygon
176  //
177  numverts = 0;
178  for (i=0 ; i<fa->numedges ; i++)
179  {
180  lindex = loadmodel->surfedges[fa->firstedge + i];
181 
182  if (lindex > 0)
183  vec = loadmodel->vertexes[loadmodel->edges[lindex].v[0]].position;
184  else
185  vec = loadmodel->vertexes[loadmodel->edges[-lindex].v[1]].position;
186  VectorCopy (vec, verts[numverts]);
187  numverts++;
188  }
189 
190  SubdividePolygon (numverts, verts[0]);
191 }

Referenced by Mod_LoadFaces().

◆ GL_TexEnv()

void GL_TexEnv ( GLenum  value)

Definition at line 126 of file gl_image.c.

127 {
128  static int lastmodes[2] = { -1, -1 };
129 
130  if ( mode != lastmodes[gl_state.currenttmu] )
131  {
132  qglTexEnvf( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, mode );
133  lastmodes[gl_state.currenttmu] = mode;
134  }
135 }

Referenced by DrawTextureChains(), GL_DrawParticles(), GL_EnableMultitexture(), GL_SetDefaultState(), R_DrawAliasModel(), R_DrawAlphaSurfaces(), R_DrawBrushModel(), R_DrawInlineBModel(), R_DrawSkyBox(), R_DrawSpriteModel(), R_DrawWorld(), and R_RenderBrushPoly().

◆ GL_TextureAlphaMode()

void GL_TextureAlphaMode ( char *  string)

Definition at line 255 of file gl_image.c.

256 {
257  int i;
258 
259  for (i=0 ; i< NUM_GL_ALPHA_MODES ; i++)
260  {
261  if ( !Q_stricmp( gl_alpha_modes[i].name, string ) )
262  break;
263  }
264 
265  if (i == NUM_GL_ALPHA_MODES)
266  {
267  ri.Con_Printf (PRINT_ALL, "bad alpha texture mode name\n");
268  return;
269  }
270 
272 }

Referenced by GL_SetDefaultState(), and R_BeginFrame().

◆ GL_TextureMode()

void GL_TextureMode ( char *  string)

Definition at line 218 of file gl_image.c.

219 {
220  int i;
221  image_t *glt;
222 
223  for (i=0 ; i< NUM_GL_MODES ; i++)
224  {
225  if ( !Q_stricmp( modes[i].name, string ) )
226  break;
227  }
228 
229  if (i == NUM_GL_MODES)
230  {
231  ri.Con_Printf (PRINT_ALL, "bad filter name\n");
232  return;
233  }
234 
237 
238  // change all the existing mipmap texture objects
239  for (i=0, glt=gltextures ; i<numgltextures ; i++, glt++)
240  {
241  if (glt->type != it_pic && glt->type != it_sky )
242  {
243  GL_Bind (glt->texnum);
244  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, gl_filter_min);
245  qglTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, gl_filter_max);
246  }
247  }
248 }

Referenced by GL_SetDefaultState(), and R_BeginFrame().

◆ GL_TextureSolidMode()

void GL_TextureSolidMode ( char *  string)

Definition at line 279 of file gl_image.c.

280 {
281  int i;
282 
283  for (i=0 ; i< NUM_GL_SOLID_MODES ; i++)
284  {
285  if ( !Q_stricmp( gl_solid_modes[i].name, string ) )
286  break;
287  }
288 
289  if (i == NUM_GL_SOLID_MODES)
290  {
291  ri.Con_Printf (PRINT_ALL, "bad solid texture mode name\n");
292  return;
293  }
294 
296 }

Referenced by GL_SetDefaultState(), and R_BeginFrame().

◆ GL_UpdateSwapInterval()

void GL_UpdateSwapInterval ( void  )

Definition at line 232 of file gl_rmisc.c.

233 {
234  if ( gl_swapinterval->modified )
235  {
236  gl_swapinterval->modified = false;
237 
238  if ( !gl_state.stereo_enabled )
239  {
240 #ifdef _WIN32
241  if ( qwglSwapIntervalEXT )
242  qwglSwapIntervalEXT( gl_swapinterval->value );
243 #endif
244  }
245  }
246 }

Referenced by GL_SetDefaultState(), and R_BeginFrame().

◆ GLimp_AppActivate()

void GLimp_AppActivate ( qboolean  active)

Definition at line 578 of file glw_imp.c.

579 {
580  if ( active )
581  {
582  SetForegroundWindow( glw_state.hWnd );
583  ShowWindow( glw_state.hWnd, SW_RESTORE );
584  }
585  else
586  {
587  if ( vid_fullscreen->value )
588  ShowWindow( glw_state.hWnd, SW_MINIMIZE );
589  }
590 }

Referenced by GetRefAPI().

◆ GLimp_BeginFrame()

void GLimp_BeginFrame ( float  camera_separation)

Definition at line 528 of file glw_imp.c.

529 {
530  if ( gl_bitdepth->modified )
531  {
533  {
534  ri.Cvar_SetValue( "gl_bitdepth", 0 );
535  ri.Con_Printf( PRINT_ALL, "gl_bitdepth requires Win95 OSR2.x or WinNT 4.x\n" );
536  }
537  gl_bitdepth->modified = false;
538  }
539 
540  if ( camera_separation < 0 && gl_state.stereo_enabled )
541  {
542  qglDrawBuffer( GL_BACK_LEFT );
543  }
544  else if ( camera_separation > 0 && gl_state.stereo_enabled )
545  {
546  qglDrawBuffer( GL_BACK_RIGHT );
547  }
548  else
549  {
550  qglDrawBuffer( GL_BACK );
551  }
552 }

Referenced by R_BeginFrame().

◆ GLimp_EnableLogging()

void GLimp_EnableLogging ( qboolean  enable)

Definition at line 3427 of file qgl_win.c.

3428 {
3429  if ( enable )
3430  {
3431  if ( !glw_state.log_fp )
3432  {
3433  struct tm *newtime;
3434  time_t aclock;
3435  char buffer[1024];
3436 
3437  time( &aclock );
3438  newtime = localtime( &aclock );
3439 
3440  asctime( newtime );
3441 
3442  Com_sprintf( buffer, sizeof(buffer), "%s/gl.log", ri.FS_Gamedir() );
3443  glw_state.log_fp = fopen( buffer, "wt" );
3444 
3445  fprintf( glw_state.log_fp, "%s\n", asctime( newtime ) );
3446  }
3447 
3448  qglAccum = logAccum;
3449  qglAlphaFunc = logAlphaFunc;
3450  qglAreTexturesResident = logAreTexturesResident;
3451  qglArrayElement = logArrayElement;
3452  qglBegin = logBegin;
3453  qglBindTexture = logBindTexture;
3454  qglBitmap = logBitmap;
3455  qglBlendFunc = logBlendFunc;
3456  qglCallList = logCallList;
3457  qglCallLists = logCallLists;
3458  qglClear = logClear;
3459  qglClearAccum = logClearAccum;
3460  qglClearColor = logClearColor;
3461  qglClearDepth = logClearDepth;
3462  qglClearIndex = logClearIndex;
3463  qglClearStencil = logClearStencil;
3464  qglClipPlane = logClipPlane;
3465  qglColor3b = logColor3b;
3466  qglColor3bv = logColor3bv;
3467  qglColor3d = logColor3d;
3468  qglColor3dv = logColor3dv;
3469  qglColor3f = logColor3f;
3470  qglColor3fv = logColor3fv;
3471  qglColor3i = logColor3i;
3472  qglColor3iv = logColor3iv;
3473  qglColor3s = logColor3s;
3474  qglColor3sv = logColor3sv;
3475  qglColor3ub = logColor3ub;
3476  qglColor3ubv = logColor3ubv;
3477  qglColor3ui = logColor3ui;
3478  qglColor3uiv = logColor3uiv;
3479  qglColor3us = logColor3us;
3480  qglColor3usv = logColor3usv;
3481  qglColor4b = logColor4b;
3482  qglColor4bv = logColor4bv;
3483  qglColor4d = logColor4d;
3484  qglColor4dv = logColor4dv;
3485  qglColor4f = logColor4f;
3486  qglColor4fv = logColor4fv;
3487  qglColor4i = logColor4i;
3488  qglColor4iv = logColor4iv;
3489  qglColor4s = logColor4s;
3490  qglColor4sv = logColor4sv;
3491  qglColor4ub = logColor4ub;
3492  qglColor4ubv = logColor4ubv;
3493  qglColor4ui = logColor4ui;
3494  qglColor4uiv = logColor4uiv;
3495  qglColor4us = logColor4us;
3496  qglColor4usv = logColor4usv;
3497  qglColorMask = logColorMask;
3498  qglColorMaterial = logColorMaterial;
3499  qglColorPointer = logColorPointer;
3500  qglCopyPixels = logCopyPixels;
3501  qglCopyTexImage1D = logCopyTexImage1D;
3502  qglCopyTexImage2D = logCopyTexImage2D;
3503  qglCopyTexSubImage1D = logCopyTexSubImage1D;
3504  qglCopyTexSubImage2D = logCopyTexSubImage2D;
3505  qglCullFace = logCullFace;
3506  qglDeleteLists = logDeleteLists ;
3507  qglDeleteTextures = logDeleteTextures ;
3508  qglDepthFunc = logDepthFunc ;
3509  qglDepthMask = logDepthMask ;
3510  qglDepthRange = logDepthRange ;
3511  qglDisable = logDisable ;
3512  qglDisableClientState = logDisableClientState ;
3513  qglDrawArrays = logDrawArrays ;
3514  qglDrawBuffer = logDrawBuffer ;
3515  qglDrawElements = logDrawElements ;
3516  qglDrawPixels = logDrawPixels ;
3517  qglEdgeFlag = logEdgeFlag ;
3518  qglEdgeFlagPointer = logEdgeFlagPointer ;
3519  qglEdgeFlagv = logEdgeFlagv ;
3520  qglEnable = logEnable ;
3521  qglEnableClientState = logEnableClientState ;
3522  qglEnd = logEnd ;
3523  qglEndList = logEndList ;
3524  qglEvalCoord1d = logEvalCoord1d ;
3525  qglEvalCoord1dv = logEvalCoord1dv ;
3526  qglEvalCoord1f = logEvalCoord1f ;
3527  qglEvalCoord1fv = logEvalCoord1fv ;
3528  qglEvalCoord2d = logEvalCoord2d ;
3529  qglEvalCoord2dv = logEvalCoord2dv ;
3530  qglEvalCoord2f = logEvalCoord2f ;
3531  qglEvalCoord2fv = logEvalCoord2fv ;
3532  qglEvalMesh1 = logEvalMesh1 ;
3533  qglEvalMesh2 = logEvalMesh2 ;
3534  qglEvalPoint1 = logEvalPoint1 ;
3535  qglEvalPoint2 = logEvalPoint2 ;
3536  qglFeedbackBuffer = logFeedbackBuffer ;
3537  qglFinish = logFinish ;
3538  qglFlush = logFlush ;
3539  qglFogf = logFogf ;
3540  qglFogfv = logFogfv ;
3541  qglFogi = logFogi ;
3542  qglFogiv = logFogiv ;
3543  qglFrontFace = logFrontFace ;
3544  qglFrustum = logFrustum ;
3545  qglGenLists = logGenLists ;
3546  qglGenTextures = logGenTextures ;
3547  qglGetBooleanv = logGetBooleanv ;
3548  qglGetClipPlane = logGetClipPlane ;
3549  qglGetDoublev = logGetDoublev ;
3550  qglGetError = logGetError ;
3551  qglGetFloatv = logGetFloatv ;
3552  qglGetIntegerv = logGetIntegerv ;
3553  qglGetLightfv = logGetLightfv ;
3554  qglGetLightiv = logGetLightiv ;
3555  qglGetMapdv = logGetMapdv ;
3556  qglGetMapfv = logGetMapfv ;
3557  qglGetMapiv = logGetMapiv ;
3558  qglGetMaterialfv = logGetMaterialfv ;
3559  qglGetMaterialiv = logGetMaterialiv ;
3560  qglGetPixelMapfv = logGetPixelMapfv ;
3561  qglGetPixelMapuiv = logGetPixelMapuiv ;
3562  qglGetPixelMapusv = logGetPixelMapusv ;
3563  qglGetPointerv = logGetPointerv ;
3564  qglGetPolygonStipple = logGetPolygonStipple ;
3566  qglGetTexEnvfv = logGetTexEnvfv ;
3567  qglGetTexEnviv = logGetTexEnviv ;
3568  qglGetTexGendv = logGetTexGendv ;
3569  qglGetTexGenfv = logGetTexGenfv ;
3570  qglGetTexGeniv = logGetTexGeniv ;
3571  qglGetTexImage = logGetTexImage ;
3572  qglGetTexLevelParameterfv = logGetTexLevelParameterfv ;
3573  qglGetTexLevelParameteriv = logGetTexLevelParameteriv ;
3574  qglGetTexParameterfv = logGetTexParameterfv ;
3575  qglGetTexParameteriv = logGetTexParameteriv ;
3576  qglHint = logHint ;
3577  qglIndexMask = logIndexMask ;
3578  qglIndexPointer = logIndexPointer ;
3579  qglIndexd = logIndexd ;
3580  qglIndexdv = logIndexdv ;
3581  qglIndexf = logIndexf ;
3582  qglIndexfv = logIndexfv ;
3583  qglIndexi = logIndexi ;
3584  qglIndexiv = logIndexiv ;
3585  qglIndexs = logIndexs ;
3586  qglIndexsv = logIndexsv ;
3587  qglIndexub = logIndexub ;
3588  qglIndexubv = logIndexubv ;
3589  qglInitNames = logInitNames ;
3590  qglInterleavedArrays = logInterleavedArrays ;
3591  qglIsEnabled = logIsEnabled ;
3592  qglIsList = logIsList ;
3593  qglIsTexture = logIsTexture ;
3594  qglLightModelf = logLightModelf ;
3595  qglLightModelfv = logLightModelfv ;
3596  qglLightModeli = logLightModeli ;
3597  qglLightModeliv = logLightModeliv ;
3598  qglLightf = logLightf ;
3599  qglLightfv = logLightfv ;
3600  qglLighti = logLighti ;
3601  qglLightiv = logLightiv ;
3602  qglLineStipple = logLineStipple ;
3603  qglLineWidth = logLineWidth ;
3604  qglListBase = logListBase ;
3605  qglLoadIdentity = logLoadIdentity ;
3606  qglLoadMatrixd = logLoadMatrixd ;
3607  qglLoadMatrixf = logLoadMatrixf ;
3608  qglLoadName = logLoadName ;
3609  qglLogicOp = logLogicOp ;
3610  qglMap1d = logMap1d ;
3611  qglMap1f = logMap1f ;
3612  qglMap2d = logMap2d ;
3613  qglMap2f = logMap2f ;
3614  qglMapGrid1d = logMapGrid1d ;
3615  qglMapGrid1f = logMapGrid1f ;
3616  qglMapGrid2d = logMapGrid2d ;
3617  qglMapGrid2f = logMapGrid2f ;
3618  qglMaterialf = logMaterialf ;
3619  qglMaterialfv = logMaterialfv ;
3620  qglMateriali = logMateriali ;
3621  qglMaterialiv = logMaterialiv ;
3622  qglMatrixMode = logMatrixMode ;
3623  qglMultMatrixd = logMultMatrixd ;
3624  qglMultMatrixf = logMultMatrixf ;
3625  qglNewList = logNewList ;
3626  qglNormal3b = logNormal3b ;
3627  qglNormal3bv = logNormal3bv ;
3628  qglNormal3d = logNormal3d ;
3629  qglNormal3dv = logNormal3dv ;
3630  qglNormal3f = logNormal3f ;
3631  qglNormal3fv = logNormal3fv ;
3632  qglNormal3i = logNormal3i ;
3633  qglNormal3iv = logNormal3iv ;
3634  qglNormal3s = logNormal3s ;
3635  qglNormal3sv = logNormal3sv ;
3636  qglNormalPointer = logNormalPointer ;
3637  qglOrtho = logOrtho ;
3638  qglPassThrough = logPassThrough ;
3639  qglPixelMapfv = logPixelMapfv ;
3640  qglPixelMapuiv = logPixelMapuiv ;
3641  qglPixelMapusv = logPixelMapusv ;
3642  qglPixelStoref = logPixelStoref ;
3643  qglPixelStorei = logPixelStorei ;
3644  qglPixelTransferf = logPixelTransferf ;
3645  qglPixelTransferi = logPixelTransferi ;
3646  qglPixelZoom = logPixelZoom ;
3647  qglPointSize = logPointSize ;
3648  qglPolygonMode = logPolygonMode ;
3649  qglPolygonOffset = logPolygonOffset ;
3650  qglPolygonStipple = logPolygonStipple ;
3651  qglPopAttrib = logPopAttrib ;
3652  qglPopClientAttrib = logPopClientAttrib ;
3653  qglPopMatrix = logPopMatrix ;
3654  qglPopName = logPopName ;
3655  qglPrioritizeTextures = logPrioritizeTextures ;
3656  qglPushAttrib = logPushAttrib ;
3657  qglPushClientAttrib = logPushClientAttrib ;
3658  qglPushMatrix = logPushMatrix ;
3659  qglPushName = logPushName ;
3660  qglRasterPos2d = logRasterPos2d ;
3661  qglRasterPos2dv = logRasterPos2dv ;
3662  qglRasterPos2f = logRasterPos2f ;
3663  qglRasterPos2fv = logRasterPos2fv ;
3664  qglRasterPos2i = logRasterPos2i ;
3665  qglRasterPos2iv = logRasterPos2iv ;
3666  qglRasterPos2s = logRasterPos2s ;
3667  qglRasterPos2sv = logRasterPos2sv ;
3668  qglRasterPos3d = logRasterPos3d ;
3669  qglRasterPos3dv = logRasterPos3dv ;
3670  qglRasterPos3f = logRasterPos3f ;
3671  qglRasterPos3fv = logRasterPos3fv ;
3672  qglRasterPos3i = logRasterPos3i ;
3673  qglRasterPos3iv = logRasterPos3iv ;
3674  qglRasterPos3s = logRasterPos3s ;
3675  qglRasterPos3sv = logRasterPos3sv ;
3676  qglRasterPos4d = logRasterPos4d ;
3677  qglRasterPos4dv = logRasterPos4dv ;
3678  qglRasterPos4f = logRasterPos4f ;
3679  qglRasterPos4fv = logRasterPos4fv ;
3680  qglRasterPos4i = logRasterPos4i ;
3681  qglRasterPos4iv = logRasterPos4iv ;
3682  qglRasterPos4s = logRasterPos4s ;
3683  qglRasterPos4sv = logRasterPos4sv ;
3684  qglReadBuffer = logReadBuffer ;
3685  qglReadPixels = logReadPixels ;
3686  qglRectd = logRectd ;
3687  qglRectdv = logRectdv ;
3688  qglRectf = logRectf ;
3689  qglRectfv = logRectfv ;
3690  qglRecti = logRecti ;
3691  qglRectiv = logRectiv ;
3692  qglRects = logRects ;
3693  qglRectsv = logRectsv ;
3694  qglRenderMode = logRenderMode ;
3695  qglRotated = logRotated ;
3696  qglRotatef = logRotatef ;
3697  qglScaled = logScaled ;
3698  qglScalef = logScalef ;
3699  qglScissor = logScissor ;
3700  qglSelectBuffer = logSelectBuffer ;
3701  qglShadeModel = logShadeModel ;
3702  qglStencilFunc = logStencilFunc ;
3703  qglStencilMask = logStencilMask ;
3704  qglStencilOp = logStencilOp ;
3705  qglTexCoord1d = logTexCoord1d ;
3706  qglTexCoord1dv = logTexCoord1dv ;
3707  qglTexCoord1f = logTexCoord1f ;
3708  qglTexCoord1fv = logTexCoord1fv ;
3709  qglTexCoord1i = logTexCoord1i ;
3710  qglTexCoord1iv = logTexCoord1iv ;
3711  qglTexCoord1s = logTexCoord1s ;
3712  qglTexCoord1sv = logTexCoord1sv ;
3713  qglTexCoord2d = logTexCoord2d ;
3714  qglTexCoord2dv = logTexCoord2dv ;
3715  qglTexCoord2f = logTexCoord2f ;
3716  qglTexCoord2fv = logTexCoord2fv ;
3717  qglTexCoord2i = logTexCoord2i ;
3718  qglTexCoord2iv = logTexCoord2iv ;
3719  qglTexCoord2s = logTexCoord2s ;
3720  qglTexCoord2sv = logTexCoord2sv ;
3721  qglTexCoord3d = logTexCoord3d ;
3722  qglTexCoord3dv = logTexCoord3dv ;
3723  qglTexCoord3f = logTexCoord3f ;
3724  qglTexCoord3fv = logTexCoord3fv ;
3725  qglTexCoord3i = logTexCoord3i ;
3726  qglTexCoord3iv = logTexCoord3iv ;
3727  qglTexCoord3s = logTexCoord3s ;
3728  qglTexCoord3sv = logTexCoord3sv ;
3729  qglTexCoord4d = logTexCoord4d ;
3730  qglTexCoord4dv = logTexCoord4dv ;
3731  qglTexCoord4f = logTexCoord4f ;
3732  qglTexCoord4fv = logTexCoord4fv ;
3733  qglTexCoord4i = logTexCoord4i ;
3734  qglTexCoord4iv = logTexCoord4iv ;
3735  qglTexCoord4s = logTexCoord4s ;
3736  qglTexCoord4sv = logTexCoord4sv ;
3737  qglTexCoordPointer = logTexCoordPointer ;
3738  qglTexEnvf = logTexEnvf ;
3739  qglTexEnvfv = logTexEnvfv ;
3740  qglTexEnvi = logTexEnvi ;
3741  qglTexEnviv = logTexEnviv ;
3742  qglTexGend = logTexGend ;
3743  qglTexGendv = logTexGendv ;
3744  qglTexGenf = logTexGenf ;
3745  qglTexGenfv = logTexGenfv ;
3746  qglTexGeni = logTexGeni ;
3747  qglTexGeniv = logTexGeniv ;
3748  qglTexImage1D = logTexImage1D ;
3749  qglTexImage2D = logTexImage2D ;
3750  qglTexParameterf = logTexParameterf ;
3751  qglTexParameterfv = logTexParameterfv ;
3752  qglTexParameteri = logTexParameteri ;
3753  qglTexParameteriv = logTexParameteriv ;
3754  qglTexSubImage1D = logTexSubImage1D ;
3755  qglTexSubImage2D = logTexSubImage2D ;
3756  qglTranslated = logTranslated ;
3757  qglTranslatef = logTranslatef ;
3758  qglVertex2d = logVertex2d ;
3759  qglVertex2dv = logVertex2dv ;
3760  qglVertex2f = logVertex2f ;
3761  qglVertex2fv = logVertex2fv ;
3762  qglVertex2i = logVertex2i ;
3763  qglVertex2iv = logVertex2iv ;
3764  qglVertex2s = logVertex2s ;
3765  qglVertex2sv = logVertex2sv ;
3766  qglVertex3d = logVertex3d ;
3767  qglVertex3dv = logVertex3dv ;
3768  qglVertex3f = logVertex3f ;
3769  qglVertex3fv = logVertex3fv ;
3770  qglVertex3i = logVertex3i ;
3771  qglVertex3iv = logVertex3iv ;
3772  qglVertex3s = logVertex3s ;
3773  qglVertex3sv = logVertex3sv ;
3774  qglVertex4d = logVertex4d ;
3775  qglVertex4dv = logVertex4dv ;
3776  qglVertex4f = logVertex4f ;
3777  qglVertex4fv = logVertex4fv ;
3778  qglVertex4i = logVertex4i ;
3779  qglVertex4iv = logVertex4iv ;
3780  qglVertex4s = logVertex4s ;
3781  qglVertex4sv = logVertex4sv ;
3782  qglVertexPointer = logVertexPointer ;
3783  qglViewport = logViewport ;
3784  }
3785  else
3786  {
3787  qglAccum = dllAccum;
3788  qglAlphaFunc = dllAlphaFunc;
3789  qglAreTexturesResident = dllAreTexturesResident;
3790  qglArrayElement = dllArrayElement;
3791  qglBegin = dllBegin;
3792  qglBindTexture = dllBindTexture;
3793  qglBitmap = dllBitmap;
3794  qglBlendFunc = dllBlendFunc;
3795  qglCallList = dllCallList;
3796  qglCallLists = dllCallLists;
3797  qglClear = dllClear;
3798  qglClearAccum = dllClearAccum;
3799  qglClearColor = dllClearColor;
3800  qglClearDepth = dllClearDepth;
3801  qglClearIndex = dllClearIndex;
3802  qglClearStencil = dllClearStencil;
3803  qglClipPlane = dllClipPlane;
3804  qglColor3b = dllColor3b;
3805  qglColor3bv = dllColor3bv;
3806  qglColor3d = dllColor3d;
3807  qglColor3dv = dllColor3dv;
3808  qglColor3f = dllColor3f;
3809  qglColor3fv = dllColor3fv;
3810  qglColor3i = dllColor3i;
3811  qglColor3iv = dllColor3iv;
3812  qglColor3s = dllColor3s;
3813  qglColor3sv = dllColor3sv;
3814  qglColor3ub = dllColor3ub;
3815  qglColor3ubv = dllColor3ubv;
3816  qglColor3ui = dllColor3ui;
3817  qglColor3uiv = dllColor3uiv;
3818  qglColor3us = dllColor3us;
3819  qglColor3usv = dllColor3usv;
3820  qglColor4b = dllColor4b;
3821  qglColor4bv = dllColor4bv;
3822  qglColor4d = dllColor4d;
3823  qglColor4dv = dllColor4dv;
3824  qglColor4f = dllColor4f;
3825  qglColor4fv = dllColor4fv;
3826  qglColor4i = dllColor4i;
3827  qglColor4iv = dllColor4iv;
3828  qglColor4s = dllColor4s;
3829  qglColor4sv = dllColor4sv;
3830  qglColor4ub = dllColor4ub;
3831  qglColor4ubv = dllColor4ubv;
3832  qglColor4ui = dllColor4ui;
3833  qglColor4uiv = dllColor4uiv;
3834  qglColor4us = dllColor4us;
3835  qglColor4usv = dllColor4usv;
3836  qglColorMask = dllColorMask;
3837  qglColorMaterial = dllColorMaterial;
3838  qglColorPointer = dllColorPointer;
3839  qglCopyPixels = dllCopyPixels;
3840  qglCopyTexImage1D = dllCopyTexImage1D;
3841  qglCopyTexImage2D = dllCopyTexImage2D;
3842  qglCopyTexSubImage1D = dllCopyTexSubImage1D;
3843  qglCopyTexSubImage2D = dllCopyTexSubImage2D;
3844  qglCullFace = dllCullFace;
3845  qglDeleteLists = dllDeleteLists ;
3846  qglDeleteTextures = dllDeleteTextures ;
3847  qglDepthFunc = dllDepthFunc ;
3848  qglDepthMask = dllDepthMask ;
3849  qglDepthRange = dllDepthRange ;
3850  qglDisable = dllDisable ;
3851  qglDisableClientState = dllDisableClientState ;
3852  qglDrawArrays = dllDrawArrays ;
3853  qglDrawBuffer = dllDrawBuffer ;
3854  qglDrawElements = dllDrawElements ;
3855  qglDrawPixels = dllDrawPixels ;
3856  qglEdgeFlag = dllEdgeFlag ;
3857  qglEdgeFlagPointer = dllEdgeFlagPointer ;
3858  qglEdgeFlagv = dllEdgeFlagv ;
3859  qglEnable = dllEnable ;
3860  qglEnableClientState = dllEnableClientState ;
3861  qglEnd = dllEnd ;
3862  qglEndList = dllEndList ;
3863  qglEvalCoord1d = dllEvalCoord1d ;
3864  qglEvalCoord1dv = dllEvalCoord1dv ;
3865  qglEvalCoord1f = dllEvalCoord1f ;
3866  qglEvalCoord1fv = dllEvalCoord1fv ;
3867  qglEvalCoord2d = dllEvalCoord2d ;
3868  qglEvalCoord2dv = dllEvalCoord2dv ;
3869  qglEvalCoord2f = dllEvalCoord2f ;
3870  qglEvalCoord2fv = dllEvalCoord2fv ;
3871  qglEvalMesh1 = dllEvalMesh1 ;
3872  qglEvalMesh2 = dllEvalMesh2 ;
3873  qglEvalPoint1 = dllEvalPoint1 ;
3874  qglEvalPoint2 = dllEvalPoint2 ;
3875  qglFeedbackBuffer = dllFeedbackBuffer ;
3876  qglFinish = dllFinish ;
3877  qglFlush = dllFlush ;
3878  qglFogf = dllFogf ;
3879  qglFogfv = dllFogfv ;
3880  qglFogi = dllFogi ;
3881  qglFogiv = dllFogiv ;
3882  qglFrontFace = dllFrontFace ;
3883  qglFrustum = dllFrustum ;
3884  qglGenLists = dllGenLists ;
3885  qglGenTextures = dllGenTextures ;
3886  qglGetBooleanv = dllGetBooleanv ;
3887  qglGetClipPlane = dllGetClipPlane ;
3888  qglGetDoublev = dllGetDoublev ;
3889  qglGetError = dllGetError ;
3890  qglGetFloatv = dllGetFloatv ;
3891  qglGetIntegerv = dllGetIntegerv ;
3892  qglGetLightfv = dllGetLightfv ;
3893  qglGetLightiv = dllGetLightiv ;
3894  qglGetMapdv = dllGetMapdv ;
3895  qglGetMapfv = dllGetMapfv ;
3896  qglGetMapiv = dllGetMapiv ;
3897  qglGetMaterialfv = dllGetMaterialfv ;
3898  qglGetMaterialiv = dllGetMaterialiv ;
3899  qglGetPixelMapfv = dllGetPixelMapfv ;
3900  qglGetPixelMapuiv = dllGetPixelMapuiv ;
3901  qglGetPixelMapusv = dllGetPixelMapusv ;
3902  qglGetPointerv = dllGetPointerv ;
3903  qglGetPolygonStipple = dllGetPolygonStipple ;
3905  qglGetTexEnvfv = dllGetTexEnvfv ;
3906  qglGetTexEnviv = dllGetTexEnviv ;
3907  qglGetTexGendv = dllGetTexGendv ;
3908  qglGetTexGenfv = dllGetTexGenfv ;
3909  qglGetTexGeniv = dllGetTexGeniv ;
3910  qglGetTexImage = dllGetTexImage ;
3911  qglGetTexLevelParameterfv = dllGetTexLevelParameterfv ;
3912  qglGetTexLevelParameteriv = dllGetTexLevelParameteriv ;
3913  qglGetTexParameterfv = dllGetTexParameterfv ;
3914  qglGetTexParameteriv = dllGetTexParameteriv ;
3915  qglHint = dllHint ;
3916  qglIndexMask = dllIndexMask ;
3917  qglIndexPointer = dllIndexPointer ;
3918  qglIndexd = dllIndexd ;
3919  qglIndexdv = dllIndexdv ;
3920  qglIndexf = dllIndexf ;
3921  qglIndexfv = dllIndexfv ;
3922  qglIndexi = dllIndexi ;
3923  qglIndexiv = dllIndexiv ;
3924  qglIndexs = dllIndexs ;
3925  qglIndexsv = dllIndexsv ;
3926  qglIndexub = dllIndexub ;
3927  qglIndexubv = dllIndexubv ;
3928  qglInitNames = dllInitNames ;
3929  qglInterleavedArrays = dllInterleavedArrays ;
3930  qglIsEnabled = dllIsEnabled ;
3931  qglIsList = dllIsList ;
3932  qglIsTexture = dllIsTexture ;
3933  qglLightModelf = dllLightModelf ;
3934  qglLightModelfv = dllLightModelfv ;
3935  qglLightModeli = dllLightModeli ;
3936  qglLightModeliv = dllLightModeliv ;
3937  qglLightf = dllLightf ;
3938  qglLightfv = dllLightfv ;
3939  qglLighti = dllLighti ;
3940  qglLightiv = dllLightiv ;
3941  qglLineStipple = dllLineStipple ;
3942  qglLineWidth = dllLineWidth ;
3943  qglListBase = dllListBase ;
3944  qglLoadIdentity = dllLoadIdentity ;
3945  qglLoadMatrixd = dllLoadMatrixd ;
3946  qglLoadMatrixf = dllLoadMatrixf ;
3947  qglLoadName = dllLoadName ;
3948  qglLogicOp = dllLogicOp ;
3949  qglMap1d = dllMap1d ;
3950  qglMap1f = dllMap1f ;
3951  qglMap2d = dllMap2d ;
3952  qglMap2f = dllMap2f ;
3953  qglMapGrid1d = dllMapGrid1d ;
3954  qglMapGrid1f = dllMapGrid1f ;
3955  qglMapGrid2d = dllMapGrid2d ;
3956  qglMapGrid2f = dllMapGrid2f ;
3957  qglMaterialf = dllMaterialf ;
3958  qglMaterialfv = dllMaterialfv ;
3959  qglMateriali = dllMateriali ;
3960  qglMaterialiv = dllMaterialiv ;
3961  qglMatrixMode = dllMatrixMode ;
3962  qglMultMatrixd = dllMultMatrixd ;
3963  qglMultMatrixf = dllMultMatrixf ;
3964  qglNewList = dllNewList ;
3965  qglNormal3b = dllNormal3b ;
3966  qglNormal3bv = dllNormal3bv ;
3967  qglNormal3d = dllNormal3d ;
3968  qglNormal3dv = dllNormal3dv ;
3969  qglNormal3f = dllNormal3f ;
3970  qglNormal3fv = dllNormal3fv ;
3971  qglNormal3i = dllNormal3i ;
3972  qglNormal3iv = dllNormal3iv ;
3973  qglNormal3s = dllNormal3s ;
3974  qglNormal3sv = dllNormal3sv ;
3975  qglNormalPointer = dllNormalPointer ;
3976  qglOrtho = dllOrtho ;
3977  qglPassThrough = dllPassThrough ;
3978  qglPixelMapfv = dllPixelMapfv ;
3979  qglPixelMapuiv = dllPixelMapuiv ;
3980  qglPixelMapusv = dllPixelMapusv ;
3981  qglPixelStoref = dllPixelStoref ;
3982  qglPixelStorei = dllPixelStorei ;
3983  qglPixelTransferf = dllPixelTransferf ;
3984  qglPixelTransferi = dllPixelTransferi ;
3985  qglPixelZoom = dllPixelZoom ;
3986  qglPointSize = dllPointSize ;
3987  qglPolygonMode = dllPolygonMode ;
3988  qglPolygonOffset = dllPolygonOffset ;
3989  qglPolygonStipple = dllPolygonStipple ;
3990  qglPopAttrib = dllPopAttrib ;
3991  qglPopClientAttrib = dllPopClientAttrib ;
3992  qglPopMatrix = dllPopMatrix ;
3993  qglPopName = dllPopName ;
3994  qglPrioritizeTextures = dllPrioritizeTextures ;
3995  qglPushAttrib = dllPushAttrib ;
3996  qglPushClientAttrib = dllPushClientAttrib ;
3997  qglPushMatrix = dllPushMatrix ;
3998  qglPushName = dllPushName ;
3999  qglRasterPos2d = dllRasterPos2d ;
4000  qglRasterPos2dv = dllRasterPos2dv ;
4001  qglRasterPos2f = dllRasterPos2f ;
4002  qglRasterPos2fv = dllRasterPos2fv ;
4003  qglRasterPos2i = dllRasterPos2i ;
4004  qglRasterPos2iv = dllRasterPos2iv ;
4005  qglRasterPos2s = dllRasterPos2s ;
4006  qglRasterPos2sv = dllRasterPos2sv ;
4007  qglRasterPos3d = dllRasterPos3d ;
4008  qglRasterPos3dv = dllRasterPos3dv ;
4009  qglRasterPos3f = dllRasterPos3f ;
4010  qglRasterPos3fv = dllRasterPos3fv ;
4011  qglRasterPos3i = dllRasterPos3i ;
4012  qglRasterPos3iv = dllRasterPos3iv ;
4013  qglRasterPos3s = dllRasterPos3s ;
4014  qglRasterPos3sv = dllRasterPos3sv ;
4015  qglRasterPos4d = dllRasterPos4d ;
4016  qglRasterPos4dv = dllRasterPos4dv ;
4017  qglRasterPos4f = dllRasterPos4f ;
4018  qglRasterPos4fv = dllRasterPos4fv ;
4019  qglRasterPos4i = dllRasterPos4i ;
4020  qglRasterPos4iv = dllRasterPos4iv ;
4021  qglRasterPos4s = dllRasterPos4s ;
4022  qglRasterPos4sv = dllRasterPos4sv ;
4023  qglReadBuffer = dllReadBuffer ;
4024  qglReadPixels = dllReadPixels ;
4025  qglRectd = dllRectd ;
4026  qglRectdv = dllRectdv ;
4027  qglRectf = dllRectf ;
4028  qglRectfv = dllRectfv ;
4029  qglRecti = dllRecti ;
4030  qglRectiv = dllRectiv ;
4031  qglRects = dllRects ;
4032  qglRectsv = dllRectsv ;
4033  qglRenderMode = dllRenderMode ;
4034  qglRotated = dllRotated ;
4035  qglRotatef = dllRotatef ;
4036  qglScaled = dllScaled ;
4037  qglScalef = dllScalef ;
4038  qglScissor = dllScissor ;
4039  qglSelectBuffer = dllSelectBuffer ;
4040  qglShadeModel = dllShadeModel ;
4041  qglStencilFunc = dllStencilFunc ;
4042  qglStencilMask = dllStencilMask ;
4043  qglStencilOp = dllStencilOp ;
4044  qglTexCoord1d = dllTexCoord1d ;
4045  qglTexCoord1dv = dllTexCoord1dv ;
4046  qglTexCoord1f = dllTexCoord1f ;
4047  qglTexCoord1fv = dllTexCoord1fv ;
4048  qglTexCoord1i = dllTexCoord1i ;
4049  qglTexCoord1iv = dllTexCoord1iv ;
4050  qglTexCoord1s = dllTexCoord1s ;
4051  qglTexCoord1sv = dllTexCoord1sv ;
4052  qglTexCoord2d = dllTexCoord2d ;
4053  qglTexCoord2dv = dllTexCoord2dv ;
4054  qglTexCoord2f = dllTexCoord2f ;
4055  qglTexCoord2fv = dllTexCoord2fv ;
4056  qglTexCoord2i = dllTexCoord2i ;
4057  qglTexCoord2iv = dllTexCoord2iv ;
4058  qglTexCoord2s = dllTexCoord2s ;
4059  qglTexCoord2sv = dllTexCoord2sv ;
4060  qglTexCoord3d = dllTexCoord3d ;
4061  qglTexCoord3dv = dllTexCoord3dv ;
4062  qglTexCoord3f = dllTexCoord3f ;
4063  qglTexCoord3fv = dllTexCoord3fv ;
4064  qglTexCoord3i = dllTexCoord3i ;
4065  qglTexCoord3iv = dllTexCoord3iv ;
4066  qglTexCoord3s = dllTexCoord3s ;
4067  qglTexCoord3sv = dllTexCoord3sv ;
4068  qglTexCoord4d = dllTexCoord4d ;
4069  qglTexCoord4dv = dllTexCoord4dv ;
4070  qglTexCoord4f = dllTexCoord4f ;
4071  qglTexCoord4fv = dllTexCoord4fv ;
4072  qglTexCoord4i = dllTexCoord4i ;
4073  qglTexCoord4iv = dllTexCoord4iv ;
4074  qglTexCoord4s = dllTexCoord4s ;
4075  qglTexCoord4sv = dllTexCoord4sv ;
4076  qglTexCoordPointer = dllTexCoordPointer ;
4077  qglTexEnvf = dllTexEnvf ;
4078  qglTexEnvfv = dllTexEnvfv ;
4079  qglTexEnvi = dllTexEnvi ;
4080  qglTexEnviv = dllTexEnviv ;
4081  qglTexGend = dllTexGend ;
4082  qglTexGendv = dllTexGendv ;
4083  qglTexGenf = dllTexGenf ;
4084  qglTexGenfv = dllTexGenfv ;
4085  qglTexGeni = dllTexGeni ;
4086  qglTexGeniv = dllTexGeniv ;
4087  qglTexImage1D = dllTexImage1D ;
4088  qglTexImage2D = dllTexImage2D ;
4089  qglTexParameterf = dllTexParameterf ;
4090  qglTexParameterfv = dllTexParameterfv ;
4091  qglTexParameteri = dllTexParameteri ;
4092  qglTexParameteriv = dllTexParameteriv ;
4093  qglTexSubImage1D = dllTexSubImage1D ;
4094  qglTexSubImage2D = dllTexSubImage2D ;
4095  qglTranslated = dllTranslated ;
4096  qglTranslatef = dllTranslatef ;
4097  qglVertex2d = dllVertex2d ;
4098  qglVertex2dv = dllVertex2dv ;
4099  qglVertex2f = dllVertex2f ;
4100  qglVertex2fv = dllVertex2fv ;
4101  qglVertex2i = dllVertex2i ;
4102  qglVertex2iv = dllVertex2iv ;
4103  qglVertex2s = dllVertex2s ;
4104  qglVertex2sv = dllVertex2sv ;
4105  qglVertex3d = dllVertex3d ;
4106  qglVertex3dv = dllVertex3dv ;
4107  qglVertex3f = dllVertex3f ;
4108  qglVertex3fv = dllVertex3fv ;
4109  qglVertex3i = dllVertex3i ;
4110  qglVertex3iv = dllVertex3iv ;
4111  qglVertex3s = dllVertex3s ;
4112  qglVertex3sv = dllVertex3sv ;
4113  qglVertex4d = dllVertex4d ;
4114  qglVertex4dv = dllVertex4dv ;
4115  qglVertex4f = dllVertex4f ;
4116  qglVertex4fv = dllVertex4fv ;
4117  qglVertex4i = dllVertex4i ;
4118  qglVertex4iv = dllVertex4iv ;
4119  qglVertex4s = dllVertex4s ;
4120  qglVertex4sv = dllVertex4sv ;
4121  qglVertexPointer = dllVertexPointer ;
4122  qglViewport = dllViewport ;
4123  }
4124 }

Referenced by R_BeginFrame().

◆ GLimp_EndFrame()

void GLimp_EndFrame ( void  )

Definition at line 561 of file glw_imp.c.

562 {
563  int err;
564 
565  err = qglGetError();
566  assert( err == GL_NO_ERROR );
567 
568  if ( stricmp( gl_drawbuffer->string, "GL_BACK" ) == 0 )
569  {
570  if ( !qwglSwapBuffers( glw_state.hDC ) )
571  ri.Sys_Error( ERR_FATAL, "GLimp_EndFrame() - SwapBuffers() failed!\n" );
572  }
573 }

Referenced by GetRefAPI(), and GL_DrawStereoPattern().

◆ GLimp_Init()

qboolean GLimp_Init ( void hinstance,
void hWnd 
)

Definition at line 321 of file glw_imp.c.

322 {
323 #define OSR2_BUILD_NUMBER 1111
324 
325  OSVERSIONINFO vinfo;
326 
327  vinfo.dwOSVersionInfoSize = sizeof(vinfo);
328 
330 
331  if ( GetVersionEx( &vinfo) )
332  {
333  if ( vinfo.dwMajorVersion > 4 )
334  {
336  }
337  else if ( vinfo.dwMajorVersion == 4 )
338  {
339  if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_NT )
340  {
342  }
343  else if ( vinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS )
344  {
345  if ( LOWORD( vinfo.dwBuildNumber ) >= OSR2_BUILD_NUMBER )
346  {
348  }
349  }
350  }
351  }
352  else
353  {
354  ri.Con_Printf( PRINT_ALL, "GLimp_Init() - GetVersionEx failed\n" );
355  return false;
356  }
357 
358  glw_state.hInstance = ( HINSTANCE ) hinstance;
359  glw_state.wndproc = wndproc;
360 
361  return true;
362 }

Referenced by R_Init().

◆ GLimp_LogNewFrame()

void GLimp_LogNewFrame ( void  )

Definition at line 4127 of file qgl_win.c.

4128 {
4129  fprintf( glw_state.log_fp, "*** R_BeginFrame ***\n" );
4130 }

Referenced by R_BeginFrame().

◆ GLimp_SetMode()

rserr_t GLimp_SetMode ( int pwidth,
int pheight,
int  mode,
qboolean  fullscreen 
)

Definition at line 185 of file glw_imp.c.

186 {
187  int width, height;
188  const char *win_fs[] = { "W", "FS" };
189 
190  ri.Con_Printf( PRINT_ALL, "Initializing OpenGL display\n");
191 
192  ri.Con_Printf (PRINT_ALL, "...setting mode %d:", mode );
193 
194  if ( !ri.Vid_GetModeInfo( &width, &height, mode ) )
195  {
196  ri.Con_Printf( PRINT_ALL, " invalid mode\n" );
197  return rserr_invalid_mode;
198  }
199 
200  ri.Con_Printf( PRINT_ALL, " %d %d %s\n", width, height, win_fs[fullscreen] );
201 
202  // destroy the existing window
203  if (glw_state.hWnd)
204  {
205  GLimp_Shutdown ();
206  }
207 
208  // do a CDS if needed
209  if ( fullscreen )
210  {
211  ri.Con_Printf( PRINT_ALL, "...attempting fullscreen\n" );
212 
213  if ( gl_bitdepth->value != 0 )
214  {
215  ri.Con_Printf( PRINT_ALL, "...using gl_bitdepth of %d\n", ( int ) gl_bitdepth->value );
216  }
217  else
218  {
219  HDC hdc = GetDC( NULL );
220  int bitspixel = GetDeviceCaps( hdc, BITSPIXEL );
221 
222  ri.Con_Printf( PRINT_ALL, "...using desktop display depth of %d\n", bitspixel );
223 
224  ReleaseDC( 0, hdc );
225  }
226 
227  ri.Con_Printf( PRINT_ALL, "...calling CDS: " );
228  if ( VID_CreateWindow(width, height, true) )
229  {
230  *pwidth = width;
231  *pheight = height;
232 
233  gl_state.fullscreen = true;
234 
235  ri.Con_Printf( PRINT_ALL, "ok\n" );
236  return rserr_ok;
237  }
238  else
239  {
240  ri.Con_Printf( PRINT_ALL, " failed\n" );
241  ri.Con_Printf( PRINT_ALL, "...setting windowed mode\n" );
242 
243  DestroyWindow(glw_state.hWnd);
244  UnregisterClass(WINDOW_CLASS_NAME, glw_state.hInstance);
245  VID_CreateWindow(width, height, false);
246 
247  *pwidth = width;
248  *pheight = height;
249  gl_state.fullscreen = false;
251  }
252  }
253  else
254  {
255  ri.Con_Printf( PRINT_ALL, "...setting windowed mode\n" );
256 
257  *pwidth = width;
258  *pheight = height;
259  gl_state.fullscreen = false;
260  if ( !VID_CreateWindow (width, height, false) )
261  return rserr_invalid_mode;
262  }
263 
264  return rserr_ok;
265 }

Referenced by R_SetMode().

◆ GLimp_Shutdown()

void GLimp_Shutdown ( void  )

Definition at line 276 of file glw_imp.c.

277 {
278  if ( qwglMakeCurrent && !qwglMakeCurrent( NULL, NULL ) )
279  ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - wglMakeCurrent failed\n");
280  if ( glw_state.hGLRC )
281  {
282  if ( qwglDeleteContext && !qwglDeleteContext( glw_state.hGLRC ) )
283  ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - wglDeleteContext failed\n");
284  glw_state.hGLRC = NULL;
285  }
286  if (glw_state.hDC)
287  {
288  if ( !ReleaseDC( glw_state.hWnd, glw_state.hDC ) )
289  ri.Con_Printf( PRINT_ALL, "ref_gl::R_Shutdown() - ReleaseDC failed\n" );
290  glw_state.hDC = NULL;
291  }
292  if (glw_state.hWnd)
293  {
294  DestroyWindow ( glw_state.hWnd );
295  glw_state.hWnd = NULL;
296  }
297 
298  if ( glw_state.log_fp )
299  {
300  fclose( glw_state.log_fp );
301  glw_state.log_fp = 0;
302  }
303 
304  UnregisterClass (WINDOW_CLASS_NAME, glw_state.hInstance);
305 
306  if ( gl_state.fullscreen )
307  {
308  ChangeDisplaySettingsEx( glw_state.monInfo.szDevice, NULL, NULL, 0, NULL );
309  gl_state.fullscreen = false;
310  }
311 }

Referenced by GLimp_SetMode(), and R_Shutdown().

◆ LoadPCX()

void LoadPCX ( char *  filename,
byte **  pic,
byte **  palette,
int width,
int height 
)

Definition at line 87 of file r_image.c.

88 {
89  byte *raw;
90  pcx_t *pcx;
91  int x, y;
92  int len;
93  int dataByte, runLength;
94  byte *out, *pix;
95 
96  *pic = NULL;
97 
98  //
99  // load the file
100  //
101  len = ri.FS_LoadFile (filename, (void **)&raw);
102  if (!raw)
103  {
104  ri.Con_Printf (PRINT_DEVELOPER, "Bad pcx file %s\n", filename);
105  return;
106  }
107 
108  //
109  // parse the PCX file
110  //
111  pcx = (pcx_t *)raw;
112 
113  pcx->xmin = LittleShort(pcx->xmin);
114  pcx->ymin = LittleShort(pcx->ymin);
115  pcx->xmax = LittleShort(pcx->xmax);
116  pcx->ymax = LittleShort(pcx->ymax);
117  pcx->hres = LittleShort(pcx->hres);
118  pcx->vres = LittleShort(pcx->vres);
121 
122  raw = &pcx->data;
123 
124  if (pcx->manufacturer != 0x0a
125  || pcx->version != 5
126  || pcx->encoding != 1
127  || pcx->bits_per_pixel != 8
128  || pcx->xmax >= 640
129  || pcx->ymax >= 480)
130  {
131  ri.Con_Printf (PRINT_ALL, "Bad pcx file %s\n", filename);
132  return;
133  }
134 
135  out = malloc ( (pcx->ymax+1) * (pcx->xmax+1) );
136 
137  *pic = out;
138 
139  pix = out;
140 
141  if (palette)
142  {
143  *palette = malloc(768);
144  memcpy (*palette, (byte *)pcx + len - 768, 768);
145  }
146 
147  if (width)
148  *width = pcx->xmax+1;
149  if (height)
150  *height = pcx->ymax+1;
151 
152  for (y=0 ; y<=pcx->ymax ; y++, pix += pcx->xmax+1)
153  {
154  for (x=0 ; x<=pcx->xmax ; )
155  {
156  dataByte = *raw++;
157 
158  if((dataByte & 0xC0) == 0xC0)
159  {
160  runLength = dataByte & 0x3F;
161  dataByte = *raw++;
162  }
163  else
164  runLength = 1;
165 
166  while(runLength-- > 0)
167  pix[x++] = dataByte;
168  }
169 
170  }
171 
172  if ( raw - (byte *)pcx > len)
173  {
174  ri.Con_Printf (PRINT_DEVELOPER, "PCX file %s was malformed", filename);
175  free (*pic);
176  *pic = NULL;
177  }
178 
179  ri.FS_FreeFile (pcx);
180 }

◆ R_AddSkySurface()

void R_AddSkySurface ( msurface_t fa)

Definition at line 485 of file gl_warp.c.

486 {
487  int i;
488  vec3_t verts[MAX_CLIP_VERTS];
489  glpoly_t *p;
490 
491  // calculate vertex values for sky box
492  for (p=fa->polys ; p ; p=p->next)
493  {
494  for (i=0 ; i<p->numverts ; i++)
495  {
496  VectorSubtract (p->verts[i], r_origin, verts[i]);
497  }
498  ClipSkyPolygon (p->numverts, verts[0], 0);
499  }
500 }

Referenced by R_RecursiveWorldNode().

◆ R_BeginFrame()

void R_BeginFrame ( float  camera_separation)

Definition at line 1177 of file r_main.c.

1178 {
1179  extern void Draw_BuildGammaTable(void);
1180 #ifdef REDBLUE
1181  SetStereoBuffer((camera_separation <= 0.0) ? 0 : 1);
1182 #endif
1183  /*
1184  ** rebuild the gamma correction palette if necessary
1185  */
1186  if (vid_gamma->modified)
1187  {
1189  R_GammaCorrectAndSetPalette((const unsigned char *)d_8to24table);
1190 
1191  vid_gamma->modified = false;
1192  }
1193 
1195  {
1196  rserr_t err;
1197 
1198  /* a bit hackish approach to enable custom resolutions:
1199  * SWimp_SetMode needs these values set for mode -1 */
1202 
1203  /*
1204  ** if this returns rserr_invalid_fullscreen then it set the mode but not as a
1205  ** fullscreen mode, e.g. 320x200 on a system that doesn't support that res
1206  */
1208  {
1210 
1211  if (sw_mode->value == -1)
1212  {
1213  sw_state.prev_mode = 4; /* safe default for custom mode */
1214  }
1215  else
1216  {
1218  }
1219 
1220  vid_fullscreen->modified = false;
1221  sw_mode->modified = false;
1222  }
1223  else
1224  {
1225  if (err == rserr_invalid_mode)
1226  {
1227  ri.Cvar_SetValue("sw_mode", sw_state.prev_mode);
1228  ri.Con_Printf(PRINT_ALL, "ref_soft::R_BeginFrame() - could not set mode\n");
1229  }
1230  else if (err == rserr_invalid_fullscreen)
1231  {
1233  ri.Con_Printf(PRINT_ALL, "ref_soft::R_BeginFrame() - fullscreen unavailable in this mode\n");
1235  // vid_fullscreen->modified = false;
1236  // sw_mode->modified = false;
1237  }
1238  else
1239  {
1240  ri.Sys_Error(ERR_FATAL, "ref_soft::R_BeginFrame() - catastrophic mode change failure\n");
1241  }
1242  }
1243  }
1244 }

◆ R_ClearSkyBox()

void R_ClearSkyBox ( void  )

Definition at line 508 of file gl_warp.c.

509 {
510  int i;
511 
512  for (i=0 ; i<6 ; i++)
513  {
514  skymins[0][i] = skymins[1][i] = 9999;
515  skymaxs[0][i] = skymaxs[1][i] = -9999;
516  }
517 }

Referenced by R_DrawWorld().

◆ R_CullBox()

qboolean R_CullBox ( vec3_t  mins,
vec3_t  maxs 
)

Definition at line 151 of file gl_rmain.c.

152 {
153  int i;
154 
155  if (r_nocull->value)
156  return false;
157 
158  for (i=0 ; i<4 ; i++)
159  if ( BOX_ON_PLANE_SIDE(mins, maxs, &frustum[i]) == 2)
160  return true;
161  return false;
162 }

Referenced by R_DrawBrushModel(), and R_RecursiveWorldNode().

◆ R_DrawAliasModel()

void R_DrawAliasModel ( entity_t e)

Definition at line 519 of file gl_mesh.c.

520 {
521  int i;
522  dmdl_t *paliashdr;
523  float an;
524  vec3_t bbox[8];
525  image_t *skin;
526 
527  if ( !( e->flags & RF_WEAPONMODEL ) )
528  {
529  if ( R_CullAliasModel( bbox, e ) )
530  return;
531  }
532 
533  if ( e->flags & RF_WEAPONMODEL )
534  {
535  if ( r_lefthand->value == 2 )
536  return;
537  }
538 
539  paliashdr = (dmdl_t *)currentmodel->extradata;
540 
541  //
542  // get lighting information
543  //
544  // PMM - rewrote, reordered to handle new shells & mixing
545  // PMM - 3.20 code .. replaced with original way of doing it to keep mod authors happy
546  //
548  {
551  {
552  shadelight[0] = 0.56;
553  shadelight[1] = 0.59;
554  shadelight[2] = 0.45;
555  }
557  {
558  shadelight[0] = 0.9;
559  shadelight[1] = 0.7;
560  }
562  shadelight[0] = 1.0;
564  shadelight[1] = 1.0;
566  shadelight[2] = 1.0;
567  }
568 /*
569  // PMM -special case for godmode
570  if ( (currententity->flags & RF_SHELL_RED) &&
571  (currententity->flags & RF_SHELL_BLUE) &&
572  (currententity->flags & RF_SHELL_GREEN) )
573  {
574  for (i=0 ; i<3 ; i++)
575  shadelight[i] = 1.0;
576  }
577  else if ( currententity->flags & ( RF_SHELL_RED | RF_SHELL_BLUE | RF_SHELL_DOUBLE ) )
578  {
579  VectorClear (shadelight);
580 
581  if ( currententity->flags & RF_SHELL_RED )
582  {
583  shadelight[0] = 1.0;
584  if (currententity->flags & (RF_SHELL_BLUE|RF_SHELL_DOUBLE) )
585  shadelight[2] = 1.0;
586  }
587  else if ( currententity->flags & RF_SHELL_BLUE )
588  {
589  if ( currententity->flags & RF_SHELL_DOUBLE )
590  {
591  shadelight[1] = 1.0;
592  shadelight[2] = 1.0;
593  }
594  else
595  {
596  shadelight[2] = 1.0;
597  }
598  }
599  else if ( currententity->flags & RF_SHELL_DOUBLE )
600  {
601  shadelight[0] = 0.9;
602  shadelight[1] = 0.7;
603  }
604  }
605  else if ( currententity->flags & ( RF_SHELL_HALF_DAM | RF_SHELL_GREEN ) )
606  {
607  VectorClear (shadelight);
608  // PMM - new colors
609  if ( currententity->flags & RF_SHELL_HALF_DAM )
610  {
611  shadelight[0] = 0.56;
612  shadelight[1] = 0.59;
613  shadelight[2] = 0.45;
614  }
615  if ( currententity->flags & RF_SHELL_GREEN )
616  {
617  shadelight[1] = 1.0;
618  }
619  }
620  }
621  //PMM - ok, now flatten these down to range from 0 to 1.0.
622  // max_shell_val = max(shadelight[0], max(shadelight[1], shadelight[2]));
623  // if (max_shell_val > 0)
624  // {
625  // for (i=0; i<3; i++)
626  // {
627  // shadelight[i] = shadelight[i] / max_shell_val;
628  // }
629  // }
630  // pmm
631 */
632  else if ( currententity->flags & RF_FULLBRIGHT )
633  {
634  for (i=0 ; i<3 ; i++)
635  shadelight[i] = 1.0;
636  }
637  else
638  {
640 
641  // player lighting hack for communication back to server
642  // big hack!
644  {
645  // pick the greatest component, which should be the same
646  // as the mono value returned by software
647  if (shadelight[0] > shadelight[1])
648  {
649  if (shadelight[0] > shadelight[2])
650  r_lightlevel->value = 150*shadelight[0];
651  else
652  r_lightlevel->value = 150*shadelight[2];
653  }
654  else
655  {
656  if (shadelight[1] > shadelight[2])
657  r_lightlevel->value = 150*shadelight[1];
658  else
659  r_lightlevel->value = 150*shadelight[2];
660  }
661 
662  }
663 
664  if ( gl_monolightmap->string[0] != '0' )
665  {
666  float s = shadelight[0];
667 
668  if ( s < shadelight[1] )
669  s = shadelight[1];
670  if ( s < shadelight[2] )
671  s = shadelight[2];
672 
673  shadelight[0] = s;
674  shadelight[1] = s;
675  shadelight[2] = s;
676  }
677  }
678 
680  {
681  for (i=0 ; i<3 ; i++)
682  if (shadelight[i] > 0.1)
683  break;
684  if (i == 3)
685  {
686  shadelight[0] = 0.1;
687  shadelight[1] = 0.1;
688  shadelight[2] = 0.1;
689  }
690  }
691 
692  if ( currententity->flags & RF_GLOW )
693  { // bonus items will pulse with time
694  float scale;
695  float min;
696 
697  scale = 0.1 * sin(r_newrefdef.time*7);
698  for (i=0 ; i<3 ; i++)
699  {
700  min = shadelight[i] * 0.8;
701  shadelight[i] += scale;
702  if (shadelight[i] < min)
703  shadelight[i] = min;
704  }
705  }
706 
707 // =================
708 // PGM ir goggles color override
710  {
711  shadelight[0] = 1.0;
712  shadelight[1] = 0.0;
713  shadelight[2] = 0.0;
714  }
715 // PGM
716 // =================
717 
719 
720  an = currententity->angles[1]/180*M_PI;
721  shadevector[0] = cos(-an);
722  shadevector[1] = sin(-an);
723  shadevector[2] = 1;
725 
726  //
727  // locate the proper data
728  //
729 
730  c_alias_polys += paliashdr->num_tris;
731 
732  //
733  // draw all the triangles
734  //
735  if (currententity->flags & RF_DEPTHHACK) // hack the depth range to prevent view model from poking into walls
736  qglDepthRange (gldepthmin, gldepthmin + 0.3*(gldepthmax-gldepthmin));
737 
738  if ( ( currententity->flags & RF_WEAPONMODEL ) && ( r_lefthand->value == 1.0F ) )
739  {
740  extern void MYgluPerspective( GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar );
741 
742  qglMatrixMode( GL_PROJECTION );
743  qglPushMatrix();
744  qglLoadIdentity();
745  qglScalef( -1, 1, 1 );
747  qglMatrixMode( GL_MODELVIEW );
748 
749  qglCullFace( GL_BACK );
750  }
751 
752  qglPushMatrix ();
753  e->angles[PITCH] = -e->angles[PITCH]; // sigh.
754  R_RotateForEntity (e);
755  e->angles[PITCH] = -e->angles[PITCH]; // sigh.
756 
757  // select skin
758  if (currententity->skin)
759  skin = currententity->skin; // custom player skin
760  else
761  {
763  skin = currentmodel->skins[0];
764  else
765  {
767  if (!skin)
768  skin = currentmodel->skins[0];
769  }
770  }
771  if (!skin)
772  skin = r_notexture; // fallback...
773  GL_Bind(skin->texnum);
774 
775  // draw it
776 
777  qglShadeModel (GL_SMOOTH);
778 
779  GL_TexEnv( GL_MODULATE );
781  {
782  qglEnable (GL_BLEND);
783  }
784 
785 
786  if ( (currententity->frame >= paliashdr->num_frames)
787  || (currententity->frame < 0) )
788  {
789  ri.Con_Printf (PRINT_ALL, "R_DrawAliasModel %s: no such frame %d\n",
791  currententity->frame = 0;
792  currententity->oldframe = 0;
793  }
794 
795  if ( (currententity->oldframe >= paliashdr->num_frames)
796  || (currententity->oldframe < 0))
797  {
798  ri.Con_Printf (PRINT_ALL, "R_DrawAliasModel %s: no such oldframe %d\n",
800  currententity->frame = 0;
801  currententity->oldframe = 0;
802  }
803 
804  if ( !r_lerpmodels->value )
805  currententity->backlerp = 0;
807 
808  GL_TexEnv( GL_REPLACE );
809  qglShadeModel (GL_FLAT);
810 
811  qglPopMatrix ();
812 
813 #if 0
814  qglDisable( GL_CULL_FACE );
815  qglPolygonMode( GL_FRONT_AND_BACK, GL_LINE );
816  qglDisable( GL_TEXTURE_2D );
817  qglBegin( GL_TRIANGLE_STRIP );
818  for ( i = 0; i < 8; i++ )
819  {
820  qglVertex3fv( bbox[i] );
821  }
822  qglEnd();
823  qglEnable( GL_TEXTURE_2D );
824  qglPolygonMode( GL_FRONT_AND_BACK, GL_FILL );
825  qglEnable( GL_CULL_FACE );
826 #endif
827 
828  if ( ( currententity->flags & RF_WEAPONMODEL ) && ( r_lefthand->value == 1.0F ) )
829  {
830  qglMatrixMode( GL_PROJECTION );
831  qglPopMatrix();
832  qglMatrixMode( GL_MODELVIEW );
833  qglCullFace( GL_FRONT );
834  }
835 
837  {
838  qglDisable (GL_BLEND);
839  }
840 
842  qglDepthRange (gldepthmin, gldepthmax);
843 
844 #if 1
846  {
847  qglPushMatrix ();
848  R_RotateForEntity (e);
849  qglDisable (GL_TEXTURE_2D);
850  qglEnable (GL_BLEND);
851  qglColor4f (0,0,0,0.5);
852  GL_DrawAliasShadow (paliashdr, currententity->frame );
853  qglEnable (GL_TEXTURE_2D);
854  qglDisable (GL_BLEND);
855  qglPopMatrix ();
856  }
857 #endif
858  qglColor4f (1,1,1,1);
859 }

Referenced by R_DrawEntitiesOnList().

◆ R_DrawAlphaSurfaces()

void R_DrawAlphaSurfaces ( void  )

Definition at line 1342 of file r_poly.c.

1343 {
1345 
1347 
1348  modelorg[0] = -r_origin[0];
1349  modelorg[1] = -r_origin[1];
1350  modelorg[2] = -r_origin[2];
1351 
1352  while (s)
1353  {
1355 
1356  //=======
1357  //PGM
1358  // if (s->texinfo->flags & SURF_TRANS66)
1359  // R_ClipAndDrawPoly( 0.60f, ( s->texinfo->flags & SURF_WARP) != 0, true );
1360  // else
1361  // R_ClipAndDrawPoly( 0.30f, ( s->texinfo->flags & SURF_WARP) != 0, true );
1362 
1363  // PGM - pass down all the texinfo flags, not just SURF_WARP.
1364  if (s->texinfo->flags & SURF_TRANS66)
1365  R_ClipAndDrawPoly(0.60f, (s->texinfo->flags & (SURF_WARP | SURF_FLOWING)), true);
1366  else
1367  R_ClipAndDrawPoly(0.30f, (s->texinfo->flags & (SURF_WARP | SURF_FLOWING)), true);
1368 
1369  //PGM
1370  //=======
1371 
1372  s = s->nextalphasurface;
1373  }
1374 
1376 }

◆ R_DrawBeam()

void R_DrawBeam ( entity_t e)

Definition at line 1342 of file r_main.c.

1343 {
1344 #define NUM_BEAM_SEGS 6
1345 
1346  int i;
1347 
1348  vec3_t perpvec;
1349  vec3_t direction, normalized_direction;
1350  vec3_t start_points[NUM_BEAM_SEGS], end_points[NUM_BEAM_SEGS];
1351  vec3_t oldorigin, origin;
1352 
1353  oldorigin[0] = e->oldorigin[0];
1354  oldorigin[1] = e->oldorigin[1];
1355  oldorigin[2] = e->oldorigin[2];
1356 
1357  origin[0] = e->origin[0];
1358  origin[1] = e->origin[1];
1359  origin[2] = e->origin[2];
1360 
1361  normalized_direction[0] = direction[0] = oldorigin[0] - origin[0];
1362  normalized_direction[1] = direction[1] = oldorigin[1] - origin[1];
1363  normalized_direction[2] = direction[2] = oldorigin[2] - origin[2];
1364 
1365  if (VectorNormalize(normalized_direction) == 0)
1366  return;
1367 
1368  PerpendicularVector(perpvec, normalized_direction);
1369  VectorScale(perpvec, e->frame / 2, perpvec);
1370 
1371  for (i = 0; i < NUM_BEAM_SEGS; i++)
1372  {
1373  RotatePointAroundVector(start_points[i], normalized_direction, perpvec, (360.0 / NUM_BEAM_SEGS)*i);
1374  VectorAdd(start_points[i], origin, start_points[i]);
1375  VectorAdd(start_points[i], direction, end_points[i]);
1376  }
1377 
1378  for (i = 0; i < NUM_BEAM_SEGS; i++)
1379  {
1380  R_IMFlatShadedQuad(start_points[i],
1381  end_points[i],
1382  end_points[(i + 1) % NUM_BEAM_SEGS],
1383  start_points[(i + 1) % NUM_BEAM_SEGS],
1384  e->skinnum & 0xFF,
1385  e->alpha);
1386  }
1387 }

◆ R_DrawBrushModel()

void R_DrawBrushModel ( entity_t e)

Definition at line 957 of file gl_rsurf.c.

958 {
959  vec3_t mins, maxs;
960  int i;
961  qboolean rotated;
962 
963  if (currentmodel->nummodelsurfaces == 0)
964  return;
965 
966  currententity = e;
968 
969  if (e->angles[0] || e->angles[1] || e->angles[2])
970  {
971  rotated = true;
972  for (i=0 ; i<3 ; i++)
973  {
974  mins[i] = e->origin[i] - currentmodel->radius;
975  maxs[i] = e->origin[i] + currentmodel->radius;
976  }
977  }
978  else
979  {
980  rotated = false;
981  VectorAdd (e->origin, currentmodel->mins, mins);
982  VectorAdd (e->origin, currentmodel->maxs, maxs);
983  }
984 
985  if (R_CullBox (mins, maxs))
986  return;
987 
988  qglColor3f (1,1,1);
989  memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces));
990 
992  if (rotated)
993  {
994  vec3_t temp;
996 
997  VectorCopy (modelorg, temp);
999  modelorg[0] = DotProduct (temp, forward);
1000  modelorg[1] = -DotProduct (temp, right);
1001  modelorg[2] = DotProduct (temp, up);
1002  }
1003 
1004  qglPushMatrix ();
1005 e->angles[0] = -e->angles[0]; // stupid quake bug
1006 e->angles[2] = -e->angles[2]; // stupid quake bug
1007  R_RotateForEntity (e);
1008 e->angles[0] = -e->angles[0]; // stupid quake bug
1009 e->angles[2] = -e->angles[2]; // stupid quake bug
1010 
1011  GL_EnableMultitexture( true );
1013  GL_TexEnv( GL_REPLACE );
1015  GL_TexEnv( GL_MODULATE );
1016 
1017  R_DrawInlineBModel ();
1018  GL_EnableMultitexture( false );
1019 
1020  qglPopMatrix ();
1021 }

Referenced by R_DrawEntitiesOnList().

◆ R_DrawSkyBox()

void R_DrawSkyBox ( void  )

Definition at line 562 of file gl_warp.c.

563 {
564  int i;
565 
566 #if 0
567 qglEnable (GL_BLEND);
568 GL_TexEnv( GL_MODULATE );
569 qglColor4f (1,1,1,0.5);
570 qglDisable (GL_DEPTH_TEST);
571 #endif
572  if (skyrotate)
573  { // check for no sky at all
574  for (i=0 ; i<6 ; i++)
575  if (skymins[0][i] < skymaxs[0][i]
576  && skymins[1][i] < skymaxs[1][i])
577  break;
578  if (i == 6)
579  return; // nothing visible
580  }
581 
582 qglPushMatrix ();
583 qglTranslatef (r_origin[0], r_origin[1], r_origin[2]);
584 qglRotatef (r_newrefdef.time * skyrotate, skyaxis[0], skyaxis[1], skyaxis[2]);
585 
586  for (i=0 ; i<6 ; i++)
587  {
588  if (skyrotate)
589  { // hack, forces full sky to draw when rotating
590  skymins[0][i] = -1;
591  skymins[1][i] = -1;
592  skymaxs[0][i] = 1;
593  skymaxs[1][i] = 1;
594  }
595 
596  if (skymins[0][i] >= skymaxs[0][i]
597  || skymins[1][i] >= skymaxs[1][i])
598  continue;
599 
600  GL_Bind (sky_images[skytexorder[i]]->texnum);
601 
602  qglBegin (GL_QUADS);
603  MakeSkyVec (skymins[0][i], skymins[1][i], i);
604  MakeSkyVec (skymins[0][i], skymaxs[1][i], i);
605  MakeSkyVec (skymaxs[0][i], skymaxs[1][i], i);
606  MakeSkyVec (skymaxs[0][i], skymins[1][i], i);
607  qglEnd ();
608  }
609 qglPopMatrix ();
610 #if 0
611 glDisable (GL_BLEND);
612 glTexEnvf(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
613 glColor4f (1,1,1,0.5);
614 glEnable (GL_DEPTH_TEST);
615 #endif
616 }

Referenced by R_DrawWorld().

◆ R_DrawSpriteModel()

void R_DrawSpriteModel ( entity_t e)

Definition at line 189 of file gl_rmain.c.

190 {
191  float alpha = 1.0F;
192  vec3_t point;
193  dsprframe_t *frame;
194  float *up, *right;
195  dsprite_t *psprite;
196 
197  // don't even bother culling, because it's just a single
198  // polygon without a surface cache
199 
200  psprite = (dsprite_t *)currentmodel->extradata;
201 
202 #if 0
203  if (e->frame < 0 || e->frame >= psprite->numframes)
204  {
205  ri.Con_Printf (PRINT_ALL, "no such sprite frame %i\n", e->frame);
206  e->frame = 0;
207  }
208 #endif
209  e->frame %= psprite->numframes;
210 
211  frame = &psprite->frames[e->frame];
212 
213 #if 0
214  if (psprite->type == SPR_ORIENTED)
215  { // bullet marks on walls
216  vec3_t v_forward, v_right, v_up;
217 
218  AngleVectors (currententity->angles, v_forward, v_right, v_up);
219  up = v_up;
220  right = v_right;
221  }
222  else
223 #endif
224  { // normal sprite
225  up = vup;
226  right = vright;
227  }
228 
229  if ( e->flags & RF_TRANSLUCENT )
230  alpha = e->alpha;
231 
232  if ( alpha != 1.0F )
233  qglEnable( GL_BLEND );
234 
235  qglColor4f( 1, 1, 1, alpha );
236 
238 
239  GL_TexEnv( GL_MODULATE );
240 
241  if ( alpha == 1.0 )
242  qglEnable (GL_ALPHA_TEST);
243  else
244  qglDisable( GL_ALPHA_TEST );
245 
246  qglBegin (GL_QUADS);
247 
248  qglTexCoord2f (0, 1);
249  VectorMA (e->origin, -frame->origin_y, up, point);
250  VectorMA (point, -frame->origin_x, right, point);
251  qglVertex3fv (point);
252 
253  qglTexCoord2f (0, 0);
254  VectorMA (e->origin, frame->height - frame->origin_y, up, point);
255  VectorMA (point, -frame->origin_x, right, point);
256  qglVertex3fv (point);
257 
258  qglTexCoord2f (1, 0);
259  VectorMA (e->origin, frame->height - frame->origin_y, up, point);
260  VectorMA (point, frame->width - frame->origin_x, right, point);
261  qglVertex3fv (point);
262 
263  qglTexCoord2f (1, 1);
264  VectorMA (e->origin, -frame->origin_y, up, point);
265  VectorMA (point, frame->width - frame->origin_x, right, point);
266  qglVertex3fv (point);
267 
268  qglEnd ();
269 
270  qglDisable (GL_ALPHA_TEST);
271  GL_TexEnv( GL_REPLACE );
272 
273  if ( alpha != 1.0F )
274  qglDisable( GL_BLEND );
275 
276  qglColor4f( 1, 1, 1, 1 );
277 }

◆ R_DrawWorld()

void R_DrawWorld ( void  )

Definition at line 1197 of file gl_rsurf.c.

1198 {
1199  entity_t ent;
1200 
1201  if (!r_drawworld->value)
1202  return;
1203 
1205  return;
1206 
1208 
1210 
1211  // auto cycle the world frame for texture animation
1212  memset (&ent, 0, sizeof(ent));
1213  ent.frame = (int)(r_newrefdef.time*2);
1214  currententity = &ent;
1215 
1217 
1218  qglColor3f (1,1,1);
1219  memset (gl_lms.lightmap_surfaces, 0, sizeof(gl_lms.lightmap_surfaces));
1220  R_ClearSkyBox ();
1221 
1222  if ( qglMTexCoord2fSGIS )
1223  {
1224  GL_EnableMultitexture( true );
1225 
1227  GL_TexEnv( GL_REPLACE );
1229 
1230  if ( gl_lightmap->value )
1231  GL_TexEnv( GL_REPLACE );
1232  else
1233  GL_TexEnv( GL_MODULATE );
1234 
1236 
1237  GL_EnableMultitexture( false );
1238  }
1239  else
1240  {
1242  }
1243 
1244  /*
1245  ** theoretically nothing should happen in the next two functions
1246  ** if multitexture is enabled
1247  */
1248  DrawTextureChains ();
1249  R_BlendLightmaps ();
1250 
1251  R_DrawSkyBox ();
1252 
1254 }

Referenced by R_RenderView().

◆ R_Init()

qboolean R_Init ( void hinstance,
void hWnd 
)

Definition at line 326 of file r_main.c.

327 {
328 
329  R_InitImages();
330  Mod_Init();
331  Draw_InitLocal();
332  R_InitTextures();
333 
334  R_InitTurb();
335 
336  view_clipplanes[0].leftedge = true;
337  view_clipplanes[1].rightedge = true;
339  view_clipplanes[3].leftedge = false;
341  view_clipplanes[3].rightedge = false;
342 
345 
346  // TODO: collect 386-specific code in one place
347 #if id386
349  (long)R_EdgeCodeEnd - (long)R_EdgeCodeStart);
350  Sys_SetFPCW(); // get bit masks for FPCW (FIXME: is this id386?)
351 #endif // id386
352 
353  r_aliasuvscale = 1.0;
354 
355  R_Register();
356  Draw_GetPalette();
357  Draw_InitRGBMap(); // leilei - colored lights
358 
359  if (SWimp_Init(hInstance, wndProc) == false)
360  return -1;
361 
362  // create the window
363  R_BeginFrame(0);
364 
365  ri.Con_Printf(PRINT_ALL, "ref_soft version: "REF_VERSION"\n");
366 
367  return true;
368 }

◆ R_InitParticleTexture()

void R_InitParticleTexture ( void  )

Definition at line 41 of file gl_rmisc.c.

42 {
43  int x,y;
44  byte data[8][8][4];
45 
46  //
47  // particle texture
48  //
49  for (x=0 ; x<8 ; x++)
50  {
51  for (y=0 ; y<8 ; y++)
52  {
53  data[y][x][0] = 255;
54  data[y][x][1] = 255;
55  data[y][x][2] = 255;
56  data[y][x][3] = dottexture[x][y]*255;
57  }
58  }
59  r_particletexture = GL_LoadPic ("***particle***", (byte *)data, 8, 8, it_sprite, 32);
60 
61  //
62  // also use this for bad textures, but without alpha
63  //
64  for (x=0 ; x<8 ; x++)
65  {
66  for (y=0 ; y<8 ; y++)
67  {
68  data[y][x][0] = dottexture[x&3][y&3]*255;
69  data[y][x][1] = 0; // dottexture[x&3][y&3]*255;
70  data[y][x][2] = 0; //dottexture[x&3][y&3]*255;
71  data[y][x][3] = 255;
72  }
73  }
74  r_notexture = GL_LoadPic ("***r_notexture***", (byte *)data, 8, 8, it_wall, 32);
75 }

Referenced by R_Init().

◆ R_LightPoint()

void R_LightPoint ( vec3_t  p,
vec3_t  color 
)

Definition at line 226 of file r_light.c.

227 {
228  vec3_t end;
229  float r;
230  int lnum;
231  dlight_t *dl;
232  vec3_t dist;
233  float add;
234 
235  if (!r_worldmodel->lightdata)
236  {
237  color[0] = color[1] = color[2] = 1.0;
238  return;
239  }
240 
241  end[0] = p[0];
242  end[1] = p[1];
243  end[2] = p[2] - 2048;
244 
246 
247  if (r == -1)
248  {
249  VectorCopy(vec3_origin, color);
250  }
251  else
252  {
253  VectorCopy(pointcolor, color);
254  }
255 
256  //
257  // add dynamic lights
258  //
259  for (lnum = 0; lnum<r_newrefdef.num_dlights; lnum++)
260  {
261  dl = &r_newrefdef.dlights[lnum];
263  dl->origin,
264  dist);
265  add = dl->intensity - VectorLength(dist);
266  add *= (1.0 / 256);
267  if (add > 0)
268  {
269  VectorMA(color, add, dl->color, color);
270  }
271  }
272 }

◆ R_MarkLeaves()

void R_MarkLeaves ( void  )

Definition at line 467 of file r_main.c.

468 {
469  byte *vis;
470  mnode_t *node;
471  int i;
472  mleaf_t *leaf;
473  int cluster;
474 
476  return;
477 
478  // development aid to let you run around and see exactly where
479  // the pvs ends
480  if (sw_lockpvs->value)
481  return;
482 
483  r_visframecount++;
485 
486  if (r_novis->value || r_viewcluster == -1 || !r_worldmodel->vis)
487  {
488  // mark everything
489  for (i = 0; i < r_worldmodel->numleafs; i++)
491  for (i = 0; i < r_worldmodel->numnodes; i++)
493  return;
494  }
495 
497 
498  for (i = 0, leaf = r_worldmodel->leafs; i < r_worldmodel->numleafs; i++, leaf++)
499  {
500  cluster = leaf->cluster;
501  if (cluster == -1)
502  continue;
503  if (vis[cluster >> 3] & (1 << (cluster & 7)))
504  {
505  node = (mnode_t *)leaf;
506  do
507  {
508  if (node->visframe == r_visframecount)
509  break;
510  node->visframe = r_visframecount;
511  node = node->parent;
512  } while (node);
513  }
514  }
515 
516 #if 0
517  for (i=0 ; i<r_worldmodel->vis->numclusters ; i++)
518  {
519  if (vis[i>>3] & (1<<(i&7)))
520  {
521  node = (mnode_t *)&r_worldmodel->leafs[i]; // FIXME: cluster
522  do
523  {
524  if (node->visframe == r_visframecount)
525  break;
526  node->visframe = r_visframecount;
527  node = node->parent;
528  } while (node);
529  }
530  }
531 #endif
532 }

◆ R_MarkLights()

void R_MarkLights ( dlight_t light,
int  bit,
mnode_t node 
)

Definition at line 40 of file r_light.c.

41 {
42  mplane_t *splitplane;
43  float dist;
44  msurface_t *surf;
45  int i;
46 
47  if (node->contents != -1)
48  return;
49 
50  splitplane = node->plane;
51  dist = DotProduct(light->origin, splitplane->normal) - splitplane->dist;
52 
53  //=====
54  //PGM
55  i = light->intensity;
56  if (i<0)
57  i = -i;
58  //PGM
59  //=====
60 
61  if (dist > i) // PGM (dist > light->intensity)
62  {
63  R_MarkLights(light, bit, node->children[0]);
64  return;
65  }
66  if (dist < -i) // PGM (dist < -light->intensity)
67  {
68  R_MarkLights(light, bit, node->children[1]);
69  return;
70  }
71 
72  // mark the polygons
73  surf = r_worldmodel->surfaces + node->firstsurface;
74  for (i = 0; i < node->numsurfaces; i++, surf++)
75  {
76  if (surf->dlightframe != r_dlightframecount)
77  {
78  surf->dlightbits = 0;
80  }
81  surf->dlightbits |= bit;
82  }
83 
84  R_MarkLights(light, bit, node->children[0]);
85  R_MarkLights(light, bit, node->children[1]);
86 }

◆ R_PushDlights()

void R_PushDlights ( void  )

Definition at line 164 of file gl_light.c.

165 {
166  int i;
167  dlight_t *l;
168 
169  if (gl_flashblend->value)
170  return;
171 
172  r_dlightframecount = r_framecount + 1; // because the count hasn't
173  // advanced yet for this frame
174  l = r_newrefdef.dlights;
175  for (i=0 ; i<r_newrefdef.num_dlights ; i++, l++)
176  R_MarkLights ( l, 1<<i, r_worldmodel->nodes );
177 }

◆ R_RegisterSkin()

struct image_s* R_RegisterSkin ( char *  name)

Definition at line 550 of file r_image.c.

551 {
552  return R_FindImage (name, it_skin);
553 }

◆ R_RenderBrushPoly()

void R_RenderBrushPoly ( msurface_t fa)

Definition at line 478 of file gl_rsurf.c.

479 {
480  int maps;
481  image_t *image;
482  qboolean is_dynamic = false;
483 
484  c_brush_polys++;
485 
486  image = R_TextureAnimation (fa->texinfo);
487 
488  if (fa->flags & SURF_DRAWTURB)
489  {
490  GL_Bind( image->texnum );
491 
492  // warp texture, no lightmaps
493  GL_TexEnv( GL_MODULATE );
494  qglColor4f( gl_state.inverse_intensity,
497  1.0F );
498  EmitWaterPolys (fa);
499  GL_TexEnv( GL_REPLACE );
500 
501  return;
502  }
503  else
504  {
505  GL_Bind( image->texnum );
506 
507  GL_TexEnv( GL_REPLACE );
508  }
509 
510 //======
511 //PGM
512  if(fa->texinfo->flags & SURF_FLOWING)
513  DrawGLFlowingPoly (fa);
514  else
515  DrawGLPoly (fa->polys);
516 //PGM
517 //======
518 
519  /*
520  ** check for lightmap modification
521  */
522  for ( maps = 0; maps < MAXLIGHTMAPS && fa->styles[maps] != 255; maps++ )
523  {
524  if ( r_newrefdef.lightstyles[fa->styles[maps]].white != fa->cached_light[maps] )
525  goto dynamic;
526  }
527 
528  // dynamic this frame or dynamic previously
529  if ( ( fa->dlightframe == r_framecount ) )
530  {
531 dynamic:
532  if ( gl_dynamic->value )
533  {
535  {
536  is_dynamic = true;
537  }
538  }
539  }
540 
541  if ( is_dynamic )
542  {
543  if ( ( fa->styles[maps] >= 32 || fa->styles[maps] == 0 ) && ( fa->dlightframe != r_framecount ) )
544  {
545  unsigned temp[34*34];
546  int smax, tmax;
547 
548  smax = (fa->extents[0]>>4)+1;
549  tmax = (fa->extents[1]>>4)+1;
550 
551  R_BuildLightMap( fa, (void *)temp, smax*4 );
552  R_SetCacheState( fa );
553 
555 
556  qglTexSubImage2D( GL_TEXTURE_2D, 0,
557  fa->light_s, fa->light_t,
558  smax, tmax,
560  GL_UNSIGNED_BYTE, temp );
561 
564  }
565  else
566  {
568  gl_lms.lightmap_surfaces[0] = fa;
569  }
570  }
571  else
572  {
575  }
576 }

Referenced by DrawTextureChains(), and R_DrawInlineBModel().

◆ R_RenderDlights()

void R_RenderDlights ( void  )

Definition at line 77 of file gl_light.c.

78 {
79  int i;
80  dlight_t *l;
81 
82  if (!gl_flashblend->value)
83  return;
84 
85  r_dlightframecount = r_framecount + 1; // because the count hasn't
86  // advanced yet for this frame
87  qglDepthMask (0);
88  qglDisable (GL_TEXTURE_2D);
89  qglShadeModel (GL_SMOOTH);
90  qglEnable (GL_BLEND);
91  qglBlendFunc (GL_ONE, GL_ONE);
92 
93  l = r_newrefdef.dlights;
94  for (i=0 ; i<r_newrefdef.num_dlights ; i++, l++)
95  R_RenderDlight (l);
96 
97  qglColor3f (1,1,1);
98  qglDisable (GL_BLEND);
99  qglEnable (GL_TEXTURE_2D);
100  qglBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
101  qglDepthMask (1);
102 }

◆ R_RenderView()

void R_RenderView ( refdef_t fd)

Definition at line 818 of file gl_rmain.c.

819 {
820  if (r_norefresh->value)
821  return;
822 
823  r_newrefdef = *fd;
824 
826  ri.Sys_Error (ERR_DROP, "R_RenderView: NULL worldmodel");
827 
828  if (r_speeds->value)
829  {
830  c_brush_polys = 0;
831  c_alias_polys = 0;
832  }
833 
834  R_PushDlights ();
835 
836  if (gl_finish->value)
837  qglFinish ();
838 
839  R_SetupFrame ();
840 
841  R_SetFrustum ();
842 
843  R_SetupGL ();
844 
845  R_MarkLeaves (); // done here so we know if we're in water
846 
847  R_DrawWorld ();
848 
850 
851  R_RenderDlights ();
852 
853  R_DrawParticles ();
854 
856 
857  R_Flash();
858 
859  if (r_speeds->value)
860  {
861  ri.Con_Printf (PRINT_ALL, "%4i wpoly %4i epoly %i tex %i lmaps\n",
862  c_brush_polys,
863  c_alias_polys,
866  }
867 }

◆ R_RotateForEntity()

void R_RotateForEntity ( entity_t e)

Definition at line 165 of file gl_rmain.c.

166 {
167  qglTranslatef (e->origin[0], e->origin[1], e->origin[2]);
168 
169  qglRotatef (e->angles[1], 0, 0, 1);
170  qglRotatef (-e->angles[0], 0, 1, 0);
171  qglRotatef (-e->angles[2], 1, 0, 0);
172 }

Referenced by R_DrawAliasModel(), R_DrawBrushModel(), and R_DrawNullModel().

◆ R_SetPalette()

void R_SetPalette ( const unsigned char *  palette)

Definition at line 1574 of file gl_rmain.c.

1575 {
1576  int i;
1577 
1578  byte *rp = ( byte * ) r_rawpalette;
1579 
1580  if ( palette )
1581  {
1582  for ( i = 0; i < 256; i++ )
1583  {
1584  rp[i*4+0] = palette[i*3+0];
1585  rp[i*4+1] = palette[i*3+1];
1586  rp[i*4+2] = palette[i*3+2];
1587  rp[i*4+3] = 0xff;
1588  }
1589  }
1590  else
1591  {
1592  for ( i = 0; i < 256; i++ )
1593  {
1594  rp[i*4+0] = d_8to24table[i] & 0xff;
1595  rp[i*4+1] = ( d_8to24table[i] >> 8 ) & 0xff;
1596  rp[i*4+2] = ( d_8to24table[i] >> 16 ) & 0xff;
1597  rp[i*4+3] = 0xff;
1598  }
1599  }
1601 
1602  qglClearColor (0,0,0,0);
1603  qglClear (GL_COLOR_BUFFER_BIT);
1604  qglClearColor (1,0, 0.5 , 0.5);
1605 }

◆ R_Shutdown()

void R_Shutdown ( void  )

Definition at line 375 of file r_main.c.

376 {
377  // free z buffer
378  if (d_pzbuffer)
379  {
380  free(d_pzbuffer);
381  d_pzbuffer = NULL;
382  }
383  // free surface cache
384  if (sc_base)
385  {
386  D_FlushCaches();
387  free(sc_base);
388  sc_base = NULL;
389  }
390 
391  if (r_warpbuffer)
392  {
393  free(r_warpbuffer);
394  r_warpbuffer = NULL;
395  }
396 
397  // free colormap
398  if (vid.colormap)
399  {
400  free(vid.colormap);
401  vid.colormap = NULL;
402  }
403  R_UnRegister();
404  Mod_FreeAll();
406 
407  SWimp_Shutdown();
408 }

◆ R_SwapBuffers()

void R_SwapBuffers ( int  )

◆ R_TranslatePlayerSkin()

void R_TranslatePlayerSkin ( int  playernum)

◆ V_AddBlend()

void V_AddBlend ( float  r,
float  g,
float  b,
float  a,
float *  v_blend 
)

Referenced by R_RenderDlight().

◆ WaterWarpPolyVerts()

glpoly_t* WaterWarpPolyVerts ( glpoly_t p)

Variable Documentation

◆ c_alias_polys

int c_alias_polys

Definition at line 157 of file gl_local.h.

Referenced by R_DrawAliasModel().

◆ c_brush_polys

int c_brush_polys

◆ c_visible_lightmaps

int c_visible_lightmaps

Definition at line 40 of file gl_rsurf.c.

Referenced by R_RenderView().

◆ c_visible_textures

int c_visible_textures

Definition at line 41 of file gl_rsurf.c.

Referenced by R_RenderView().

◆ currententity

entity_t* currententity

Definition at line 28 of file r_bsp.c.

◆ currentmodel

model_t* currentmodel

Definition at line 39 of file r_main.c.

◆ d_8to24table

unsigned d_8to24table[256]

Definition at line 27 of file r_main.c.

◆ frustum

cplane_t frustum[4]

Definition at line 50 of file gl_rmain.c.

Referenced by R_CullAliasModel().

◆ gl_3dlabs_broken

cvar_t* gl_3dlabs_broken

Definition at line 138 of file gl_rmain.c.

Referenced by R_Init(), and R_Register().

◆ gl_alpha_format

int gl_alpha_format

Definition at line 40 of file gl_image.c.

Referenced by GL_Upload32().

◆ gl_bitdepth

cvar_t* gl_bitdepth

Definition at line 110 of file gl_rmain.c.

Referenced by GLimp_BeginFrame(), GLimp_SetMode(), R_Register(), and VID_CreateWindow().

◆ gl_clear

cvar_t* gl_clear

Definition at line 126 of file gl_rmain.c.

Referenced by R_Clear(), and R_Register().

◆ gl_config

◆ gl_cull

cvar_t* gl_cull

Definition at line 127 of file gl_rmain.c.

Referenced by R_Register(), and R_SetupGL().

◆ gl_drawbuffer

cvar_t* gl_drawbuffer

Definition at line 111 of file gl_rmain.c.

Referenced by GLimp_EndFrame(), R_BeginFrame(), and R_Register().

◆ gl_driver

cvar_t* gl_driver

Definition at line 112 of file gl_rmain.c.

Referenced by R_Init(), and R_Register().

◆ gl_dynamic

cvar_t* gl_dynamic

◆ gl_ext_compiled_vertex_array

cvar_t* gl_ext_compiled_vertex_array

Definition at line 107 of file gl_rmain.c.

Referenced by R_Register().

◆ gl_ext_multitexture

cvar_t* gl_ext_multitexture

Definition at line 105 of file gl_rmain.c.

Referenced by R_Init(), and R_Register().

◆ gl_ext_palettedtexture

cvar_t* gl_ext_palettedtexture

Definition at line 104 of file gl_rmain.c.

Referenced by R_Init(), and R_Register().

◆ gl_ext_pointparameters

cvar_t* gl_ext_pointparameters

Definition at line 106 of file gl_rmain.c.

Referenced by R_DrawParticles(), R_Init(), and R_Register().

◆ gl_ext_swapinterval

cvar_t* gl_ext_swapinterval

Definition at line 103 of file gl_rmain.c.

Referenced by R_Register().

◆ gl_filter_max

int gl_filter_max

Definition at line 160 of file gl_local.h.

◆ gl_filter_min

int gl_filter_min

Definition at line 45 of file gl_image.c.

Referenced by GL_SetDefaultState(), GL_TextureMode(), and GL_Upload32().

◆ gl_finish

cvar_t* gl_finish

Definition at line 125 of file gl_rmain.c.

Referenced by R_Register(), and R_RenderView().

◆ gl_flashblend

cvar_t* gl_flashblend

Definition at line 129 of file gl_rmain.c.

Referenced by R_DrawInlineBModel(), R_PushDlights(), R_Register(), and R_RenderDlights().

◆ gl_lightmap

cvar_t* gl_lightmap

Definition at line 113 of file gl_rmain.c.

Referenced by R_BlendLightmaps(), R_DrawWorld(), and R_Register().

◆ gl_lightmap_format

int gl_lightmap_format

◆ gl_lightmaptype

cvar_t* gl_lightmaptype

◆ gl_lockpvs

cvar_t* gl_lockpvs

Definition at line 136 of file gl_rmain.c.

Referenced by R_MarkLeaves(), and R_Register().

◆ gl_log

cvar_t* gl_log

Definition at line 109 of file gl_rmain.c.

Referenced by R_BeginFrame(), and R_Register().

◆ gl_mode

cvar_t* gl_mode

Definition at line 115 of file gl_rmain.c.

Referenced by R_BeginFrame(), R_Register(), and R_SetMode().

◆ gl_modulate

cvar_t* gl_modulate

Definition at line 118 of file gl_rmain.c.

Referenced by R_BuildLightMap(), R_LightPoint(), R_Register(), and RecursiveLightPoint().

◆ gl_monolightmap

◆ gl_nobind

cvar_t* gl_nobind

Definition at line 119 of file gl_rmain.c.

Referenced by GL_Bind(), and R_Register().

◆ gl_nosubimage

cvar_t* gl_nosubimage

Definition at line 91 of file gl_rmain.c.

Referenced by R_Register().

◆ gl_particle_att_a

cvar_t* gl_particle_att_a

Definition at line 99 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), and R_Register().

◆ gl_particle_att_b

cvar_t* gl_particle_att_b

Definition at line 100 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), and R_Register().

◆ gl_particle_att_c

cvar_t* gl_particle_att_c

Definition at line 101 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), and R_Register().

◆ gl_particle_max_size

cvar_t* gl_particle_max_size

Definition at line 97 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), and R_Register().

◆ gl_particle_min_size

cvar_t* gl_particle_min_size

Definition at line 96 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), and R_Register().

◆ gl_particle_size

cvar_t* gl_particle_size

Definition at line 98 of file gl_rmain.c.

Referenced by R_DrawParticles(), and R_Register().

◆ gl_picmip

cvar_t* gl_picmip

Definition at line 121 of file gl_rmain.c.

Referenced by R_Register().

◆ gl_playermip

cvar_t* gl_playermip

Definition at line 130 of file gl_rmain.c.

Referenced by R_Register().

◆ gl_poly

cvar_t* gl_poly

◆ gl_polyblend

cvar_t* gl_polyblend

Definition at line 128 of file gl_rmain.c.

Referenced by R_PolyBlend(), and R_Register().

◆ gl_round_down

cvar_t* gl_round_down

Definition at line 120 of file gl_rmain.c.

Referenced by GL_Upload32(), and R_Register().

◆ gl_saturatelighting

cvar_t* gl_saturatelighting

Definition at line 131 of file gl_rmain.c.

Referenced by R_BlendLightmaps(), and R_Register().

◆ gl_shadows

cvar_t* gl_shadows

Definition at line 114 of file gl_rmain.c.

Referenced by R_DrawAliasModel(), and R_Register().

◆ gl_showtris

cvar_t* gl_showtris

Definition at line 123 of file gl_rmain.c.

Referenced by R_DrawTriangleOutlines(), and R_Register().

◆ gl_skymip

cvar_t* gl_skymip

Definition at line 122 of file gl_rmain.c.

Referenced by R_Register(), and R_SetSky().

◆ gl_solid_format

int gl_solid_format

Definition at line 39 of file gl_image.c.

Referenced by GL_Upload32().

◆ gl_state

◆ gl_swapinterval

cvar_t* gl_swapinterval

Definition at line 132 of file gl_rmain.c.

Referenced by GL_UpdateSwapInterval(), and R_Register().

◆ gl_tex_alpha_format

int gl_tex_alpha_format

Definition at line 43 of file gl_image.c.

Referenced by GL_BeginBuildingLightmaps(), GL_TextureAlphaMode(), and GL_Upload32().

◆ gl_tex_solid_format

int gl_tex_solid_format

◆ gl_texsort

cvar_t* gl_texsort

◆ gl_texturealphamode

cvar_t* gl_texturealphamode

Definition at line 134 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), R_BeginFrame(), and R_Register().

◆ gl_texturemode

cvar_t* gl_texturemode

Definition at line 133 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), R_BeginFrame(), and R_Register().

◆ gl_texturesolidmode

cvar_t* gl_texturesolidmode

Definition at line 135 of file gl_rmain.c.

Referenced by GL_SetDefaultState(), R_BeginFrame(), and R_Register().

◆ gl_vertex_arrays

cvar_t* gl_vertex_arrays

Definition at line 94 of file gl_rmain.c.

Referenced by GL_DrawAliasFrameLerp(), and R_Register().

◆ gl_ztrick

cvar_t* gl_ztrick

Definition at line 124 of file gl_rmain.c.

Referenced by R_Clear(), and R_Register().

◆ gldepthmax

float gldepthmax

Definition at line 129 of file gl_local.h.

Referenced by R_DrawAliasModel().

◆ gldepthmin

float gldepthmin

Definition at line 39 of file gl_rmain.c.

Referenced by R_Clear(), and R_DrawAliasModel().

◆ gltextures

◆ intensity

cvar_t* intensity

Definition at line 31 of file gl_image.c.

◆ numgltextures

◆ r_drawentities

cvar_t* r_drawentities

Definition at line 135 of file r_main.c.

◆ r_drawworld

cvar_t* r_drawworld

Definition at line 134 of file r_main.c.

◆ r_framecount

int r_framecount

Definition at line 97 of file r_main.c.

◆ r_fullbright

cvar_t* r_fullbright

Definition at line 137 of file r_main.c.

◆ r_lefthand

cvar_t* r_lefthand

Definition at line 117 of file r_main.c.

◆ r_lerpmodels

cvar_t* r_lerpmodels

Definition at line 138 of file r_main.c.

◆ r_lightlevel

cvar_t* r_lightlevel

Definition at line 142 of file r_main.c.

◆ r_newrefdef

refdef_t r_newrefdef

Definition at line 38 of file r_main.c.

◆ r_nocull

cvar_t* r_nocull

Definition at line 85 of file gl_rmain.c.

◆ r_norefresh

cvar_t* r_norefresh

Definition at line 79 of file gl_rmain.c.

◆ r_notexture

◆ r_novis

cvar_t* r_novis

Definition at line 139 of file r_main.c.

◆ r_oldviewcluster

int r_oldviewcluster

Definition at line 174 of file gl_local.h.

◆ r_oldviewcluster2

int r_oldviewcluster2

Definition at line 174 of file gl_local.h.

Referenced by R_MarkLeaves().

◆ r_origin

vec3_t r_origin

Definition at line 75 of file r_main.c.

◆ r_particletexture

image_t* r_particletexture

Definition at line 45 of file gl_rmain.c.

Referenced by GL_FreeUnusedImages(), R_InitParticleTexture(), and Vk_FreeUnusedImages().

◆ r_speeds

cvar_t* r_speeds

Definition at line 141 of file r_main.c.

◆ r_viewcluster

int r_viewcluster

Definition at line 108 of file r_main.c.

◆ r_viewcluster2

int r_viewcluster2

Definition at line 174 of file gl_local.h.

Referenced by R_MarkLeaves().

◆ r_visframecount

int r_visframecount

Definition at line 98 of file r_main.c.

◆ r_world_matrix

float r_world_matrix[16]

Definition at line 69 of file gl_rmain.c.

Referenced by R_DrawAlphaSurfaces(), and R_SetupGL().

◆ r_worldmodel

model_t* r_worldmodel

Definition at line 41 of file r_main.c.

◆ registration_sequence

int registration_sequence

Definition at line 44 of file r_model.c.

◆ ri

Definition at line 25 of file r_main.c.

◆ vid

viddef_t vid

Definition at line 24 of file r_main.c.

◆ vid_fullscreen

cvar_t* vid_fullscreen

Definition at line 47 of file vid_dll.c.

◆ vid_gamma

cvar_t* vid_gamma

Definition at line 43 of file vid_dll.c.

◆ vpn

vec3_t vpn

Definition at line 73 of file r_main.c.

◆ vright

vec3_t vright

Definition at line 74 of file r_main.c.

◆ vup

vec3_t vup

Definition at line 72 of file r_main.c.

GL_RENDERER_VOODOO
#define GL_RENDERER_VOODOO
Definition: gl_local.h:356
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:47
RF_TRANSLUCENT
#define RF_TRANSLUCENT
Definition: q_shared.h:604
logMapGrid2d
static void APIENTRY logMapGrid2d(GLint un, GLdouble u1, GLdouble u2, GLint vn, GLdouble v1, GLdouble v2)
Definition: qgl_win.c:1737
logEndList
static void APIENTRY logEndList(void)
Definition: qgl_win.c:1188
logGetMapiv
static void APIENTRY logGetMapiv(GLenum target, GLenum query, GLint *v)
Definition: qgl_win.c:1385
logBitmap
static void APIENTRY logBitmap(GLsizei width, GLsizei height, GLfloat xorig, GLfloat yorig, GLfloat xmove, GLfloat ymove, const GLubyte *bitmap)
Definition: qgl_win.c:787
logRectsv
static void APIENTRY logRectsv(const GLshort *v1, const GLshort *v2)
Definition: qgl_win.c:2158
it_sprite
@ it_sprite
Definition: r_local.h:65
VID_CreateWindow
qboolean VID_CreateWindow(int width, int height, qboolean fullscreen)
Definition: glw_imp.c:64
GLimp_Shutdown
void GLimp_Shutdown(void)
Definition: glw_imp.c:276
logNormal3bv
static void APIENTRY logNormal3bv(const GLbyte *v)
Definition: qgl_win.c:1800
sv
server_t sv
Definition: sv_init.c:24
refdef_t::vieworg
float vieworg[3]
Definition: ref.h:106
logVertex4iv
static void APIENTRY logVertex4iv(const GLint *v)
Definition: qgl_win.c:2612
numgltextures
int numgltextures
Definition: gl_image.c:25
logClearDepth
static void APIENTRY logClearDepth(GLclampd depth)
Definition: qgl_win.c:829
logIndexsv
static void APIENTRY logIndexsv(const GLshort *c)
Definition: qgl_win.c:1558
rserr_t
rserr_t
Definition: r_local.h:103
sky_images
image_t * sky_images[6]
Definition: gl_warp.c:29
LoadTGA
void LoadTGA(char *name, byte **pic, int *width, int *height)
Definition: gl_image.c:551
RF_SHELL_RED
#define RF_SHELL_RED
Definition: q_shared.h:609
height
GLsizei height
Definition: qgl_win.c:69
logVertex4sv
static void APIENTRY logVertex4sv(const GLshort *v)
Definition: qgl_win.c:2622
currentmodel
model_t * currentmodel
Definition: r_main.c:39
r_framecount
int r_framecount
Definition: r_main.c:97
GL_LoadPic
image_t * GL_LoadPic(char *name, byte *pic, int width, int height, imagetype_t type)
Definition: r_image.c:414
entity_s::skin
struct image_s * skin
Definition: ref.h:75
logCopyPixels
static void APIENTRY logCopyPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum type)
Definition: qgl_win.c:1050
GL_UpdateSwapInterval
void GL_UpdateSwapInterval(void)
Definition: gl_rmisc.c:232
msurface_s::styles
byte styles[MAXLIGHTMAPS]
Definition: r_model.h:115
c_brush_polys
int c_brush_polys
Definition: gl_rmain.c:55
glstate_t::stereo_enabled
qboolean stereo_enabled
Definition: gl_local.h:422
entity_s::origin
float origin[3]
Definition: ref.h:57
R_Register
void R_Register(void)
Definition: r_main.c:260
logTexCoord4d
static void APIENTRY logTexCoord4d(GLdouble s, GLdouble t, GLdouble r, GLdouble q)
Definition: qgl_win.c:2351
RF_IR_VISIBLE
#define RF_IR_VISIBLE
Definition: q_shared.h:614
logPixelMapfv
static void APIENTRY logPixelMapfv(GLenum map, GLsizei mapsize, const GLfloat *values)
Definition: qgl_win.c:1866
logTexCoord4i
static void APIENTRY logTexCoord4i(GLint s, GLint t, GLint r, GLint q)
Definition: qgl_win.c:2371
logTexCoord4dv
static void APIENTRY logTexCoord4dv(const GLdouble *v)
Definition: qgl_win.c:2356
gl_particle_att_c
cvar_t * gl_particle_att_c
Definition: gl_rmain.c:101
R_InitImages
void R_InitImages(void)
Definition: r_image.c:593
logFlush
static void APIENTRY logFlush(void)
Definition: qgl_win.c:1271
logVertex2d
static void APIENTRY logVertex2d(GLdouble x, GLdouble y)
Definition: qgl_win.c:2506
r_particletexture
image_t * r_particletexture
Definition: gl_rmain.c:45
logDisableClientState
static void APIENTRY logDisableClientState(GLenum array)
Definition: qgl_win.c:1122
logVertex2s
static void APIENTRY logVertex2s(GLshort x, GLshort y)
Definition: qgl_win.c:2537
r_novis
cvar_t * r_novis
Definition: r_main.c:139
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
model_s::vis
dvis_t * vis
Definition: r_model.h:229
logGetTexParameteriv
static void APIENTRY logGetTexParameteriv(GLenum target, GLenum pname, GLint *params)
Definition: qgl_win.c:1492
int
CONST PIXELFORMATDESCRIPTOR int
Definition: qgl_win.c:35
r_visframecount
int r_visframecount
Definition: r_main.c:98
logTexImage2D
static void APIENTRY logTexImage2D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels)
Definition: qgl_win.c:2457
logEvalMesh2
static void APIENTRY logEvalMesh2(GLenum mode, GLint i1, GLint i2, GLint j1, GLint j2)
Definition: qgl_win.c:1243
RF_MINLIGHT
#define RF_MINLIGHT
Definition: q_shared.h:599
VectorSubtract
#define VectorSubtract(a, b, c)
Definition: q_shared.h:163
glw_state
glwstate_t glw_state
Definition: glw_imp.c:42
logEvalCoord1d
static void APIENTRY logEvalCoord1d(GLdouble u)
Definition: qgl_win.c:1194
Sys_SetFPCW
void Sys_SetFPCW(void)
Definition: rw_imp.c:351
R_ShutdownImages
void R_ShutdownImages(void)
Definition: r_image.c:603
RF_SHELL_HALF_DAM
#define RF_SHELL_HALF_DAM
Definition: q_shared.h:616
logPixelTransferi
static void APIENTRY logPixelTransferi(GLenum pname, GLint param)
Definition: qgl_win.c:1899
logColor4dv
static void APIENTRY logColor4dv(const GLdouble *v)
Definition: qgl_win.c:968
image_s::th
float th
Definition: gl_local.h:96
logMultMatrixd
static void APIENTRY logMultMatrixd(const GLdouble *m)
Definition: qgl_win.c:1776
glwstate_t::hDC
HDC hDC
Definition: glw_win.h:32
logLightfv
static void APIENTRY logLightfv(GLenum light, GLenum pname, const GLfloat *params)
Definition: qgl_win.c:1635
logMapGrid1d
static void APIENTRY logMapGrid1d(GLint un, GLdouble u1, GLdouble u2)
Definition: qgl_win.c:1725
r_notexture
image_t * r_notexture
Definition: gl_rmain.c:44
c_visible_lightmaps
int c_visible_lightmaps
Definition: gl_rsurf.c:40
scrap_texels
byte scrap_texels[MAX_SCRAPS][BLOCK_WIDTH *BLOCK_HEIGHT]
Definition: gl_image.c:364
logTexParameterfv
static void APIENTRY logTexParameterfv(GLenum target, GLenum pname, const GLfloat *params)
Definition: qgl_win.c:2469
Sys_MakeCodeWriteable
void Sys_MakeCodeWriteable(unsigned long startaddr, unsigned long length)
Definition: rw_imp.c:322
viddef_t::buffer
pixel_t * buffer
Definition: r_local.h:94
R_SetupFrame
void R_SetupFrame(void)
Definition: gl_rmain.c:618
r_oldviewcluster
int r_oldviewcluster
Definition: r_main.c:108
gl_shadows
cvar_t * gl_shadows
Definition: gl_rmain.c:114
logGetTexEnviv
static void APIENTRY logGetTexEnviv(GLenum target, GLenum pname, GLint *params)
Definition: qgl_win.c:1445
MakeSkyVec
void MakeSkyVec(float s, float t, int axis)
Definition: gl_warp.c:520
logEvalCoord2d
static void APIENTRY logEvalCoord2d(GLdouble u, GLdouble v)
Definition: qgl_win.c:1217
logStencilOp
static void APIENTRY logStencilOp(GLenum fail, GLenum zfail, GLenum zpass)
Definition: qgl_win.c:2222
BOX_ON_PLANE_SIDE
#define BOX_ON_PLANE_SIDE(emins, emaxs, p)
Definition: q_shared.h:197
GL_SHARED_TEXTURE_PALETTE_EXT
#define GL_SHARED_TEXTURE_PALETTE_EXT
Definition: qgl.h:476
scrap_dirty
qboolean scrap_dirty
Definition: gl_image.c:365
logColor3i
static void APIENTRY logColor3i(GLint red, GLint green, GLint blue)
Definition: qgl_win.c:889
model_s::nummodelsurfaces
int nummodelsurfaces
Definition: r_model.h:196
logEvalCoord2fv
static void APIENTRY logEvalCoord2fv(const GLfloat *u)
Definition: qgl_win.c:1232
logRasterPos2i
static void APIENTRY logRasterPos2i(GLint x, GLint y)
Definition: qgl_win.c:2009
logEdgeFlagv
static void APIENTRY logEdgeFlagv(const GLboolean *flag)
Definition: qgl_win.c:1164
gl_state
glstate_t gl_state
Definition: gl_rmain.c:42
R_PushDlights
void R_PushDlights(model_t *model)
Definition: r_light.c:94
logColor3iv
static void APIENTRY logColor3iv(const GLint *v)
Definition: qgl_win.c:895
msurface_s::light_t
int light_t
Definition: gl_model.h:108
logVertex2sv
static void APIENTRY logVertex2sv(const GLshort *v)
Definition: qgl_win.c:2542
it_sprite
@ it_sprite
Definition: gl_local.h:81
loadmodel
model_t * loadmodel
Definition: r_model.c:27
logVertex3iv
static void APIENTRY logVertex3iv(const GLint *v)
Definition: qgl_win.c:2572
logClear
static void APIENTRY logClear(GLbitfield mask)
Definition: qgl_win.c:811
ri
refimport_t ri
Definition: r_main.c:25
pcx_t
Definition: qfiles.h:60
skyaxis
vec3_t skyaxis
Definition: gl_warp.c:28
Sys_Mkdir
void Sys_Mkdir(char *path)
Definition: q_shwin.c:135
logIndexPointer
static void APIENTRY logIndexPointer(GLenum type, GLsizei stride, const void *pointer)
Definition: qgl_win.c:1510
RF_SHELL_GREEN
#define RF_SHELL_GREEN
Definition: q_shared.h:610
glstate_t::currenttextures
int currenttextures[2]
Definition: gl_local.h:418
logGetClipPlane
static void APIENTRY logGetClipPlane(GLenum plane, GLdouble *equation)
Definition: qgl_win.c:1331
GL_TextureAlphaMode
void GL_TextureAlphaMode(char *string)
Definition: gl_image.c:255
PRINT_DEVELOPER
#define PRINT_DEVELOPER
Definition: qcommon.h:752
logTexEnvfv
static void APIENTRY logTexEnvfv(GLenum target, GLenum pname, const GLfloat *params)
Definition: qgl_win.c:2403
dllGetString
const GLubyte *APIENTRY * dllGetString(GLenum name)
GL_LoadWal
image_t * GL_LoadWal(char *name)
Definition: gl_image.c:1332
logLineStipple
static void APIENTRY logLineStipple(GLint factor, GLushort pattern)
Definition: qgl_win.c:1653
r_customheight
cvar_t * r_customheight
Definition: r_main.c:152
logColor4d
static void APIENTRY logColor4d(GLdouble red, GLdouble green, GLdouble blue, GLdouble alpha)
Definition: qgl_win.c:963
logColor3d
static void APIENTRY logColor3d(GLdouble red, GLdouble green, GLdouble blue)
Definition: qgl_win.c:865
logTexEnviv
static void APIENTRY logTexEnviv(GLenum target, GLenum pname, const GLint *params)
Definition: qgl_win.c:2414
v
GLdouble v
Definition: qgl_win.c:143
it_wall
@ it_wall
Definition: r_local.h:66
logLightiv
static void APIENTRY logLightiv(GLenum light, GLenum pname, const GLint *params)
Definition: qgl_win.c:1647
logGetString
static const GLubyte *APIENTRY logGetString(GLenum name)
Definition: qgl_win.c:1433
logMap1f
static void APIENTRY logMap1f(GLenum target, GLfloat u1, GLfloat u2, GLint stride, GLint order, const GLfloat *points)
Definition: qgl_win.c:1707
cvar_s::modified
qboolean modified
Definition: q_shared.h:330
zNear
GLdouble GLdouble GLdouble GLdouble zNear
Definition: qgl_win.c:159
dmdl_t::num_tris
int num_tris
Definition: qfiles.h:149
gl_texture1
int gl_texture1
Definition: gl_rmain.c:35
logRasterPos4fv
static void APIENTRY logRasterPos4fv(const GLfloat *v)
Definition: qgl_win.c:2084
gl_dynamic
cvar_t * gl_dynamic
Definition: gl_rmain.c:116
R_InitGraphics
void R_InitGraphics(int width, int height)
Definition: r_main.c:1108
gldepthmax
float gldepthmax
Definition: gl_local.h:129
glpoly_s::verts
float verts[4][VERTEXSIZE]
Definition: gl_model.h:92
modelorg
static vec3_t modelorg
Definition: gl_rsurf.c:26
logCopyTexSubImage2D
static void APIENTRY logCopyTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height)
Definition: qgl_win.c:1074
logEvalPoint2
static void APIENTRY logEvalPoint2(GLint i, GLint j)
Definition: qgl_win.c:1253
logRasterPos4s
static void APIENTRY logRasterPos4s(GLshort x, GLshort y, GLshort z, GLshort w)
Definition: qgl_win.c:2099
dsprframe_t::height
int height
Definition: qfiles.h:176
d_8to24table
unsigned d_8to24table[256]
Definition: r_main.c:27
logDisable
static void APIENTRY logDisable(GLenum cap)
Definition: qgl_win.c:1116
logTexCoord2f
static void APIENTRY logTexCoord2f(GLfloat s, GLfloat t)
Definition: qgl_win.c:2281
GL_TextureMode
void GL_TextureMode(char *string)
Definition: gl_image.c:218
logGetLightfv
static void APIENTRY logGetLightfv(GLenum light, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1361
logPushName
static void APIENTRY logPushName(GLuint name)
Definition: qgl_win.c:1981
qglGetString
const GLubyte *APIENTRY * qglGetString(GLenum name)
logMap2d
static void APIENTRY logMap2d(GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, const GLdouble *points)
Definition: qgl_win.c:1713
logColor3usv
static void APIENTRY logColor3usv(const GLushort *v)
Definition: qgl_win.c:945
gl_finish
cvar_t * gl_finish
Definition: gl_rmain.c:125
logIsTexture
static GLboolean APIENTRY logIsTexture(GLuint texture)
Definition: qgl_win.c:1598
logRects
static void APIENTRY logRects(GLshort x1, GLshort y1, GLshort x2, GLshort y2)
Definition: qgl_win.c:2153
logNormalPointer
static void APIENTRY logNormalPointer(GLenum type, GLsizei stride, const void *pointer)
Definition: qgl_win.c:1849
logScalef
static void APIENTRY logScalef(GLfloat x, GLfloat y, GLfloat z)
Definition: qgl_win.c:2186
model_s::edges
medge_t * edges
Definition: r_model.h:211
glstate_t::currenttmu
int currenttmu
Definition: gl_local.h:419
rserr_t
rserr_t
Definition: gl_local.h:111
logRasterPos4dv
static void APIENTRY logRasterPos4dv(const GLdouble *v)
Definition: qgl_win.c:2074
logRasterPos4f
static void APIENTRY logRasterPos4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition: qgl_win.c:2079
R_LightPoint
void R_LightPoint(vec3_t p, vec3_t color)
Definition: r_light.c:226
logPushClientAttrib
static void APIENTRY logPushClientAttrib(GLbitfield mask)
Definition: qgl_win.c:1969
logRectd
static void APIENTRY logRectd(GLdouble x1, GLdouble y1, GLdouble x2, GLdouble y2)
Definition: qgl_win.c:2120
logReadBuffer
static void APIENTRY logReadBuffer(GLenum mode)
Definition: qgl_win.c:2109
x2
GLdouble GLdouble x2
Definition: qgl_win.c:301
shadevector
vec3_t shadevector
Definition: gl_mesh.c:43
mnode_s::visframe
int visframe
Definition: r_model.h:127
vid
viddef_t vid
Definition: r_main.c:24
refimport_t::FS_LoadFile
int(* FS_LoadFile)(char *name, void **buf)
Definition: ref.h:209
pix
static int pix
Definition: r_part.c:472
VERTEXSIZE
#define VERTEXSIZE
Definition: gl_model.h:84
logGetTexGendv
static void APIENTRY logGetTexGendv(GLenum coord, GLenum pname, GLdouble *params)
Definition: qgl_win.c:1451
refimport_t::Cvar_Get
cvar_t *(* Cvar_Get)(char *name, char *value, int flags)
Definition: ref.h:216
cvar_s::string
char * string
Definition: q_shared.h:327
logTexCoord1f
static void APIENTRY logTexCoord1f(GLfloat s)
Definition: qgl_win.c:2240
logDepthMask
static void APIENTRY logDepthMask(GLboolean flag)
Definition: qgl_win.c:1104
VectorScale
void VectorScale(vec3_t in, vec_t scale, vec3_t out)
Definition: q_shared.c:782
pcx_t::version
char version
Definition: qfiles.h:63
pcx_t::data
unsigned char data
Definition: qfiles.h:74
logViewport
static void APIENTRY logViewport(GLint x, GLint y, GLsizei width, GLsizei height)
Definition: qgl_win.c:2632
logRasterPos3sv
static void APIENTRY logRasterPos3sv(const GLshort *v)
Definition: qgl_win.c:2064
logTexCoord2iv
static void APIENTRY logTexCoord2iv(const GLint *v)
Definition: qgl_win.c:2296
R_FindImage
image_t * R_FindImage(char *name, imagetype_t type)
Definition: r_image.c:491
qboolean
qboolean
Definition: q_shared.h:63
x
GLint GLenum GLint x
Definition: qgl_win.c:116
logRectfv
static void APIENTRY logRectfv(const GLfloat *v1, const GLfloat *v2)
Definition: qgl_win.c:2138
logTexCoord1fv
static void APIENTRY logTexCoord1fv(const GLfloat *v)
Definition: qgl_win.c:2245
logGenTextures
static void APIENTRY logGenTextures(GLsizei n, GLuint *textures)
Definition: qgl_win.c:1319
oldrefdef_t::xOrigin
float xOrigin
Definition: r_local.h:135
logCallLists
static void APIENTRY logCallLists(GLsizei n, GLenum type, const void *lists)
Definition: qgl_win.c:805
entity_s::skinnum
int skinnum
Definition: ref.h:70
logTexCoord1i
static void APIENTRY logTexCoord1i(GLint s)
Definition: qgl_win.c:2250
VectorClear
#define VectorClear(a)
Definition: q_shared.h:166
i
int i
Definition: q_shared.c:305
msurface_s::numedges
int numedges
Definition: r_model.h:104
logRasterPos3dv
static void APIENTRY logRasterPos3dv(const GLdouble *v)
Definition: qgl_win.c:2034
modelorg
vec3_t modelorg
Definition: r_bsp.c:29
gl_alpha_modes
gltmode_t gl_alpha_modes[]
Definition: gl_image.c:188
logMap2f
static void APIENTRY logMap2f(GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, const GLfloat *points)
Definition: qgl_win.c:1719
msurface_s::dlightframe
int dlightframe
Definition: r_model.h:97
c_alias_polys
int c_alias_polys
Definition: gl_rmain.c:55
logNormal3iv
static void APIENTRY logNormal3iv(const GLint *v)
Definition: qgl_win.c:1834
gammatable
static unsigned char gammatable[256]
Definition: gl_image.c:29
gl_particle_att_a
cvar_t * gl_particle_att_a
Definition: gl_rmain.c:99
glwstate_t::log_fp
FILE * log_fp
Definition: glw_win.h:43
logIsList
static GLboolean APIENTRY logIsList(GLuint list)
Definition: qgl_win.c:1593
logGetMapfv
static void APIENTRY logGetMapfv(GLenum target, GLenum query, GLfloat *v)
Definition: qgl_win.c:1379
GL_DrawAliasShadow
void GL_DrawAliasShadow(dmdl_t *paliashdr, int posenum)
Definition: gl_mesh.c:306
logRectf
static void APIENTRY logRectf(GLfloat x1, GLfloat y1, GLfloat x2, GLfloat y2)
Definition: qgl_win.c:2132
mleaf_s::visframe
int visframe
Definition: r_model.h:147
logTexCoord1sv
static void APIENTRY logTexCoord1sv(const GLshort *v)
Definition: qgl_win.c:2265
mnode_s::parent
struct mnode_s * parent
Definition: r_model.h:131
NUM_GL_ALPHA_MODES
#define NUM_GL_ALPHA_MODES
Definition: gl_image.c:197
sw_lockpvs
cvar_t * sw_lockpvs
Definition: r_main.c:148
logRasterPos3s
static void APIENTRY logRasterPos3s(GLshort x, GLshort y, GLshort z)
Definition: qgl_win.c:2059
mnode_s
Definition: r_model.h:123
logLoadMatrixd
static void APIENTRY logLoadMatrixd(const GLdouble *m)
Definition: qgl_win.c:1677
logCopyTexImage2D
static void APIENTRY logCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
Definition: qgl_win.c:1062
logGetMapdv
static void APIENTRY logGetMapdv(GLenum target, GLenum query, GLdouble *v)
Definition: qgl_win.c:1373
buffer
GLenum GLfloat * buffer
Definition: qgl_win.c:151
logRenderMode
static GLint APIENTRY logRenderMode(GLenum mode)
Definition: qgl_win.c:2163
r_drawworld
cvar_t * r_drawworld
Definition: r_main.c:134
glpoly_s::next
struct glpoly_s * next
Definition: gl_model.h:88
logVertex2i
static void APIENTRY logVertex2i(GLint x, GLint y)
Definition: qgl_win.c:2527
PITCH
#define PITCH
Definition: q_shared.h:72
r_aliasuvscale
float r_aliasuvscale
Definition: r_main.c:56
logGetTexImage
static void APIENTRY logGetTexImage(GLenum target, GLint level, GLenum format, GLenum type, void *pixels)
Definition: qgl_win.c:1469
logRasterPos2sv
static void APIENTRY logRasterPos2sv(const GLshort *v)
Definition: qgl_win.c:2024
upload_width
int upload_width
Definition: gl_image.c:965
dlight_t::origin
vec3_t origin
Definition: ref.h:84
logRasterPos4d
static void APIENTRY logRasterPos4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
Definition: qgl_win.c:2069
refimport_t::Cvar_Set
cvar_t *(* Cvar_Set)(char *name, char *value)
Definition: ref.h:217
pointcolor
vec3_t pointcolor
Definition: r_light.c:116
r_origin
vec3_t r_origin
Definition: r_main.c:75
logRasterPos2iv
static void APIENTRY logRasterPos2iv(const GLint *v)
Definition: qgl_win.c:2014
refdef_t::rdflags
int rdflags
Definition: ref.h:110
logTexCoord2s
static void APIENTRY logTexCoord2s(GLshort s, GLshort t)
Definition: qgl_win.c:2301
logTexCoord4fv
static void APIENTRY logTexCoord4fv(const GLfloat *v)
Definition: qgl_win.c:2366
logRasterPos4iv
static void APIENTRY logRasterPos4iv(const GLint *v)
Definition: qgl_win.c:2094
GL_Upload32
qboolean GL_Upload32(unsigned *data, int width, int height, qboolean mipmap)
Definition: gl_image.c:968
SWimp_Shutdown
void SWimp_Shutdown(void)
Definition: rw_imp.c:274
gl_texture0
int gl_texture0
Definition: gl_rmain.c:35
logColorPointer
static void APIENTRY logColorPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
Definition: qgl_win.c:1044
width
GLint GLsizei width
Definition: qgl_win.c:115
R_TextureAnimation
image_t * R_TextureAnimation(mtexinfo_t *tex)
Definition: gl_rsurf.c:84
logEvalCoord1dv
static void APIENTRY logEvalCoord1dv(const GLdouble *u)
Definition: qgl_win.c:1200
mnode_s::children
struct mnode_s * children[2]
Definition: r_model.h:135
logDrawElements
static void APIENTRY logDrawElements(GLenum mode, GLsizei count, GLenum type, const void *indices)
Definition: qgl_win.c:1140
logPixelZoom
static void APIENTRY logPixelZoom(GLfloat xfactor, GLfloat yfactor)
Definition: qgl_win.c:1905
logMapGrid1f
static void APIENTRY logMapGrid1f(GLint un, GLfloat u1, GLfloat u2)
Definition: qgl_win.c:1731
entity_s::flags
int flags
Definition: ref.h:76
pcx_t::hres
unsigned short hres
Definition: qfiles.h:67
r_alpha_surfaces
msurface_t * r_alpha_surfaces
Definition: r_poly.c:47
logRasterPos4sv
static void APIENTRY logRasterPos4sv(const GLshort *v)
Definition: qgl_win.c:2104
logTexGenfv
static void APIENTRY logTexGenfv(GLenum coord, GLenum pname, const GLfloat *params)
Definition: qgl_win.c:2437
vid_gamma
cvar_t * vid_gamma
Definition: r_main.c:145
M_PI
#define M_PI
Definition: q_shared.h:142
gl_nobind
cvar_t * gl_nobind
Definition: gl_rmain.c:119
image_s::registration_sequence
int registration_sequence
Definition: r_local.h:77
currententity
entity_t * currententity
Definition: r_bsp.c:28
logRasterPos3d
static void APIENTRY logRasterPos3d(GLdouble x, GLdouble y, GLdouble z)
Definition: qgl_win.c:2029
SURF_WARP
#define SURF_WARP
Definition: qfiles.h:372
logTexCoord4iv
static void APIENTRY logTexCoord4iv(const GLint *v)
Definition: qgl_win.c:2376
logArrayElement
static void APIENTRY logArrayElement(GLint i)
Definition: qgl_win.c:769
type
GLenum type
Definition: qgl_win.c:72
logRectiv
static void APIENTRY logRectiv(const GLint *v1, const GLint *v2)
Definition: qgl_win.c:2148
logFogi
static void APIENTRY logFogi(GLenum pname, GLint param)
Definition: qgl_win.c:1289
logIndexd
static void APIENTRY logIndexd(GLdouble c)
Definition: qgl_win.c:1516
logTexCoord1d
static void APIENTRY logTexCoord1d(GLdouble s)
Definition: qgl_win.c:2228
oldrefdef_t::yOrigin
float yOrigin
Definition: r_local.h:136
mplane_s::normal
vec3_t normal
Definition: r_model.h:59
logClearAccum
static void APIENTRY logClearAccum(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
Definition: qgl_win.c:817
msurface_s::extents
short extents[2]
Definition: r_model.h:110
logTexCoord4sv
static void APIENTRY logTexCoord4sv(const GLshort *v)
Definition: qgl_win.c:2386
uploaded_paletted
qboolean uploaded_paletted
Definition: gl_image.c:966
logColor3ui
static void APIENTRY logColor3ui(GLuint red, GLuint green, GLuint blue)
Definition: qgl_win.c:927
skip
static void skip(vorb *z, int n)
Definition: stb_vorbis.c:1336
cvar_s
Definition: q_shared.h:324
logNewList
static void APIENTRY logNewList(GLuint list, GLenum mode)
Definition: qgl_win.c:1788
logBlendFunc
static void APIENTRY logBlendFunc(GLenum sfactor, GLenum dfactor)
Definition: qgl_win.c:793
logTexGenf
static void APIENTRY logTexGenf(GLenum coord, GLenum pname, GLfloat param)
Definition: qgl_win.c:2432
msurface_s::cached_light
float cached_light[MAXLIGHTMAPS]
Definition: gl_model.h:123
R_MarkLights
void R_MarkLights(dlight_t *light, int bit, mnode_t *node)
Definition: r_light.c:40
NUM_GL_SOLID_MODES
#define NUM_GL_SOLID_MODES
Definition: gl_image.c:211
logLightModeliv
static void APIENTRY logLightModeliv(GLenum pname, const GLint *params)
Definition: qgl_win.c:1623
glmode_t::minimize
int minimize
Definition: gl_image.c:168
logTexGeniv
static void APIENTRY logTexGeniv(GLenum coord, GLenum pname, const GLint *params)
Definition: qgl_win.c:2447
intensity
cvar_t * intensity
Definition: gl_image.c:31
mleaf_s
Definition: r_model.h:143
R_MarkLights
void R_MarkLights(dlight_t *light, int bit, mnode_t *node)
Definition: gl_light.c:118
logColor4uiv
static void APIENTRY logColor4uiv(const GLuint *v)
Definition: qgl_win.c:1018
logDepthRange
static void APIENTRY logDepthRange(GLclampd zNear, GLclampd zFar)
Definition: qgl_win.c:1110
r_avertexnormal_dots
float r_avertexnormal_dots[SHADEDOT_QUANT][256]
Definition: gl_mesh.c:48
SURF_TRANS66
#define SURF_TRANS66
Definition: qfiles.h:374
r_lefthand
cvar_t * r_lefthand
Definition: r_main.c:117
model_s::extradata
void * extradata
Definition: r_model.h:235
GL_TextureSolidMode
void GL_TextureSolidMode(char *string)
Definition: gl_image.c:279
logEvalCoord1f
static void APIENTRY logEvalCoord1f(GLfloat u)
Definition: qgl_win.c:1206
R_RenderDlight
void R_RenderDlight(dlight_t *light)
Definition: gl_light.c:36
logNormal3f
static void APIENTRY logNormal3f(GLfloat nx, GLfloat ny, GLfloat nz)
Definition: qgl_win.c:1818
refimport_t::FS_FreeFile
void(* FS_FreeFile)(void *buf)
Definition: ref.h:210
r_worldmodel
model_t * r_worldmodel
Definition: gl_rmain.c:37
j
GLint j
Definition: qgl_win.c:150
logVertex3dv
static void APIENTRY logVertex3dv(const GLdouble *v)
Definition: qgl_win.c:2552
gl_solid_modes
gltmode_t gl_solid_modes[]
Definition: gl_image.c:199
imagetype_t
imagetype_t
Definition: gl_local.h:78
logScaled
static void APIENTRY logScaled(GLdouble x, GLdouble y, GLdouble z)
Definition: qgl_win.c:2180
Draw_GetPalette
void Draw_GetPalette(void)
Definition: r_main.c:1423
R_FloodFillSkin
void R_FloodFillSkin(byte *skin, int skinwidth, int skinheight)
Definition: gl_image.c:773
logTexCoord2fv
static void APIENTRY logTexCoord2fv(const GLfloat *v)
Definition: qgl_win.c:2286
gl_filter_min
int gl_filter_min
Definition: gl_image.c:45
logPolygonStipple
static void APIENTRY logPolygonStipple(const GLubyte *mask)
Definition: qgl_win.c:1928
r_norefresh
cvar_t * r_norefresh
Definition: gl_rmain.c:79
logTexCoord2i
static void APIENTRY logTexCoord2i(GLint s, GLint t)
Definition: qgl_win.c:2291
logPushAttrib
static void APIENTRY logPushAttrib(GLbitfield mask)
Definition: qgl_win.c:1963
it_pic
@ it_pic
Definition: gl_local.h:83
mvertex_t::position
vec3_t position
Definition: r_model.h:47
logPolygonOffset
static void APIENTRY logPolygonOffset(GLfloat factor, GLfloat units)
Definition: qgl_win.c:1923
logNormal3s
static void APIENTRY logNormal3s(GLshort nx, GLshort ny, GLshort nz)
Definition: qgl_win.c:1839
gl_texturemode
cvar_t * gl_texturemode
Definition: gl_rmain.c:133
gl_tex_alpha_format
int gl_tex_alpha_format
Definition: gl_image.c:43
logMatrixMode
static void APIENTRY logMatrixMode(GLenum mode)
Definition: qgl_win.c:1770
Mod_FreeAll
void Mod_FreeAll(void)
Definition: r_model.c:1324
refimport_t::Vid_GetModeInfo
qboolean(* Vid_GetModeInfo)(int *width, int *height, int mode)
Definition: ref.h:220
logCullFace
static void APIENTRY logCullFace(GLenum mode)
Definition: qgl_win.c:1080
logClearStencil
static void APIENTRY logClearStencil(GLint s)
Definition: qgl_win.c:841
logColor3dv
static void APIENTRY logColor3dv(const GLdouble *v)
Definition: qgl_win.c:871
r_dlightframecount
int r_dlightframecount
Definition: gl_light.c:24
skyrotate
float skyrotate
Definition: gl_warp.c:27
r_refdef
oldrefdef_t r_refdef
Definition: r_main.c:80
dsprite_t
Definition: qfiles.h:181
AngleVectors
void AngleVectors(vec3_t angles, vec3_t forward, vec3_t right, vec3_t up)
Definition: q_shared.c:93
glpoly_s::numverts
int numverts
Definition: gl_model.h:90
RF_WEAPONMODEL
#define RF_WEAPONMODEL
Definition: q_shared.h:601
logNormal3sv
static void APIENTRY logNormal3sv(const GLshort *v)
Definition: qgl_win.c:1844
logPixelStorei
static void APIENTRY logPixelStorei(GLenum pname, GLint param)
Definition: qgl_win.c:1888
gltextures
image_t gltextures[MAX_GLTEXTURES]
Definition: gl_image.c:24
Draw_InitRGBMap
void Draw_InitRGBMap(void)
Definition: r_draw.c:174
logVertex4s
static void APIENTRY logVertex4s(GLshort x, GLshort y, GLshort z, GLshort w)
Definition: qgl_win.c:2617
refimport_t::Con_Printf
void(* Con_Printf)(int print_level, char *str,...)
Definition: ref.h:202
u
static int u
Definition: r_part.c:472
PRINT_ALL
#define PRINT_ALL
Definition: qcommon.h:751
R_SetFrustum
void R_SetFrustum(void)
Definition: gl_rmain.c:571
logRasterPos3i
static void APIENTRY logRasterPos3i(GLint x, GLint y, GLint z)
Definition: qgl_win.c:2049
R_DrawInlineBModel
void R_DrawInlineBModel(void)
Definition: gl_rsurf.c:880
pcx_t::ymin
unsigned short ymin
Definition: qfiles.h:66
logRasterPos3iv
static void APIENTRY logRasterPos3iv(const GLint *v)
Definition: qgl_win.c:2054
gl_drawbuffer
cvar_t * gl_drawbuffer
Definition: gl_rmain.c:111
GL_EnableMultitexture
void GL_EnableMultitexture(qboolean enable)
Definition: gl_image.c:71
RDF_NOWORLDMODEL
#define RDF_NOWORLDMODEL
Definition: q_shared.h:622
logGenLists
static GLuint APIENTRY logGenLists(GLsizei range)
Definition: qgl_win.c:1313
logLightf
static void APIENTRY logLightf(GLenum light, GLenum pname, GLfloat param)
Definition: qgl_win.c:1629
skymaxs
float skymaxs[2][6]
Definition: gl_warp.c:302
NUM_BEAM_SEGS
#define NUM_BEAM_SEGS
logTexCoord3dv
static void APIENTRY logTexCoord3dv(const GLdouble *v)
Definition: qgl_win.c:2316
logTexSubImage1D
static void APIENTRY logTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels)
Definition: qgl_win.c:2484
TEXNUM_IMAGES
#define TEXNUM_IMAGES
Definition: gl_local.h:105
logScissor
static void APIENTRY logScissor(GLint x, GLint y, GLsizei width, GLsizei height)
Definition: qgl_win.c:2192
logTexCoord3i
static void APIENTRY logTexCoord3i(GLint s, GLint t, GLint r)
Definition: qgl_win.c:2331
SHADEDOT_QUANT
#define SHADEDOT_QUANT
Definition: gl_mesh.c:47
image_s::scrap
qboolean scrap
Definition: gl_local.h:97
skin
cvar_t * skin
Definition: cl_main.c:80
D_FlushCaches
void D_FlushCaches(void)
Definition: r_surf.c:481
logCallList
static void APIENTRY logCallList(GLuint list)
Definition: qgl_win.c:799
logPopMatrix
static void APIENTRY logPopMatrix(void)
Definition: qgl_win.c:1945
Draw_InitLocal
void Draw_InitLocal(void)
Definition: r_draw.c:222
logPassThrough
static void APIENTRY logPassThrough(GLfloat token)
Definition: qgl_win.c:1860
logIndexf
static void APIENTRY logIndexf(GLfloat c)
Definition: qgl_win.c:1528
numleafs
int numleafs
Definition: cmodel.c:77
gl_texturealphamode
cvar_t * gl_texturealphamode
Definition: gl_rmain.c:134
logRasterPos4i
static void APIENTRY logRasterPos4i(GLint x, GLint y, GLint z, GLint w)
Definition: qgl_win.c:2089
logLineWidth
static void APIENTRY logLineWidth(GLfloat width)
Definition: qgl_win.c:1659
it_pic
@ it_pic
Definition: r_local.h:67
shadedots
float * shadedots
Definition: gl_mesh.c:52
logHint
static void APIENTRY logHint(GLenum target, GLenum mode)
Definition: qgl_win.c:1498
R_BlendLightmaps
void R_BlendLightmaps(void)
Definition: gl_rsurf.c:316
entity_s::alpha
float alpha
Definition: ref.h:73
viddef_t::rowbytes
int rowbytes
Definition: r_local.h:97
logTexCoord3d
static void APIENTRY logTexCoord3d(GLdouble s, GLdouble t, GLdouble r)
Definition: qgl_win.c:2311
rserr_invalid_fullscreen
@ rserr_invalid_fullscreen
Definition: gl_local.h:115
vid_fullscreen
cvar_t * vid_fullscreen
Definition: r_main.c:144
r
GLdouble GLdouble r
Definition: qgl_win.c:336
gltmode_t::mode
int mode
Definition: gl_image.c:185
dvis_t::numclusters
int numclusters
Definition: qfiles.h:465
mplane_s::dist
float dist
Definition: r_model.h:60
R_BuildPolygonFromSurface
void R_BuildPolygonFromSurface(msurface_t *fa)
Definition: r_poly.c:1160
image_s::height
int height
Definition: r_local.h:75
viddef_t::width
unsigned width
Definition: vid.h:29
logLoadMatrixf
static void APIENTRY logLoadMatrixf(const GLfloat *m)
Definition: qgl_win.c:1683
R_DrawTriangleOutlines
void R_DrawTriangleOutlines(void)
Definition: gl_rsurf.c:231
Draw_StretchPicImplementation
void Draw_StretchPicImplementation(int x, int y, int w, int h, image_t *pic)
Definition: r_draw.c:342
logVertex3fv
static void APIENTRY logVertex3fv(const GLfloat *v)
Definition: qgl_win.c:2562
r_lerpmodels
cvar_t * r_lerpmodels
Definition: r_main.c:138
logIndexs
static void APIENTRY logIndexs(GLshort c)
Definition: qgl_win.c:1552
HDC
HDC(WINAPI *qwglGetCurrentDC)(VOID)
R_InitTextures
void R_InitTextures(void)
Definition: r_main.c:211
logPrioritizeTextures
static void APIENTRY logPrioritizeTextures(GLsizei n, const GLuint *textures, const GLclampf *priorities)
Definition: qgl_win.c:1957
clipplane_s::leftedge
byte leftedge
Definition: r_local.h:383
refdef_t::num_dlights
int num_dlights
Definition: ref.h:119
logIndexiv
static void APIENTRY logIndexiv(const GLint *c)
Definition: qgl_win.c:1546
logColor4b
static void APIENTRY logColor4b(GLbyte red, GLbyte green, GLbyte blue, GLbyte alpha)
Definition: qgl_win.c:951
R_ClearSkyBox
void R_ClearSkyBox(void)
Definition: gl_warp.c:508
clipplane_s::rightedge
byte rightedge
Definition: r_local.h:384
logEnable
static void APIENTRY logEnable(GLenum cap)
Definition: qgl_win.c:1170
intensitytable
static byte intensitytable[256]
Definition: gl_image.c:28
logTexGeni
static void APIENTRY logTexGeni(GLenum coord, GLenum pname, GLint param)
Definition: qgl_win.c:2442
logTexCoord3iv
static void APIENTRY logTexCoord3iv(const GLint *v)
Definition: qgl_win.c:2336
logFogf
static void APIENTRY logFogf(GLenum pname, GLfloat param)
Definition: qgl_win.c:1277
logCopyTexSubImage1D
static void APIENTRY logCopyTexSubImage1D(GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width)
Definition: qgl_win.c:1068
logVertex4d
static void APIENTRY logVertex4d(GLdouble x, GLdouble y, GLdouble z, GLdouble w)
Definition: qgl_win.c:2587
logGetTexLevelParameterfv
static void APIENTRY logGetTexLevelParameterfv(GLenum target, GLint level, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1474
forward
static vec3_t forward
Definition: p_view.c:29
logColor3b
static void APIENTRY logColor3b(GLbyte red, GLbyte green, GLbyte blue)
Definition: qgl_win.c:853
logVertex3f
static void APIENTRY logVertex3f(GLfloat x, GLfloat y, GLfloat z)
Definition: qgl_win.c:2557
particle_t::alpha
float alpha
Definition: ref.h:93
RF_DEPTHHACK
#define RF_DEPTHHACK
Definition: q_shared.h:603
R_GammaCorrectAndSetPalette
void R_GammaCorrectAndSetPalette(const unsigned char *palette)
Definition: r_main.c:1257
logDeleteTextures
static void APIENTRY logDeleteTextures(GLsizei n, const GLuint *textures)
Definition: qgl_win.c:1092
rserr_invalid_mode
@ rserr_invalid_mode
Definition: r_local.h:108
PerpendicularVector
void PerpendicularVector(vec3_t dst, const vec3_t src)
Definition: q_shared.c:152
glwstate_t::hGLRC
HGLRC hGLRC
Definition: glw_win.h:35
VectorLength
vec_t VectorLength(vec3_t v)
Definition: q_shared.c:762
glwstate_t::hWnd
HWND hWnd
Definition: glw_win.h:33
logTexCoord2d
static void APIENTRY logTexCoord2d(GLdouble s, GLdouble t)
Definition: qgl_win.c:2270
msurface_s::texinfo
mtexinfo_t * texinfo
Definition: r_model.h:112
model_s::leafs
mleaf_t * leafs
Definition: r_model.h:205
logGetTexLevelParameteriv
static void APIENTRY logGetTexLevelParameteriv(GLenum target, GLint level, GLenum pname, GLint *params)
Definition: qgl_win.c:1480
logRasterPos3f
static void APIENTRY logRasterPos3f(GLfloat x, GLfloat y, GLfloat z)
Definition: qgl_win.c:2039
t
GLdouble t
Definition: qgl_win.c:328
model_s::nodes
mnode_t * nodes
Definition: r_model.h:215
RDF_IRGOGGLES
#define RDF_IRGOGGLES
Definition: q_shared.h:625
logColor4ui
static void APIENTRY logColor4ui(GLuint red, GLuint green, GLuint blue, GLuint alpha)
Definition: qgl_win.c:1013
Q_ftol
long Q_ftol(float f)
min
#define min(a, b)
Definition: vk_local.h:72
logSelectBuffer
static void APIENTRY logSelectBuffer(GLsizei size, GLuint *buffer)
Definition: qgl_win.c:2198
model_s::mins
vec3_t mins
Definition: r_model.h:185
mleaf_s::cluster
int cluster
Definition: r_model.h:154
logDrawPixels
static void APIENTRY logDrawPixels(GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
Definition: qgl_win.c:1146
image_s::texnum
int texnum
Definition: gl_local.h:95
ri
refimport_t ri
Definition: gl_rmain.c:33
r_origin
vec3_t r_origin
Definition: gl_rmain.c:67
logColorMask
static void APIENTRY logColorMask(GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha)
Definition: qgl_win.c:1033
logMaterialf
static void APIENTRY logMaterialf(GLenum face, GLenum pname, GLfloat param)
Definition: qgl_win.c:1747
refimport_t::Sys_Error
void(* Sys_Error)(int err_level, char *str,...)
Definition: ref.h:194
logGetPixelMapuiv
static void APIENTRY logGetPixelMapuiv(GLenum map, GLuint *values)
Definition: qgl_win.c:1409
GL_Bind
void GL_Bind(int texnum)
Definition: gl_image.c:137
R_SetupGL
void R_SetupGL(void)
Definition: gl_rmain.c:705
entity_s::oldframe
int oldframe
Definition: ref.h:64
glwstate_t::hInstance
HINSTANCE hInstance
Definition: glw_win.h:29
logIndexi
static void APIENTRY logIndexi(GLint c)
Definition: qgl_win.c:1540
dlight_t::color
vec3_t color
Definition: ref.h:85
logFrontFace
static void APIENTRY logFrontFace(GLenum mode)
Definition: qgl_win.c:1301
logIndexfv
static void APIENTRY logIndexfv(const GLfloat *c)
Definition: qgl_win.c:1534
logRectdv
static void APIENTRY logRectdv(const GLdouble *v1, const GLdouble *v2)
Definition: qgl_win.c:2126
logTexParameterf
static void APIENTRY logTexParameterf(GLenum target, GLenum pname, GLfloat param)
Definition: qgl_win.c:2463
R_CullAliasModel
static qboolean R_CullAliasModel(vec3_t bbox[8], entity_t *e)
Definition: gl_mesh.c:373
logColor4sv
static void APIENTRY logColor4sv(const GLshort *v)
Definition: qgl_win.c:998
RF_SHELL_DOUBLE
#define RF_SHELL_DOUBLE
Definition: q_shared.h:615
glmode_t::maximize
int maximize
Definition: gl_image.c:168
SURF_FLOWING
#define SURF_FLOWING
Definition: qfiles.h:375
logPixelMapuiv
static void APIENTRY logPixelMapuiv(GLenum map, GLsizei mapsize, const GLuint *values)
Definition: qgl_win.c:1872
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:38
DotProduct
#define DotProduct(x, y)
Definition: q_shared.h:162
viddef_t::height
unsigned height
Definition: vid.h:29
SURF_TRANS33
#define SURF_TRANS33
Definition: qfiles.h:373
logColor4usv
static void APIENTRY logColor4usv(const GLushort *v)
Definition: qgl_win.c:1028
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:41
logTexCoord2sv
static void APIENTRY logTexCoord2sv(const GLshort *v)
Definition: qgl_win.c:2306
msurface_s::lightmapchain
struct msurface_s * lightmapchain
Definition: gl_model.h:113
logMap1d
static void APIENTRY logMap1d(GLenum target, GLdouble u1, GLdouble u2, GLint stride, GLint order, const GLdouble *points)
Definition: qgl_win.c:1701
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:41
pcx_t::ymax
unsigned short ymax
Definition: qfiles.h:66
logPolygonMode
static void APIENTRY logPolygonMode(GLenum face, GLenum mode)
Definition: qgl_win.c:1917
cvar_s::value
float value
Definition: q_shared.h:331
logVertex4dv
static void APIENTRY logVertex4dv(const GLdouble *v)
Definition: qgl_win.c:2592
entity_s::backlerp
float backlerp
Definition: ref.h:69
r_particletexture
image_t * r_particletexture
Definition: gl_rmain.c:45
logClearColor
static void APIENTRY logClearColor(GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha)
Definition: qgl_win.c:823
GL_Upload8
qboolean GL_Upload8(byte *data, int width, int height, qboolean mipmap, qboolean is_sky)
Definition: gl_image.c:1177
logVertex4f
static void APIENTRY logVertex4f(GLfloat x, GLfloat y, GLfloat z, GLfloat w)
Definition: qgl_win.c:2597
logIsEnabled
static GLboolean APIENTRY logIsEnabled(GLenum cap)
Definition: qgl_win.c:1588
MAX_GLTEXTURES
#define MAX_GLTEXTURES
Definition: gl_local.h:107
glwstate_t::monInfo
MONITORINFOEX monInfo
Definition: glw_win.h:34
MAX_OSPATH
#define MAX_OSPATH
Definition: q_shared.h:81
R_UnRegister
void R_UnRegister(void)
Definition: r_main.c:314
XCENTERING
#define XCENTERING
Definition: r_local.h:223
model_s::lightdata
byte * lightdata
Definition: r_model.h:231
R_ClipAndDrawPoly
void R_ClipAndDrawPoly(float alpha, int isturbulent, qboolean textured)
Definition: r_poly.c:1048
gl_lightmap
cvar_t * gl_lightmap
Definition: gl_rmain.c:113
logColor4bv
static void APIENTRY logColor4bv(const GLbyte *v)
Definition: qgl_win.c:957
logLighti
static void APIENTRY logLighti(GLenum light, GLenum pname, GLint param)
Definition: qgl_win.c:1641
image_s::type
imagetype_t type
Definition: r_local.h:74
Mod_Init
void Mod_Init(void)
Definition: r_model.c:78
logVertex3sv
static void APIENTRY logVertex3sv(const GLshort *v)
Definition: qgl_win.c:2582
logInitNames
static void APIENTRY logInitNames(void)
Definition: qgl_win.c:1576
it_skin
@ it_skin
Definition: gl_local.h:80
logTranslatef
static void APIENTRY logTranslatef(GLfloat x, GLfloat y, GLfloat z)
Definition: qgl_win.c:2500
logTexEnvf
static void APIENTRY logTexEnvf(GLenum target, GLenum pname, GLfloat param)
Definition: qgl_win.c:2397
refimport_t::FS_Gamedir
char *(* FS_Gamedir)(void)
Definition: ref.h:214
SURF_DRAWTURB
#define SURF_DRAWTURB
Definition: r_model.h:70
DrawGLFlowingPoly
void DrawGLFlowingPoly(msurface_t *fa)
Definition: gl_rsurf.c:203
VectorNormalize
vec_t VectorNormalize(vec3_t v)
Definition: q_shared.c:681
F
#define F(X, Y, Z)
Definition: md4.c:13
logDrawBuffer
static void APIENTRY logDrawBuffer(GLenum mode)
Definition: qgl_win.c:1134
pcx_t::encoding
char encoding
Definition: qfiles.h:64
gl_bitdepth
cvar_t * gl_bitdepth
Definition: gl_rmain.c:110
NULL
#define NULL
Definition: q_shared.h:67
logOrtho
static void APIENTRY logOrtho(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
Definition: qgl_win.c:1854
logGetMaterialfv
static void APIENTRY logGetMaterialfv(GLenum face, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1391
logVertex2fv
static void APIENTRY logVertex2fv(const GLfloat *v)
Definition: qgl_win.c:2522
glwstate_t::allowdisplaydepthchange
qboolean allowdisplaydepthchange
Definition: glw_win.h:40
logColor4iv
static void APIENTRY logColor4iv(const GLint *v)
Definition: qgl_win.c:988
refdef_t::time
float time
Definition: ref.h:109
logTexCoord2dv
static void APIENTRY logTexCoord2dv(const GLdouble *v)
Definition: qgl_win.c:2276
r_viewcluster
int r_viewcluster
Definition: r_main.c:108
rserr_invalid_mode
@ rserr_invalid_mode
Definition: gl_local.h:116
SWimp_SetMode
rserr_t SWimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
Definition: rw_imp.c:189
glstate_t::inverse_intensity
float inverse_intensity
Definition: gl_local.h:409
logClearIndex
static void APIENTRY logClearIndex(GLfloat c)
Definition: qgl_win.c:835
model_s::surfedges
int * surfedges
Definition: r_model.h:224
logDrawArrays
static void APIENTRY logDrawArrays(GLenum mode, GLint first, GLsizei count)
Definition: qgl_win.c:1128
dottexture
byte dottexture[8][8]
Definition: gl_rmisc.c:29
logGetError
static GLenum APIENTRY logGetError(void)
Definition: qgl_win.c:1343
rserr_ok
@ rserr_ok
Definition: gl_local.h:113
gl_flashblend
cvar_t * gl_flashblend
Definition: gl_rmain.c:129
image_s::pixels
byte * pixels[4]
Definition: r_local.h:78
logGetLightiv
static void APIENTRY logGetLightiv(GLenum light, GLenum pname, GLint *params)
Definition: qgl_win.c:1367
TURBSCALE
#define TURBSCALE
Definition: gl_warp.c:202
logColor4s
static void APIENTRY logColor4s(GLshort red, GLshort green, GLshort blue, GLshort alpha)
Definition: qgl_win.c:993
logDepthFunc
static void APIENTRY logDepthFunc(GLenum func)
Definition: qgl_win.c:1098
image_s::width
int width
Definition: r_local.h:75
logTexCoord3s
static void APIENTRY logTexCoord3s(GLshort s, GLshort t, GLshort r)
Definition: qgl_win.c:2341
logTexSubImage2D
static void APIENTRY logTexSubImage2D(GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels)
Definition: qgl_win.c:2489
RF_GLOW
#define RF_GLOW
Definition: q_shared.h:608
logColor3bv
static void APIENTRY logColor3bv(const GLbyte *v)
Definition: qgl_win.c:859
logRasterPos2f
static void APIENTRY logRasterPos2f(GLfloat x, GLfloat y)
Definition: qgl_win.c:1999
GL_DISTANCE_ATTENUATION_EXT
#define GL_DISTANCE_ATTENUATION_EXT
Definition: qgl.h:471
modes
glmode_t modes[]
Definition: gl_image.c:171
GL_SetTexturePalette
void GL_SetTexturePalette(unsigned palette[256])
Definition: gl_image.c:48
thepalette
byte * thepalette
Definition: r_main.c:33
logGetPixelMapfv
static void APIENTRY logGetPixelMapfv(GLenum map, GLfloat *values)
Definition: qgl_win.c:1403
image_s::tl
float tl
Definition: gl_local.h:96
particle_t
Definition: ref.h:89
it_sky
@ it_sky
Definition: gl_local.h:84
pcx_t::palette_type
unsigned short palette_type
Definition: qfiles.h:72
upload_height
int upload_height
Definition: gl_image.c:965
alpha
GLfloat GLfloat GLfloat alpha
Definition: qgl_win.c:74
refdef_t::height
int height
Definition: ref.h:104
ClipSkyPolygon
void ClipSkyPolygon(int nump, vec3_t vecs, int stage)
Definition: gl_warp.c:389
image_s::name
char name[MAX_QPATH]
Definition: r_local.h:73
logRasterPos2s
static void APIENTRY logRasterPos2s(GLshort x, GLshort y)
Definition: qgl_win.c:2019
logTexParameteri
static void APIENTRY logTexParameteri(GLenum target, GLenum pname, GLint param)
Definition: qgl_win.c:2474
image_s::transparent
qboolean transparent
Definition: r_local.h:76
logReadPixels
static void APIENTRY logReadPixels(GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels)
Definition: qgl_win.c:2114
MAX_MD2SKINS
#define MAX_MD2SKINS
Definition: qfiles.h:92
logGetTexParameterfv
static void APIENTRY logGetTexParameterfv(GLenum target, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1486
ERR_DROP
#define ERR_DROP
Definition: qcommon.h:744
MYgluPerspective
void MYgluPerspective(GLdouble fovy, GLdouble aspect, GLdouble zNear, GLdouble zFar)
Definition: gl_rmain.c:682
logPopAttrib
static void APIENTRY logPopAttrib(void)
Definition: qgl_win.c:1933
dsprite_t::frames
dsprframe_t frames[1]
Definition: qfiles.h:185
logEvalCoord1fv
static void APIENTRY logEvalCoord1fv(const GLfloat *u)
Definition: qgl_win.c:1212
RecursiveLightPoint
int RecursiveLightPoint(mnode_t *node, vec3_t start, vec3_t end)
Definition: r_light.c:120
Q_stricmp
int Q_stricmp(char *s1, char *s2)
Definition: q_shared.c:1180
it_skin
@ it_skin
Definition: r_local.h:64
logTexImage1D
static void APIENTRY logTexImage1D(GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels)
Definition: qgl_win.c:2452
logColor3ub
static void APIENTRY logColor3ub(GLubyte red, GLubyte green, GLubyte blue)
Definition: qgl_win.c:913
GL_DrawAliasFrameLerp
void GL_DrawAliasFrameLerp(dmdl_t *paliashdr, float backlerp)
Definition: gl_mesh.c:90
d_pzbuffer
short * d_pzbuffer
Definition: r_main.c:197
gl_filter_max
int gl_filter_max
Definition: gl_image.c:46
pcx_t::bits_per_pixel
char bits_per_pixel
Definition: qfiles.h:65
r_lightlevel
cvar_t * r_lightlevel
Definition: r_main.c:142
dsprframe_t::width
int width
Definition: qfiles.h:176
particle_t::origin
vec3_t origin
Definition: ref.h:91
logLightModelf
static void APIENTRY logLightModelf(GLenum pname, GLfloat param)
Definition: qgl_win.c:1604
name
cvar_t * name
Definition: cl_main.c:79
logColor3f
static void APIENTRY logColor3f(GLfloat red, GLfloat green, GLfloat blue)
Definition: qgl_win.c:877
REF_VERSION
#define REF_VERSION
Definition: r_local.h:36
MAXLIGHTMAPS
#define MAXLIGHTMAPS
Definition: qfiles.h:409
R_DrawWorld
void R_DrawWorld(void)
Definition: gl_rsurf.c:1197
logPopName
static void APIENTRY logPopName(void)
Definition: qgl_win.c:1951
R_DrawSkyBox
void R_DrawSkyBox(void)
Definition: gl_warp.c:562
ERR_FATAL
#define ERR_FATAL
Definition: qcommon.h:743
msurface_s::flags
int flags
Definition: r_model.h:101
logFinish
static void APIENTRY logFinish(void)
Definition: qgl_win.c:1265
logEdgeFlag
static void APIENTRY logEdgeFlag(GLboolean flag)
Definition: qgl_win.c:1152
pcx_t::xmin
unsigned short xmin
Definition: qfiles.h:66
swstate_s::prev_mode
int prev_mode
Definition: r_local.h:881
VectorAdd
#define VectorAdd(a, b, c)
Definition: q_shared.h:164
model_s::maxs
vec3_t maxs
Definition: r_model.h:185
glconfig_t::renderer
int renderer
Definition: gl_local.h:398
s
static fixed16_t s
Definition: r_scan.c:30
model_s::radius
float radius
Definition: gl_model.h:189
logPointSize
static void APIENTRY logPointSize(GLfloat size)
Definition: qgl_win.c:1911
y
GLint y
Definition: qgl_win.c:115
logPixelTransferf
static void APIENTRY logPixelTransferf(GLenum pname, GLfloat param)
Definition: qgl_win.c:1893
logColorMaterial
static void APIENTRY logColorMaterial(GLenum face, GLenum mode)
Definition: qgl_win.c:1038
image_s::paletted
qboolean paletted
Definition: gl_local.h:100
logMateriali
static void APIENTRY logMateriali(GLenum face, GLenum pname, GLint param)
Definition: qgl_win.c:1758
sw_mode
cvar_t * sw_mode
Definition: r_main.c:125
logRasterPos2d
static void APIENTRY logRasterPos2d(GLdouble x, GLdouble y)
Definition: qgl_win.c:1987
logColor3uiv
static void APIENTRY logColor3uiv(const GLuint *v)
Definition: qgl_win.c:933
R_IMFlatShadedQuad
void R_IMFlatShadedQuad(vec3_t a, vec3_t b, vec3_t c, vec3_t d, int color, float alpha)
Definition: r_poly.c:1381
msurface_s::polys
glpoly_t * polys
Definition: gl_model.h:111
logTexCoordPointer
static void APIENTRY logTexCoordPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
Definition: qgl_win.c:2391
R_Flash
void R_Flash(void)
Definition: gl_rmain.c:806
gl_lms
static gllightmapstate_t gl_lms
Definition: gl_rsurf.c:59
r_nocull
cvar_t * r_nocull
Definition: gl_rmain.c:85
GL_RENDERER_VOODOO2
#define GL_RENDERER_VOODOO2
Definition: gl_local.h:357
logTexGendv
static void APIENTRY logTexGendv(GLenum coord, GLenum pname, const GLdouble *params)
Definition: qgl_win.c:2426
entity_s::frame
int frame
Definition: ref.h:58
logNormal3dv
static void APIENTRY logNormal3dv(const GLdouble *v)
Definition: qgl_win.c:1812
gllightmapstate_t::lightmap_surfaces
msurface_t * lightmap_surfaces[MAX_LIGHTMAPS]
Definition: gl_rsurf.c:50
logCopyTexImage1D
static void APIENTRY logCopyTexImage1D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLint border)
Definition: qgl_win.c:1056
logLoadName
static void APIENTRY logLoadName(GLuint name)
Definition: qgl_win.c:1689
logVertex3i
static void APIENTRY logVertex3i(GLint x, GLint y, GLint z)
Definition: qgl_win.c:2567
R_RecursiveWorldNode
void R_RecursiveWorldNode(mnode_t *node)
Definition: gl_rsurf.c:1036
logTranslated
static void APIENTRY logTranslated(GLdouble x, GLdouble y, GLdouble z)
Definition: qgl_win.c:2494
zFar
GLclampd zFar
Definition: qgl_win.c:125
Draw_BuildGammaTable
void Draw_BuildGammaTable(void)
Definition: r_main.c:1314
VectorCopy
#define VectorCopy(a, b)
Definition: q_shared.h:165
currentmodel
model_t * currentmodel
Definition: gl_rmain.c:48
logGetBooleanv
static void APIENTRY logGetBooleanv(GLenum pname, GLboolean *params)
Definition: qgl_win.c:1325
R_EdgeCodeStart
void R_EdgeCodeStart(void)
r_turbsin
float r_turbsin[]
Definition: gl_warp.c:198
logNormal3fv
static void APIENTRY logNormal3fv(const GLfloat *v)
Definition: qgl_win.c:1824
model_s::skins
image_t * skins[MAX_MD2SKINS]
Definition: r_model.h:234
logRasterPos3fv
static void APIENTRY logRasterPos3fv(const GLfloat *v)
Definition: qgl_win.c:2044
gl_tex_solid_format
int gl_tex_solid_format
Definition: gl_image.c:42
gl_texturesolidmode
cvar_t * gl_texturesolidmode
Definition: gl_rmain.c:135
refdef_t::lightstyles
lightstyle_t * lightstyles
Definition: ref.h:114
warpface
msurface_t * warpface
Definition: gl_warp.c:31
logColor3sv
static void APIENTRY logColor3sv(const GLshort *v)
Definition: qgl_win.c:907
logLoadIdentity
static void APIENTRY logLoadIdentity(void)
Definition: qgl_win.c:1671
R_InitTurb
void R_InitTurb(void)
Definition: r_main.c:246
logColor3ubv
static void APIENTRY logColor3ubv(const GLubyte *v)
Definition: qgl_win.c:919
logMaterialfv
static void APIENTRY logMaterialfv(GLenum face, GLenum pname, const GLfloat *params)
Definition: qgl_win.c:1752
sc_base
surfcache_t * sc_base
Definition: r_local.h:813
gl_particle_max_size
cvar_t * gl_particle_max_size
Definition: gl_rmain.c:97
image_s::upload_width
int upload_width
Definition: gl_local.h:92
GL_POINT_SIZE_MAX_EXT
#define GL_POINT_SIZE_MAX_EXT
Definition: qgl.h:469
d_8to24table
unsigned d_8to24table[256]
Definition: r_main.c:27
logTexCoord1iv
static void APIENTRY logTexCoord1iv(const GLint *v)
Definition: qgl_win.c:2255
vec3_origin
vec3_t vec3_origin
Definition: q_shared.c:24
R_RenderDlights
void R_RenderDlights(void)
Definition: gl_light.c:77
logLightModelfv
static void APIENTRY logLightModelfv(GLenum pname, const GLfloat *params)
Definition: qgl_win.c:1610
c_alias_polys
int c_alias_polys
Definition: gl_local.h:157
logPixelStoref
static void APIENTRY logPixelStoref(GLenum pname, GLfloat param)
Definition: qgl_win.c:1883
model_s::name
char name[MAX_QPATH]
Definition: r_model.h:173
R_CullBox
qboolean R_CullBox(vec3_t mins, vec3_t maxs)
Definition: gl_rmain.c:151
msurface_s::light_s
int light_s
Definition: gl_model.h:108
logNormal3b
static void APIENTRY logNormal3b(GLbyte nx, GLbyte ny, GLbyte nz)
Definition: qgl_win.c:1794
image_s::sl
float sl
Definition: gl_local.h:96
skytexorder
int skytexorder[6]
Definition: gl_warp.c:561
logEvalMesh1
static void APIENTRY logEvalMesh1(GLenum mode, GLint i1, GLint i2)
Definition: qgl_win.c:1238
mnode_s::contents
int contents
Definition: r_model.h:126
mnode_s::firstsurface
unsigned short firstsurface
Definition: r_model.h:137
up
static vec3_t up
Definition: p_view.c:29
r_warpbuffer
byte * r_warpbuffer
Definition: r_main.c:45
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:43
r_newrefdef
refdef_t r_newrefdef
Definition: gl_rmain.c:75
dsprite_t::numframes
int numframes
Definition: qfiles.h:184
logNormal3i
static void APIENTRY logNormal3i(GLint nx, GLint ny, GLint nz)
Definition: qgl_win.c:1829
logTexCoord4s
static void APIENTRY logTexCoord4s(GLshort s, GLshort t, GLshort r, GLshort q)
Definition: qgl_win.c:2381
EmitWaterPolys
void EmitWaterPolys(msurface_t *fa)
Definition: gl_warp.c:211
logColor3us
static void APIENTRY logColor3us(GLushort red, GLushort green, GLushort blue)
Definition: qgl_win.c:939
rserr_ok
@ rserr_ok
Definition: r_local.h:105
r_speeds
cvar_t * r_speeds
Definition: gl_rmain.c:82
logLogicOp
static void APIENTRY logLogicOp(GLenum opcode)
Definition: qgl_win.c:1695
glstate_t::fullscreen
qboolean fullscreen
Definition: gl_local.h:410
pdest
static byte * pdest
Definition: r_part.c:470
dlight_t
Definition: ref.h:82
logColor4f
static void APIENTRY logColor4f(GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha)
Definition: qgl_win.c:973
logIndexub
static void APIENTRY logIndexub(GLubyte c)
Definition: qgl_win.c:1564
dsprframe_t::origin_y
int origin_y
Definition: qfiles.h:177
SWimp_Init
int SWimp_Init(void *hInstance, void *wndProc)
Definition: rw_imp.c:118
logIndexubv
static void APIENTRY logIndexubv(const GLubyte *c)
Definition: qgl_win.c:1570
logGetFloatv
static void APIENTRY logGetFloatv(GLenum pname, GLfloat *params)
Definition: qgl_win.c:1349
logNormal3d
static void APIENTRY logNormal3d(GLdouble nx, GLdouble ny, GLdouble nz)
Definition: qgl_win.c:1806
entity_s
Definition: ref.h:49
view_clipplanes
clipplane_t view_clipplanes[4]
Definition: r_rast.c:38
logBindTexture
static void APIENTRY logBindTexture(GLenum target, GLuint texture)
Definition: qgl_win.c:781
WINDOW_CLASS_NAME
#define WINDOW_CLASS_NAME
Definition: glw_imp.c:62
OSR2_BUILD_NUMBER
#define OSR2_BUILD_NUMBER
gl_config
glconfig_t gl_config
Definition: gl_rmain.c:41
RF_FULLBRIGHT
#define RF_FULLBRIGHT
Definition: q_shared.h:602
GL_TexEnv
void GL_TexEnv(GLenum mode)
Definition: gl_image.c:126
logClipPlane
static void APIENTRY logClipPlane(GLenum plane, const GLdouble *equation)
Definition: qgl_win.c:847
model_s::surfaces
msurface_t * surfaces
Definition: r_model.h:221
currententity
entity_t * currententity
Definition: gl_rmain.c:47
vup
vec3_t vup
Definition: gl_rmain.c:64
shadelight
float shadelight[3]
Definition: gl_mesh.c:44
medge_t::v
unsigned short v[2]
Definition: r_model.h:79
logMultMatrixf
static void APIENTRY logMultMatrixf(const GLfloat *m)
Definition: qgl_win.c:1782
mnode_s::plane
mplane_t * plane
Definition: r_model.h:134
image_s::has_alpha
qboolean has_alpha
Definition: gl_local.h:98
c_visible_textures
int c_visible_textures
Definition: gl_rsurf.c:41
DrawTextureChains
void DrawTextureChains(void)
Definition: gl_rsurf.c:635
logEvalCoord2f
static void APIENTRY logEvalCoord2f(GLfloat u, GLfloat v)
Definition: qgl_win.c:1227
VectorMA
void VectorMA(vec3_t veca, float scale, vec3_t vecb, vec3_t vecc)
Definition: q_shared.c:719
logGetPixelMapusv
static void APIENTRY logGetPixelMapusv(GLenum map, GLushort *values)
Definition: qgl_win.c:1415
logRasterPos2dv
static void APIENTRY logRasterPos2dv(const GLdouble *v)
Definition: qgl_win.c:1993
gl_ext_palettedtexture
static cvar_t * gl_ext_palettedtexture
Definition: vid_menu.c:40
model_s::numleafs
int numleafs
Definition: r_model.h:204
logVertex3d
static void APIENTRY logVertex3d(GLdouble x, GLdouble y, GLdouble z)
Definition: qgl_win.c:2547
msurface_s::lightmaptexturenum
int lightmaptexturenum
Definition: gl_model.h:121
logIndexdv
static void APIENTRY logIndexdv(const GLdouble *c)
Definition: qgl_win.c:1522
pcx_t::manufacturer
char manufacturer
Definition: qfiles.h:62
logColor4fv
static void APIENTRY logColor4fv(const GLfloat *v)
Definition: qgl_win.c:978
r_rawpalette
unsigned r_rawpalette[256]
Definition: gl_rmain.c:1572
glwstate_t::wndproc
void * wndproc
Definition: glw_win.h:30
logStencilMask
static void APIENTRY logStencilMask(GLuint mask)
Definition: qgl_win.c:2216
logGetMaterialiv
static void APIENTRY logGetMaterialiv(GLenum face, GLenum pname, GLint *params)
Definition: qgl_win.c:1397
r_dlightframecount
int r_dlightframecount
Definition: r_light.c:24
refdef_t::fov_y
float fov_y
Definition: ref.h:105
logRecti
static void APIENTRY logRecti(GLint x1, GLint y1, GLint x2, GLint y2)
Definition: qgl_win.c:2143
particle_t::color
int color
Definition: ref.h:92
logTexCoord1s
static void APIENTRY logTexCoord1s(GLshort s)
Definition: qgl_win.c:2260
GL_LoadPic
image_t * GL_LoadPic(char *name, byte *pic, int width, int height, imagetype_t type, int bits)
Definition: gl_image.c:1247
R_DrawEntitiesOnList
void R_DrawEntitiesOnList(void)
Definition: gl_rmain.c:324
msurface_s
Definition: r_model.h:93
logVertex2iv
static void APIENTRY logVertex2iv(const GLint *v)
Definition: qgl_win.c:2532
logGetPolygonStipple
static void APIENTRY logGetPolygonStipple(GLubyte *mask)
Definition: qgl_win.c:1427
logVertex2f
static void APIENTRY logVertex2f(GLfloat x, GLfloat y)
Definition: qgl_win.c:2517
logVertex4fv
static void APIENTRY logVertex4fv(const GLfloat *v)
Definition: qgl_win.c:2602
logGetDoublev
static void APIENTRY logGetDoublev(GLenum pname, GLdouble *params)
Definition: qgl_win.c:1337
DrawGLPoly
void DrawGLPoly(glpoly_t *p)
Definition: gl_rsurf.c:181
mplane_s
Definition: r_model.h:57
pcx_t::vres
unsigned short vres
Definition: qfiles.h:67
dsprframe_t
Definition: qfiles.h:174
mtexinfo_s::flags
int flags
Definition: r_model.h:88
model_s::numnodes
int numnodes
Definition: r_model.h:213
it_wall
@ it_wall
Definition: gl_local.h:82
logTexCoord3f
static void APIENTRY logTexCoord3f(GLfloat s, GLfloat t, GLfloat r)
Definition: qgl_win.c:2321
R_EdgeCodeEnd
void R_EdgeCodeEnd(void)
logShadeModel
static void APIENTRY logShadeModel(GLenum mode)
Definition: qgl_win.c:2204
refdef_t::dlights
dlight_t * dlights
Definition: ref.h:120
glstate_t::lightmap_textures
int lightmap_textures
Definition: gl_local.h:416
R_RotateForEntity
void R_RotateForEntity(entity_t *e)
Definition: gl_rmain.c:165
logListBase
static void APIENTRY logListBase(GLuint base)
Definition: qgl_win.c:1665
logEvalCoord2dv
static void APIENTRY logEvalCoord2dv(const GLdouble *u)
Definition: qgl_win.c:1222
refdef_t::width
int width
Definition: ref.h:104
logMaterialiv
static void APIENTRY logMaterialiv(GLenum face, GLenum pname, const GLint *params)
Definition: qgl_win.c:1764
logGetTexGenfv
static void APIENTRY logGetTexGenfv(GLenum coord, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1457
logColor4ub
static void APIENTRY logColor4ub(GLubyte red, GLubyte green, GLubyte blue, GLubyte alpha)
Definition: qgl_win.c:1003
logFrustum
static void APIENTRY logFrustum(GLdouble left, GLdouble right, GLdouble bottom, GLdouble top, GLdouble zNear, GLdouble zFar)
Definition: qgl_win.c:1307
texture
GLuint texture
Definition: qgl_win.c:68
ri
refimport_t ri
Definition: r_main.c:25
image_s::upload_height
int upload_height
Definition: gl_local.h:92
GL_POINT_SIZE_MIN_EXT
#define GL_POINT_SIZE_MIN_EXT
Definition: qgl.h:468
logVertex3s
static void APIENTRY logVertex3s(GLshort x, GLshort y, GLshort z)
Definition: qgl_win.c:2577
R_DrawAlphaSurfaces
void R_DrawAlphaSurfaces(void)
Definition: r_poly.c:1342
logLightModeli
static void APIENTRY logLightModeli(GLenum pname, GLint param)
Definition: qgl_win.c:1616
Draw_FindPic
image_t * Draw_FindPic(char *name)
Definition: r_draw.c:37
RF_SHELL_BLUE
#define RF_SHELL_BLUE
Definition: q_shared.h:611
R_DrawParticles
void R_DrawParticles(void)
Definition: gl_rmain.c:475
lightstyle_t::white
float white
Definition: ref.h:99
dsprframe_t::origin_x
int origin_x
Definition: qfiles.h:177
SubdividePolygon
void SubdividePolygon(int numverts, float *verts)
Definition: gl_warp.c:54
logVertex2dv
static void APIENTRY logVertex2dv(const GLdouble *v)
Definition: qgl_win.c:2512
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
logRasterPos2fv
static void APIENTRY logRasterPos2fv(const GLfloat *v)
Definition: qgl_win.c:2004
right
GLdouble right
Definition: qgl_win.c:159
logColor4us
static void APIENTRY logColor4us(GLushort red, GLushort green, GLushort blue, GLushort alpha)
Definition: qgl_win.c:1023
registration_sequence
int registration_sequence
Definition: r_model.c:44
MAX_CLIP_VERTS
#define MAX_CLIP_VERTS
Definition: gl_warp.c:388
logAlphaFunc
static void APIENTRY logAlphaFunc(GLenum func, GLclampf ref)
Definition: qgl_win.c:757
logVertex4i
static void APIENTRY logVertex4i(GLint x, GLint y, GLint z, GLint w)
Definition: qgl_win.c:2607
refimport_t::Cvar_SetValue
void(* Cvar_SetValue)(char *name, float value)
Definition: ref.h:218
logTexParameteriv
static void APIENTRY logTexParameteriv(GLenum target, GLenum pname, const GLint *params)
Definition: qgl_win.c:2479
image_s
Definition: r_local.h:71
sw_state
swstate_t sw_state
Definition: r_main.c:49
logInterleavedArrays
static void APIENTRY logInterleavedArrays(GLenum format, GLsizei stride, const void *pointer)
Definition: qgl_win.c:1582
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fx.c:887
GL_LIGHTMAP_FORMAT
#define GL_LIGHTMAP_FORMAT
Definition: gl_rsurf.c:43
logColor3fv
static void APIENTRY logColor3fv(const GLfloat *v)
Definition: qgl_win.c:883
logPopClientAttrib
static void APIENTRY logPopClientAttrib(void)
Definition: qgl_win.c:1939
mode
GLenum mode
Definition: qgl_win.c:113
logStencilFunc
static void APIENTRY logStencilFunc(GLenum func, GLint ref, GLuint mask)
Definition: qgl_win.c:2210
logAreTexturesResident
static GLboolean APIENTRY logAreTexturesResident(GLsizei n, const GLuint *textures, GLboolean *residences)
Definition: qgl_win.c:763
msurface_s::dlightbits
int dlightbits
Definition: r_model.h:98
R_MarkLeaves
void R_MarkLeaves(void)
Definition: r_main.c:467
R_BuildLightMap
void R_BuildLightMap(msurface_t *surf, byte *dest, int stride)
Definition: gl_light.c:455
YCENTERING
#define YCENTERING
Definition: r_local.h:224
logEnableClientState
static void APIENTRY logEnableClientState(GLenum array)
Definition: qgl_win.c:1176
logTexCoord1dv
static void APIENTRY logTexCoord1dv(const GLdouble *v)
Definition: qgl_win.c:2234
viddef_t::colormap
pixel_t * colormap
Definition: r_local.h:95
pcx_t::xmax
unsigned short xmax
Definition: qfiles.h:66
R_SetCacheState
void R_SetCacheState(msurface_t *surf)
Definition: gl_light.c:437
logFeedbackBuffer
static void APIENTRY logFeedbackBuffer(GLsizei size, GLenum type, GLfloat *buffer)
Definition: qgl_win.c:1259
logGetIntegerv
static void APIENTRY logGetIntegerv(GLenum pname, GLint *params)
Definition: qgl_win.c:1355
mnode_s::numsurfaces
unsigned short numsurfaces
Definition: r_model.h:138
logTexEnvi
static void APIENTRY logTexEnvi(GLenum target, GLenum pname, GLint param)
Definition: qgl_win.c:2409
frustum
cplane_t frustum[4]
Definition: gl_rmain.c:50
logAccum
static void APIENTRY logAccum(GLenum op, GLfloat value)
Definition: qgl_win.c:751
model_s::vertexes
mvertex_t * vertexes
Definition: r_model.h:208
c_brush_polys
int c_brush_polys
Definition: gl_rmain.c:55
logFogiv
static void APIENTRY logFogiv(GLenum pname, const GLint *params)
Definition: qgl_win.c:1295
gldepthmin
float gldepthmin
Definition: gl_rmain.c:39
logGetPointerv
static void APIENTRY logGetPointerv(GLenum pname, GLvoid **params)
Definition: qgl_win.c:1421
rserr_unknown
@ rserr_unknown
Definition: gl_local.h:118
GL_SelectTexture
void GL_SelectTexture(GLenum texture)
Definition: gl_image.c:92
gl_particle_min_size
cvar_t * gl_particle_min_size
Definition: gl_rmain.c:96
logTexCoord3sv
static void APIENTRY logTexCoord3sv(const GLshort *v)
Definition: qgl_win.c:2346
Draw_GetPalette
int Draw_GetPalette(void)
Definition: gl_image.c:1471
logEnd
static void APIENTRY logEnd(void)
Definition: qgl_win.c:1182
Scrap_AllocBlock
int Scrap_AllocBlock(int w, int h, int *x, int *y)
Definition: gl_image.c:368
viddef_t::alphamap
pixel_t * alphamap
Definition: r_local.h:96
logFogfv
static void APIENTRY logFogfv(GLenum pname, const GLfloat *params)
Definition: qgl_win.c:1283
gl_swapinterval
cvar_t * gl_swapinterval
Definition: gl_rmain.c:132
LoadPCX
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
Definition: gl_image.c:433
R_BeginFrame
void R_BeginFrame(float camera_separation)
Definition: r_main.c:1177
logIndexMask
static void APIENTRY logIndexMask(GLuint mask)
Definition: qgl_win.c:1504
logTexGend
static void APIENTRY logTexGend(GLenum coord, GLenum pname, GLdouble param)
Definition: qgl_win.c:2420
NUM_GL_MODES
#define NUM_GL_MODES
Definition: gl_image.c:180
logRotatef
static void APIENTRY logRotatef(GLfloat angle, GLfloat x, GLfloat y, GLfloat z)
Definition: qgl_win.c:2174
logColor3s
static void APIENTRY logColor3s(GLshort red, GLshort green, GLshort blue)
Definition: qgl_win.c:901
Mod_ClusterPVS
byte * Mod_ClusterPVS(int cluster, model_t *model)
Definition: r_model.c:268
rserr_invalid_fullscreen
@ rserr_invalid_fullscreen
Definition: r_local.h:107
skymins
float skymins[2][6]
Definition: gl_warp.c:302
gl_monolightmap
cvar_t * gl_monolightmap
Definition: gl_rmain.c:117
entity_s::oldorigin
float oldorigin[3]
Definition: ref.h:63
dlight_t::intensity
float intensity
Definition: ref.h:86
TRANSPARENT_COLOR
#define TRANSPARENT_COLOR
Definition: asm_i386.h:78
vpn
vec3_t vpn
Definition: gl_rmain.c:65
logPixelMapusv
static void APIENTRY logPixelMapusv(GLenum map, GLsizei mapsize, const GLushort *values)
Definition: qgl_win.c:1878
logDeleteLists
static void APIENTRY logDeleteLists(GLuint list, GLsizei range)
Definition: qgl_win.c:1086
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:134
draw_chars
image_t * draw_chars
Definition: r_draw.c:26
logTexCoord3fv
static void APIENTRY logTexCoord3fv(const GLfloat *v)
Definition: qgl_win.c:2326
Com_sprintf
void Com_sprintf(char *dest, int size, char *fmt,...)
Definition: q_shared.c:1223
logColor4ubv
static void APIENTRY logColor4ubv(const GLubyte *v)
Definition: qgl_win.c:1008
logEvalPoint1
static void APIENTRY logEvalPoint1(GLint i)
Definition: qgl_win.c:1248
glstate_t::d_16to8table
unsigned char * d_16to8table
Definition: gl_local.h:414
dmdl_t
Definition: qfiles.h:137
entity_s::angles
float angles[3]
Definition: ref.h:52
gl_particle_att_b
cvar_t * gl_particle_att_b
Definition: gl_rmain.c:100
TEXNUM_SCRAPS
#define TEXNUM_SCRAPS
Definition: gl_local.h:104
logColor4i
static void APIENTRY logColor4i(GLint red, GLint green, GLint blue, GLint alpha)
Definition: qgl_win.c:983
logEdgeFlagPointer
static void APIENTRY logEdgeFlagPointer(GLsizei stride, const void *pointer)
Definition: qgl_win.c:1158
logGetTexEnvfv
static void APIENTRY logGetTexEnvfv(GLenum target, GLenum pname, GLfloat *params)
Definition: qgl_win.c:1439
logBegin
static void APIENTRY logBegin(GLenum mode)
Definition: qgl_win.c:775
BLOCK_WIDTH
#define BLOCK_WIDTH
Definition: gl_image.c:360
logRotated
static void APIENTRY logRotated(GLdouble angle, GLdouble x, GLdouble y, GLdouble z)
Definition: qgl_win.c:2168
LoadPCX
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
Definition: r_image.c:87
logPushMatrix
static void APIENTRY logPushMatrix(void)
Definition: qgl_win.c:1975
logGetTexGeniv
static void APIENTRY logGetTexGeniv(GLenum coord, GLenum pname, GLint *params)
Definition: qgl_win.c:1463
RotatePointAroundVector
void RotatePointAroundVector(vec3_t dst, const vec3_t dir, const vec3_t point, float degrees)
Definition: q_shared.c:32
logTexCoord4f
static void APIENTRY logTexCoord4f(GLfloat s, GLfloat t, GLfloat r, GLfloat q)
Definition: qgl_win.c:2361
dmdl_t::num_frames
int num_frames
Definition: qfiles.h:151
msurface_s::firstedge
int firstedge
Definition: r_model.h:103
SURF_SKY
#define SURF_SKY
Definition: qfiles.h:371
vright
vec3_t vright
Definition: gl_rmain.c:66
logVertexPointer
static void APIENTRY logVertexPointer(GLint size, GLenum type, GLsizei stride, const void *pointer)
Definition: qgl_win.c:2627
r_customwidth
cvar_t * r_customwidth
Definition: r_main.c:151
pcx_t::bytes_per_line
unsigned short bytes_per_line
Definition: qfiles.h:71
logMapGrid2f
static void APIENTRY logMapGrid2f(GLint un, GLfloat u1, GLfloat u2, GLint vn, GLfloat v1, GLfloat v2)
Definition: qgl_win.c:1742
image_s::sh
float sh
Definition: gl_local.h:96
it_sky
@ it_sky
Definition: r_local.h:68
glpoly_s
Definition: gl_model.h:86
vid
viddef_t vid
Definition: r_main.c:24