icculus quake2 doxygen  1.0 dev
gl_local.h
Go to the documentation of this file.
1 #ifndef __GL_LOCAL__
2 #define __GL_LOCAL__
3 /*
4 Copyright (C) 1997-2001 Id Software, Inc.
5 
6 This program is free software; you can redistribute it and/or
7 modify it under the terms of the GNU General Public License
8 as published by the Free Software Foundation; either version 2
9 of the License, or (at your option) any later version.
10 
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14 
15 See the GNU General Public License for more details.
16 
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
20 
21 */
22 
23 #ifdef _WIN32
24 # include <windows.h>
25 #endif
26 
27 #include <stdio.h>
28 #include <ctype.h>
29 
30 #include <GL/gl.h>
31 #ifndef SOLARIS
32 //#include <GL/glxext.h>
33 #else
34 #include <GL/glu.h>
35 #ifndef GL_COLOR_INDEX8_EXT
36 #define GL_COLOR_INDEX8_EXT GL_COLOR_INDEX
37 #endif
38 #endif
39 #include <math.h>
40 
41 #ifndef _WIN32
42 char *strlwr (char *s);
43 #endif
44 
45 #include "../client/ref.h"
46 
47 #include "qgl.h"
48 
49 #define REF_VERSION "GL 0.01"
50 
51 // up / down
52 #define PITCH 0
53 
54 // left / right
55 #define YAW 1
56 
57 // fall over
58 #define ROLL 2
59 
60 
61 #ifndef __VIDDEF_T
62 #define __VIDDEF_T
63 typedef struct
64 {
65  int width, height; // coordinates from main game
66 } viddef_t;
67 #endif
68 
69 extern viddef_t vid;
70 
71 
72 /*
73 
74  skins will be outline flood filled and mip mapped
75  pics and sprites with alpha will be outline flood filled
76  pic won't be mip mapped
77 
78  model skin
79  sprite frame
80  wall texture
81  pic
82 
83 */
84 
85 typedef enum
86 {
92 } imagetype_t;
93 
94 typedef struct image_s
95 {
96  char name[MAX_QPATH]; // game path, including extension
98  int width, height; // source image
99  int upload_width, upload_height; // after power of two and picmip
100  int registration_sequence; // 0 = free
101  struct msurface_s *texturechain; // for sort-by-texture world drawing
102  int texnum; // gl texture binding
103  float sl, tl, sh, th; // 0,0 - 1,1 unless part of the scrap
106 
108 } image_t;
109 
110 #define TEXNUM_LIGHTMAPS 1024
111 #define TEXNUM_SCRAPS 1152
112 #define TEXNUM_IMAGES 1153
113 
114 #define MAX_GLTEXTURES 1024
115 
116 //===================================================================
117 
118 typedef enum
119 {
121 
124 
126 } rserr_t;
127 
128 #include "gl_model.h"
129 
130 void GL_BeginRendering (int *x, int *y, int *width, int *height);
131 void GL_EndRendering (void);
132 
133 void GL_SetDefaultState( void );
134 void GL_UpdateSwapInterval( void );
135 
136 extern float gldepthmin, gldepthmax;
137 
138 typedef struct
139 {
140  float x, y, z;
141  float s, t;
142  float r, g, b;
143 } glvert_t;
144 
145 
146 #define MAX_LBM_HEIGHT 480
147 
148 #define BACKFACE_EPSILON 0.01
149 
150 
151 //====================================================
152 
154 extern int numgltextures;
155 
156 
157 extern image_t *r_notexture;
158 extern image_t *r_particletexture;
159 extern entity_t *currententity;
160 extern model_t *currentmodel;
161 extern int r_visframecount;
162 extern int r_framecount;
163 extern cplane_t frustum[4];
165 
166 
168 
169 //
170 // view origin
171 //
172 extern vec3_t vup;
173 extern vec3_t vpn;
174 extern vec3_t vright;
175 extern vec3_t r_origin;
176 
177 //
178 // screen size info
179 //
180 extern refdef_t r_newrefdef;
182 
183 extern cvar_t *r_norefresh;
184 extern cvar_t *r_lefthand;
185 extern cvar_t *r_drawentities;
186 extern cvar_t *r_drawworld;
187 extern cvar_t *r_speeds;
188 extern cvar_t *r_fullbright;
189 extern cvar_t *r_novis;
190 extern cvar_t *r_nocull;
191 extern cvar_t *r_lerpmodels;
192 
193 extern cvar_t *r_lightlevel; // FIXME: This is a HACK to get the client's light level
194 
195 extern cvar_t *gl_vertex_arrays;
196 
202 
205 extern cvar_t *gl_particle_size;
206 extern cvar_t *gl_particle_att_a;
207 extern cvar_t *gl_particle_att_b;
208 extern cvar_t *gl_particle_att_c;
209 
210 extern cvar_t *gl_nosubimage;
211 extern cvar_t *gl_bitdepth;
212 extern cvar_t *gl_mode;
213 extern cvar_t *gl_log;
214 extern cvar_t *gl_lightmap;
215 extern cvar_t *gl_shadows;
216 extern cvar_t *gl_stencilshadow;
217 extern cvar_t *gl_dynamic;
218 extern cvar_t *gl_monolightmap;
219 extern cvar_t *gl_nobind;
220 extern cvar_t *gl_round_down;
221 extern cvar_t *gl_picmip;
222 extern cvar_t *gl_skymip;
223 extern cvar_t *gl_showtris;
224 extern cvar_t *gl_finish;
225 extern cvar_t *gl_ztrick;
226 extern cvar_t *gl_clear;
227 extern cvar_t *gl_cull;
228 extern cvar_t *gl_poly;
229 extern cvar_t *gl_texsort;
230 extern cvar_t *gl_polyblend;
231 extern cvar_t *gl_flashblend;
232 extern cvar_t *gl_lightmaptype;
233 extern cvar_t *gl_modulate;
234 extern cvar_t *gl_playermip;
235 extern cvar_t *gl_drawbuffer;
236 extern cvar_t *gl_3dlabs_broken;
237 extern cvar_t *gl_driver;
238 extern cvar_t *gl_swapinterval;
239 extern cvar_t *gl_texturemode;
243 extern cvar_t *gl_lockpvs;
244 
245 extern cvar_t *vid_fullscreen;
246 extern cvar_t *vid_gamma;
247 
248 extern cvar_t *intensity;
249 
250 extern int gl_lightmap_format;
251 extern int gl_solid_format;
252 extern int gl_alpha_format;
253 extern int gl_tex_solid_format;
254 extern int gl_tex_alpha_format;
255 
256 extern int c_visible_lightmaps;
257 extern int c_visible_textures;
258 
259 extern float r_world_matrix[16];
260 
261 void R_TranslatePlayerSkin (int playernum);
262 void GL_Bind (int texnum);
263 void GL_MBind( GLenum target, int texnum );
264 void GL_TexEnv( GLenum value );
265 void GL_EnableMultitexture( qboolean enable );
266 void GL_SelectTexture( GLenum );
267 
268 void R_LightPoint (vec3_t p, vec3_t color);
269 void R_PushDlights (void);
270 
271 //====================================================================
272 
273 extern model_t *r_worldmodel;
274 
275 extern unsigned d_8to24table[256];
276 
277 extern int registration_sequence;
278 
279 
280 void V_AddBlend (float r, float g, float b, float a, float *v_blend);
281 
282 int R_Init( void *hinstance, void *hWnd );
283 void R_Shutdown( void );
284 
285 void R_RenderView (refdef_t *fd);
286 void GL_ScreenShot_f (void);
287 void R_DrawAliasModel (entity_t *e);
288 void R_DrawBrushModel (entity_t *e);
289 void R_DrawSpriteModel (entity_t *e);
290 void R_DrawBeam( entity_t *e );
291 void R_DrawWorld (void);
292 void R_RenderDlights (void);
293 void R_DrawAlphaSurfaces (void);
294 void R_RenderBrushPoly (msurface_t *fa);
295 void R_InitParticleTexture (void);
296 void Draw_InitLocal (void);
298 qboolean R_CullBox (vec3_t mins, vec3_t maxs);
299 void R_RotateForEntity (entity_t *e);
300 void R_MarkLeaves (void);
301 
303 void EmitWaterPolys (msurface_t *fa);
304 void R_AddSkySurface (msurface_t *fa);
305 void R_ClearSkyBox (void);
306 void R_DrawSkyBox (void);
307 void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
308 
309 #if 0
310 short LittleShort (short l);
311 short BigShort (short l);
312 int LittleLong (int l);
313 float LittleFloat (float f);
314 
315 char *va(char *format, ...);
316 // does a varargs printf into a temp buffer
317 #endif
318 
319 void COM_StripExtension (char *in, char *out);
320 
321 void Draw_GetPicSize (int *w, int *h, char *name);
322 void Draw_Pic (int x, int y, char *name);
323 void Draw_StretchPic (int x, int y, int w, int h, char *name);
324 void Draw_Char (int x, int y, int c);
325 void Draw_TileClear (int x, int y, int w, int h, char *name);
326 void Draw_Fill (int x, int y, int w, int h, int c);
327 void Draw_FadeScreen (void);
328 void Draw_StretchRaw (int x, int y, int w, int h, int cols, int rows, byte *data);
329 
330 void R_BeginFrame( float camera_separation );
331 void R_SwapBuffers( int );
332 void R_SetPalette ( const unsigned char *palette);
333 
334 int Draw_GetPalette (void);
335 
336 void GL_ResampleTexture (unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight);
337 
338 struct image_s *R_RegisterSkin (char *name);
339 
340 void LoadPCX (char *filename, byte **pic, byte **palette, int *width, int *height);
341 image_t *GL_LoadPic (char *name, byte *pic, int width, int height, imagetype_t type, int bits);
343 void GL_TextureMode( char *string );
344 void GL_ImageList_f (void);
345 
346 void GL_SetTexturePalette( unsigned palette[256] );
347 
348 void GL_InitImages (void);
349 void GL_ShutdownImages (void);
350 
351 void GL_FreeUnusedImages (void);
352 
353 void GL_TextureAlphaMode( char *string );
354 void GL_TextureSolidMode( char *string );
355 
356 /*
357 ** GL extension emulation functions
358 */
359 void GL_DrawParticles( int n, const particle_t particles[], const unsigned colortable[768] );
360 
361 /*
362 ** GL config stuff
363 */
364 #define GL_RENDERER_VOODOO 0x00000001
365 #define GL_RENDERER_VOODOO2 0x00000002
366 #define GL_RENDERER_VOODOO_RUSH 0x00000004
367 #define GL_RENDERER_BANSHEE 0x00000008
368 #define GL_RENDERER_3DFX 0x0000000F
369 
370 #define GL_RENDERER_PCX1 0x00000010
371 #define GL_RENDERER_PCX2 0x00000020
372 #define GL_RENDERER_PMX 0x00000040
373 #define GL_RENDERER_POWERVR 0x00000070
374 
375 #define GL_RENDERER_PERMEDIA2 0x00000100
376 #define GL_RENDERER_GLINT_MX 0x00000200
377 #define GL_RENDERER_GLINT_TX 0x00000400
378 #define GL_RENDERER_3DLABS_MISC 0x00000800
379 #define GL_RENDERER_3DLABS 0x00000F00
380 
381 #define GL_RENDERER_REALIZM 0x00001000
382 #define GL_RENDERER_REALIZM2 0x00002000
383 #define GL_RENDERER_INTERGRAPH 0x00003000
384 
385 #define GL_RENDERER_3DPRO 0x00004000
386 #define GL_RENDERER_REAL3D 0x00008000
387 #define GL_RENDERER_RIVA128 0x00010000
388 #define GL_RENDERER_DYPIC 0x00020000
389 
390 #define GL_RENDERER_V1000 0x00040000
391 #define GL_RENDERER_V2100 0x00080000
392 #define GL_RENDERER_V2200 0x00100000
393 #define GL_RENDERER_RENDITION 0x001C0000
394 
395 #define GL_RENDERER_O2 0x00100000
396 #define GL_RENDERER_IMPACT 0x00200000
397 #define GL_RENDERER_RE 0x00400000
398 #define GL_RENDERER_IR 0x00800000
399 #define GL_RENDERER_SGI 0x00F00000
400 
401 #define GL_RENDERER_MCD 0x01000000
402 #define GL_RENDERER_OTHER 0x80000000
403 
404 typedef struct
405 {
406  int renderer;
407  const char *renderer_string;
408  const char *vendor_string;
409  const char *version_string;
410  const char *extensions_string;
411 
413 } glconfig_t;
414 
415 typedef struct
416 {
419 
421 
422  unsigned char *d_16to8table;
423 
425 
426  int currenttextures[2];
428 
431 
433 
434  unsigned char originalRedGammaTable[256];
435  unsigned char originalGreenGammaTable[256];
436  unsigned char originalBlueGammaTable[256];
437 } glstate_t;
438 
439 extern glconfig_t gl_config;
440 extern glstate_t gl_state;
441 
442 /*
443 ====================================================================
444 
445 IMPORTED FUNCTIONS
446 
447 ====================================================================
448 */
449 
450 extern refimport_t ri;
451 
452 
453 /*
454 ====================================================================
455 
456 IMPLEMENTATION SPECIFIC FUNCTIONS
457 
458 ====================================================================
459 */
460 
461 void GLimp_BeginFrame( float camera_separation );
462 void GLimp_EndFrame( void );
463 int GLimp_Init( void *hinstance, void *hWnd );
464 void GLimp_Shutdown( void );
465 int GLimp_SetMode( int *pwidth, int *pheight, int mode, qboolean fullscreen );
466 void GLimp_AppActivate( qboolean active );
467 void GLimp_EnableLogging( qboolean enable );
468 void GLimp_LogNewFrame( void );
469 
470 #endif
GL_EndRendering
void GL_EndRendering(void)
Draw_TileClear
void Draw_TileClear(int x, int y, int w, int h, char *name)
Definition: r_draw.c:345
GLimp_Shutdown
void GLimp_Shutdown(void)
Definition: glw_imp.c:302
gl_ext_multitexture
cvar_t * gl_ext_multitexture
Definition: gl_rmain.c:99
gl_ext_pointparameters
cvar_t * gl_ext_pointparameters
Definition: gl_rmain.c:100
gl_playermip
cvar_t * gl_playermip
Definition: gl_rmain.c:125
height
GLsizei height
Definition: qgl_win.c:69
value
GLfloat value
Definition: qgl_win.c:63
GL_FindImage
image_t * GL_FindImage(char *name, imagetype_t type)
Definition: gl_image.c:1393
glstate_t::stereo_enabled
qboolean stereo_enabled
Definition: gl_local.h:430
MAX_QPATH
#define MAX_QPATH
Definition: q_shared.h:73
gltextures
image_t gltextures[MAX_GLTEXTURES]
Definition: gl_image.c:23
gl_log
cvar_t * gl_log
Definition: gl_rmain.c:103
gl_particle_att_c
cvar_t * gl_particle_att_c
Definition: gl_rmain.c:95
BigShort
short BigShort(short l)
Definition: q_shared.c:945
LittleShort
short LittleShort(short l)
Definition: q_shared.c:946
refdef_t
Definition: ref.h:120
gl_vertex_arrays
cvar_t * gl_vertex_arrays
Definition: gl_rmain.c:88
gl_3dlabs_broken
cvar_t * gl_3dlabs_broken
Definition: gl_rmain.c:133
image_s::th
float th
Definition: gl_local.h:103
r_notexture
image_t * r_notexture
Definition: gl_rmain.c:38
c_visible_lightmaps
int c_visible_lightmaps
Definition: gl_rsurf.c:39
imagetype_t
imagetype_t
Definition: r_local.h:56
Draw_Pic
void Draw_Pic(int x, int y, char *name)
Definition: r_draw.c:253
gl_shadows
cvar_t * gl_shadows
Definition: gl_rmain.c:108
gl_modulate
cvar_t * gl_modulate
Definition: gl_rmain.c:113
gl_state
glstate_t gl_state
Definition: gl_rmain.c:36
it_sprite
@ it_sprite
Definition: gl_local.h:88
GL_SelectTexture
void GL_SelectTexture(GLenum)
Definition: gl_image.c:91
R_RenderBrushPoly
void R_RenderBrushPoly(msurface_t *fa)
Definition: gl_rsurf.c:485
glconfig_t::extensions_string
const char * extensions_string
Definition: gl_local.h:410
Draw_GetPicSize
void Draw_GetPicSize(int *w, int *h, char *name)
Definition: r_draw.c:144
gl_nosubimage
cvar_t * gl_nosubimage
Definition: gl_rmain.c:85
gl_dynamic
cvar_t * gl_dynamic
Definition: gl_rmain.c:111
r_framecount
int r_framecount
Definition: r_main.c:91
gldepthmax
float gldepthmax
Definition: gl_local.h:136
glconfig_t
Definition: gl_local.h:404
gl_ext_compiled_vertex_array
cvar_t * gl_ext_compiled_vertex_array
Definition: gl_rmain.c:101
frustum
cplane_t frustum[4]
Definition: gl_rmain.c:44
glstate_t::currenttmu
int currenttmu
Definition: gl_local.h:427
rserr_t
rserr_t
Definition: gl_local.h:118
glstate_t::prev_mode
int prev_mode
Definition: gl_local.h:420
LoadPCX
void LoadPCX(char *filename, byte **pic, byte **palette, int *width, int *height)
Definition: r_image.c:87
qboolean
qboolean
Definition: q_shared.h:56
x
GLint GLenum GLint x
Definition: qgl_win.c:116
gl_mode
cvar_t * gl_mode
Definition: gl_rmain.c:110
gl_driver
cvar_t * gl_driver
Definition: gl_rmain.c:106
gl_saturatelighting
cvar_t * gl_saturatelighting
Definition: gl_rmain.c:126
glstate_t::camera_separation
float camera_separation
Definition: gl_local.h:429
R_Shutdown
void R_Shutdown(void)
Definition: r_main.c:346
gl_particle_att_a
cvar_t * gl_particle_att_a
Definition: gl_rmain.c:93
mnode_s
Definition: r_model.h:123
gl_poly
cvar_t * gl_poly
glvert_t::r
float r
Definition: gl_local.h:142
model_s
Definition: r_model.h:171
GL_TextureAlphaMode
void GL_TextureAlphaMode(char *string)
Definition: gl_image.c:254
Draw_StretchPic
void Draw_StretchPic(int x, int y, int w, int h, char *name)
Definition: r_draw.c:220
v_blend
float v_blend[4]
Definition: gl_rmain.c:51
glvert_t
Definition: gl_local.h:138
glvert_t::z
float z
Definition: gl_local.h:140
width
GLint GLsizei width
Definition: qgl_win.c:115
r_oldviewcluster
int r_oldviewcluster
Definition: gl_local.h:181
gl_round_down
cvar_t * gl_round_down
Definition: gl_rmain.c:115
gl_skymip
cvar_t * gl_skymip
Definition: gl_rmain.c:117
r_visframecount
int r_visframecount
Definition: r_main.c:92
gl_nobind
cvar_t * gl_nobind
Definition: gl_rmain.c:114
image_s::registration_sequence
int registration_sequence
Definition: r_local.h:71
type
GLenum type
Definition: qgl_win.c:72
r_lerpmodels
cvar_t * r_lerpmodels
Definition: r_main.c:130
image_t
struct image_s image_t
viddef_t
Definition: vid.h:27
cvar_s
Definition: q_shared.h:317
R_SwapBuffers
void R_SwapBuffers(int)
vpn
vec3_t vpn
Definition: r_main.c:67
imagetype_t
imagetype_t
Definition: gl_local.h:85
R_Init
int R_Init(void *hinstance, void *hWnd)
Definition: r_main.c:300
r_drawworld
cvar_t * r_drawworld
Definition: r_main.c:126
gl_particle_size
cvar_t * gl_particle_size
Definition: gl_rmain.c:92
R_SetPalette
void R_SetPalette(const unsigned char *palette)
Definition: gl_rmain.c:1575
va
char * va(char *format,...)
Definition: q_shared.c:1050
it_pic
@ it_pic
Definition: gl_local.h:90
r_newrefdef
refdef_t r_newrefdef
Definition: r_main.c:36
gl_texturemode
cvar_t * gl_texturemode
Definition: gl_rmain.c:128
gl_stencilshadow
cvar_t * gl_stencilshadow
Definition: gl_rmain.c:109
R_DrawAlphaSurfaces
void R_DrawAlphaSurfaces(void)
Definition: r_poly.c:1192
GL_Bind
void GL_Bind(int texnum)
Definition: gl_image.c:136
GLimp_AppActivate
void GLimp_AppActivate(qboolean active)
Definition: glw_imp.c:604
gl_drawbuffer
cvar_t * gl_drawbuffer
Definition: gl_rmain.c:105
image_s::scrap
qboolean scrap
Definition: gl_local.h:104
LittleFloat
float LittleFloat(float l)
Definition: q_shared.c:950
gl_texturealphamode
cvar_t * gl_texturealphamode
Definition: gl_rmain.c:129
rserr_invalid_fullscreen
@ rserr_invalid_fullscreen
Definition: gl_local.h:122
GL_InitImages
void GL_InitImages(void)
Definition: gl_image.c:1547
r
GLdouble GLdouble r
Definition: qgl_win.c:336
GLimp_LogNewFrame
void GLimp_LogNewFrame(void)
Definition: qgl_win.c:4127
glvert_t::t
float t
Definition: gl_local.h:141
LittleLong
int LittleLong(int l)
Definition: q_shared.c:948
vid
viddef_t vid
Definition: r_main.c:24
image_s::height
int height
Definition: r_local.h:69
refimport_t
Definition: ref.h:218
R_BeginFrame
void R_BeginFrame(float camera_separation)
Definition: r_main.c:1099
R_ClearSkyBox
void R_ClearSkyBox(void)
Definition: gl_warp.c:508
R_AddSkySurface
void R_AddSkySurface(msurface_t *fa)
Definition: gl_warp.c:485
gl_clear
cvar_t * gl_clear
Definition: gl_rmain.c:121
R_PushDlights
void R_PushDlights(void)
Definition: gl_light.c:164
GL_TextureSolidMode
void GL_TextureSolidMode(char *string)
Definition: gl_image.c:278
image_s::texnum
int texnum
Definition: gl_local.h:102
R_RenderDlights
void R_RenderDlights(void)
Definition: gl_light.c:77
glstate_t
Definition: gl_local.h:415
r_viewcluster
int r_viewcluster
Definition: r_main.c:102
GL_FreeUnusedImages
void GL_FreeUnusedImages(void)
Definition: gl_image.c:1480
gl_ext_palettedtexture
cvar_t * gl_ext_palettedtexture
Definition: gl_rmain.c:98
Draw_InitLocal
void Draw_InitLocal(void)
Definition: r_draw.c:58
r_particletexture
image_t * r_particletexture
Definition: gl_rmain.c:39
MAX_GLTEXTURES
#define MAX_GLTEXTURES
Definition: gl_local.h:114
gl_lightmap
cvar_t * gl_lightmap
Definition: gl_rmain.c:107
Draw_GetPalette
int Draw_GetPalette(void)
Definition: r_main.c:1326
gl_lightmap_format
int gl_lightmap_format
image_s::type
imagetype_t type
Definition: r_local.h:68
R_RenderView
void R_RenderView(refdef_t *fd)
Definition: gl_rmain.c:820
it_skin
@ it_skin
Definition: gl_local.h:87
r_viewcluster2
int r_viewcluster2
Definition: gl_local.h:181
gl_alpha_format
int gl_alpha_format
Definition: gl_image.c:39
GLimp_BeginFrame
void GLimp_BeginFrame(float camera_separation)
Definition: glw_imp.c:554
gl_bitdepth
cvar_t * gl_bitdepth
Definition: gl_rmain.c:104
rserr_invalid_mode
@ rserr_invalid_mode
Definition: gl_local.h:123
glstate_t::inverse_intensity
float inverse_intensity
Definition: gl_local.h:417
vid_gamma
cvar_t * vid_gamma
Definition: vid_dll.c:42
GL_DrawParticles
void GL_DrawParticles(int n, const particle_t particles[], const unsigned colortable[768])
Definition: gl_rmain.c:410
rserr_ok
@ rserr_ok
Definition: gl_local.h:120
gl_flashblend
cvar_t * gl_flashblend
Definition: gl_rmain.c:124
r_lefthand
cvar_t * r_lefthand
Definition: r_main.c:111
image_s::width
int width
Definition: r_local.h:69
Draw_Char
void Draw_Char(int x, int y, int c)
Definition: r_draw.c:74
GL_ResampleTexture
void GL_ResampleTexture(unsigned *in, int inwidth, int inheight, unsigned *out, int outwidth, int outheight)
Definition: gl_image.c:835
image_s::tl
float tl
Definition: gl_local.h:103
particle_t
Definition: ref.h:96
GL_SubdivideSurface
void GL_SubdivideSurface(msurface_t *fa)
Definition: gl_warp.c:164
it_sky
@ it_sky
Definition: gl_local.h:91
image_s::name
char name[MAX_QPATH]
Definition: r_local.h:67
GLimp_SetMode
int GLimp_SetMode(int *pwidth, int *pheight, int mode, qboolean fullscreen)
Definition: glw_imp.c:159
COM_StripExtension
void COM_StripExtension(char *in, char *out)
Definition: q_shared.c:826
GLenum
GLenum
Definition: qgl.h:382
gl_filter_min
int gl_filter_min
Definition: gl_image.c:44
GLimp_EnableLogging
void GLimp_EnableLogging(qboolean enable)
Definition: qgl_win.c:3427
Draw_StretchRaw
void Draw_StretchRaw(int x, int y, int w, int h, int cols, int rows, byte *data)
Definition: r_draw.c:238
r_speeds
cvar_t * r_speeds
Definition: r_main.c:133
GLimp_Init
int GLimp_Init(void *hinstance, void *hWnd)
Definition: glw_imp.c:347
name
cvar_t * name
Definition: cl_main.c:94
R_DrawWorld
void R_DrawWorld(void)
Definition: gl_rsurf.c:1204
R_DrawSkyBox
void R_DrawSkyBox(void)
Definition: gl_warp.c:562
gl_polyblend
cvar_t * gl_polyblend
Definition: gl_rmain.c:123
gl_ztrick
cvar_t * gl_ztrick
Definition: gl_rmain.c:119
r_novis
cvar_t * r_novis
Definition: r_main.c:131
glconfig_t::renderer
int renderer
Definition: gl_local.h:406
glconfig_t::renderer_string
const char * renderer_string
Definition: gl_local.h:407
y
GLint y
Definition: qgl_win.c:115
GL_TexEnv
void GL_TexEnv(GLenum value)
Definition: gl_image.c:125
numgltextures
int numgltextures
Definition: gl_image.c:24
image_s::paletted
qboolean paletted
Definition: gl_local.h:107
gl_texsort
cvar_t * gl_texsort
image_s::texturechain
struct msurface_s * texturechain
Definition: gl_local.h:101
R_LightPoint
void R_LightPoint(vec3_t p, vec3_t color)
Definition: r_light.c:224
GL_ImageList_f
void GL_ImageList_f(void)
Definition: gl_image.c:302
gl_texturesolidmode
cvar_t * gl_texturesolidmode
Definition: gl_rmain.c:130
gl_finish
cvar_t * gl_finish
Definition: gl_rmain.c:120
r_lightlevel
cvar_t * r_lightlevel
Definition: r_main.c:134
glstate_t::hwgamma
qboolean hwgamma
Definition: gl_local.h:432
R_DrawBeam
void R_DrawBeam(entity_t *e)
Definition: r_main.c:1245
GL_EnableMultitexture
void GL_EnableMultitexture(qboolean enable)
Definition: gl_image.c:70
gl_particle_max_size
cvar_t * gl_particle_max_size
Definition: gl_rmain.c:91
r_fullbright
cvar_t * r_fullbright
Definition: r_main.c:129
image_s::upload_width
int upload_width
Definition: gl_local.h:99
currentmodel
model_t * currentmodel
Definition: r_main.c:37
WaterWarpPolyVerts
glpoly_t * WaterWarpPolyVerts(glpoly_t *p)
gl_tex_alpha_format
int gl_tex_alpha_format
Definition: gl_image.c:42
c_alias_polys
int c_alias_polys
Definition: gl_local.h:164
r_oldviewcluster2
int r_oldviewcluster2
Definition: gl_local.h:181
vup
vec3_t vup
Definition: r_main.c:66
R_CullBox
qboolean R_CullBox(vec3_t mins, vec3_t maxs)
Definition: gl_rmain.c:146
gl_cull
cvar_t * gl_cull
Definition: gl_rmain.c:122
image_s::sl
float sl
Definition: gl_local.h:103
R_DrawBrushModel
void R_DrawBrushModel(entity_t *e)
Definition: gl_rsurf.c:964
r_drawentities
cvar_t * r_drawentities
Definition: r_main.c:127
GL_SetTexturePalette
void GL_SetTexturePalette(unsigned palette[256])
Definition: gl_image.c:47
EmitWaterPolys
void EmitWaterPolys(msurface_t *fa)
Definition: gl_warp.c:211
GL_ScreenShot_f
void GL_ScreenShot_f(void)
Definition: gl_rmisc.c:100
glstate_t::fullscreen
qboolean fullscreen
Definition: gl_local.h:418
dlight_t
Definition: ref.h:84
entity_s
Definition: ref.h:49
r_worldmodel
model_t * r_worldmodel
Definition: r_main.c:39
gl_config
glconfig_t gl_config
Definition: gl_rmain.c:35
gl_ext_swapinterval
cvar_t * gl_ext_swapinterval
Definition: gl_rmain.c:97
gl_picmip
cvar_t * gl_picmip
Definition: gl_rmain.c:116
GL_UpdateSwapInterval
void GL_UpdateSwapInterval(void)
Definition: gl_rmisc.c:232
intensity
cvar_t * intensity
Definition: gl_image.c:30
image_s::has_alpha
qboolean has_alpha
Definition: gl_local.h:105
c_visible_textures
int c_visible_textures
Definition: gl_rsurf.c:40
glconfig_t::vendor_string
const char * vendor_string
Definition: gl_local.h:408
R_RegisterSkin
struct image_s * R_RegisterSkin(char *name)
Definition: r_image.c:564
msurface_s
Definition: r_model.h:93
Draw_Fill
void Draw_Fill(int x, int y, int w, int h, int c)
Definition: r_draw.c:394
format
GLsizei GLenum format
Definition: qgl_win.c:131
GLimp_EndFrame
void GLimp_EndFrame(void)
Definition: glw_imp.c:587
it_wall
@ it_wall
Definition: gl_local.h:89
gl_showtris
cvar_t * gl_showtris
Definition: gl_rmain.c:118
qgl.h
vright
vec3_t vright
Definition: r_main.c:68
glstate_t::lightmap_textures
int lightmap_textures
Definition: gl_local.h:424
R_RotateForEntity
void R_RotateForEntity(entity_t *e)
Definition: gl_rmain.c:160
gl_filter_max
int gl_filter_max
Definition: gl_local.h:167
image_s::upload_height
int upload_height
Definition: gl_local.h:99
gl_solid_format
int gl_solid_format
Definition: gl_image.c:38
currententity
entity_t * currententity
Definition: r_bsp.c:28
GL_ShutdownImages
void GL_ShutdownImages(void)
Definition: gl_image.c:1609
r_nocull
cvar_t * r_nocull
Definition: gl_rmain.c:79
r_origin
vec3_t r_origin
Definition: r_main.c:69
w
GLdouble GLdouble GLdouble w
Definition: qgl_win.c:291
GL_MBind
void GL_MBind(GLenum target, int texnum)
Definition: gl_image.c:148
glconfig_t::allow_cds
qboolean allow_cds
Definition: gl_local.h:412
image_s
Definition: r_local.h:65
particles
cparticle_t particles[MAX_PARTICLES]
Definition: cl_fx.c:63
r_world_matrix
float r_world_matrix[16]
Definition: gl_rmain.c:63
vid_fullscreen
cvar_t * vid_fullscreen
Definition: vid_dll.c:46
mode
GLenum mode
Definition: qgl_win.c:113
R_InitParticleTexture
void R_InitParticleTexture(void)
Definition: gl_rmisc.c:41
cplane_s
Definition: q_shared.h:409
d_8to24table
unsigned d_8to24table[256]
Definition: r_main.c:27
R_DrawSpriteModel
void R_DrawSpriteModel(entity_t *e)
Definition: gl_rmain.c:184
c_brush_polys
int c_brush_polys
Definition: gl_rmain.c:49
gldepthmin
float gldepthmin
Definition: gl_rmain.c:33
rserr_unknown
@ rserr_unknown
Definition: gl_local.h:125
gl_lockpvs
cvar_t * gl_lockpvs
Definition: gl_rmain.c:131
gl_particle_min_size
cvar_t * gl_particle_min_size
Definition: gl_rmain.c:90
R_MarkLights
void R_MarkLights(dlight_t *light, int bit, mnode_t *node)
Definition: r_light.c:40
registration_sequence
int registration_sequence
Definition: r_model.c:44
GL_BeginRendering
void GL_BeginRendering(int *x, int *y, int *width, int *height)
gl_swapinterval
cvar_t * gl_swapinterval
Definition: gl_rmain.c:127
ri
refimport_t ri
Definition: r_main.c:25
GL_SetDefaultState
void GL_SetDefaultState(void)
Definition: gl_rmisc.c:176
gl_monolightmap
cvar_t * gl_monolightmap
Definition: gl_rmain.c:112
glconfig_t::version_string
const char * version_string
Definition: gl_local.h:409
vec3_t
vec_t vec3_t[3]
Definition: q_shared.h:127
gl_model.h
glstate_t::d_16to8table
unsigned char * d_16to8table
Definition: gl_local.h:422
gl_tex_solid_format
int gl_tex_solid_format
Definition: gl_image.c:41
gl_particle_att_b
cvar_t * gl_particle_att_b
Definition: gl_rmain.c:94
V_AddBlend
void V_AddBlend(float r, float g, float b, float a, float *v_blend)
GL_LoadPic
image_t * GL_LoadPic(char *name, byte *pic, int width, int height, imagetype_t type, int bits)
Definition: gl_image.c:1255
r_norefresh
cvar_t * r_norefresh
Definition: gl_rmain.c:73
Draw_FadeScreen
void Draw_FadeScreen(void)
Definition: r_draw.c:428
R_MarkLeaves
void R_MarkLeaves(void)
Definition: r_main.c:432
GL_TextureMode
void GL_TextureMode(char *string)
Definition: gl_image.c:217
gl_lightmaptype
cvar_t * gl_lightmaptype
R_TranslatePlayerSkin
void R_TranslatePlayerSkin(int playernum)
image_s::sh
float sh
Definition: gl_local.h:103
glpoly_s
Definition: gl_model.h:86
R_DrawAliasModel
void R_DrawAliasModel(entity_t *e)
Definition: gl_mesh.c:534