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