mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2025-01-31 05:00:35 +00:00
Do a final cleanup before doing the big rename.
This commit is contained in:
parent
f7007825e4
commit
8de5c9ae3f
11 changed files with 52 additions and 57 deletions
|
@ -42,13 +42,13 @@ extern qboolean gl_mtex_capable;
|
|||
extern qboolean gl_mtex_fullbright;
|
||||
extern GLenum gl_mtex_enum;
|
||||
extern qboolean gl_combine_capable;
|
||||
extern float rgb_scale;
|
||||
extern int texture_extension_number;
|
||||
extern float gl_rgb_scale;
|
||||
extern int gl_texture_number;
|
||||
|
||||
extern qboolean gl_feature_mach64;
|
||||
extern float gldepthmin, gldepthmax;
|
||||
extern int use_bgra;
|
||||
extern int tess;
|
||||
extern int gl_use_bgra;
|
||||
extern int gl_tess;
|
||||
|
||||
extern int gl_max_lights;
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ GDT_InitParticleTexture (void)
|
|||
|
||||
memset (data, 0, sizeof (data));
|
||||
|
||||
gl_part_tex = texture_extension_number++;
|
||||
gl_part_tex = gl_texture_number++;
|
||||
qfglBindTexture (GL_TEXTURE_2D, gl_part_tex);
|
||||
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
|
||||
qfglTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
|
||||
|
|
|
@ -547,7 +547,7 @@ gl_overbright_f (cvar_t *var)
|
|||
lm_src_blend = GL_ZERO;
|
||||
lm_dest_blend = GL_SRC_COLOR;
|
||||
lmshift = 7;
|
||||
rgb_scale = 1.0;
|
||||
gl_rgb_scale = 1.0;
|
||||
} else {
|
||||
lm_src_blend = GL_DST_COLOR;
|
||||
lm_dest_blend = GL_SRC_COLOR;
|
||||
|
@ -555,15 +555,15 @@ gl_overbright_f (cvar_t *var)
|
|||
switch (var->int_val) {
|
||||
case 2:
|
||||
lmshift = 9;
|
||||
rgb_scale = 4.0;
|
||||
gl_rgb_scale = 4.0;
|
||||
break;
|
||||
case 1:
|
||||
lmshift = 8;
|
||||
rgb_scale = 2.0;
|
||||
gl_rgb_scale = 2.0;
|
||||
break;
|
||||
default:
|
||||
lmshift = 7;
|
||||
rgb_scale = 1.0;
|
||||
gl_rgb_scale = 1.0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -571,7 +571,7 @@ gl_overbright_f (cvar_t *var)
|
|||
lm_src_blend = GL_ZERO;
|
||||
lm_dest_blend = GL_SRC_COLOR;
|
||||
lmshift = 7;
|
||||
rgb_scale = 1.0;
|
||||
gl_rgb_scale = 1.0;
|
||||
}
|
||||
|
||||
if (gl_multitexture)
|
||||
|
@ -696,8 +696,8 @@ GL_BuildLightmaps (model_t **models, int num_models)
|
|||
r_framecount = 1; // no dlightcache
|
||||
|
||||
if (!gl_lightmap_textures) {
|
||||
gl_lightmap_textures = texture_extension_number;
|
||||
texture_extension_number += MAX_LIGHTMAPS;
|
||||
gl_lightmap_textures = gl_texture_number;
|
||||
gl_texture_number += MAX_LIGHTMAPS;
|
||||
}
|
||||
|
||||
switch (r_lightmap_components->int_val) {
|
||||
|
@ -709,7 +709,7 @@ GL_BuildLightmaps (model_t **models, int num_models)
|
|||
break;
|
||||
case 3:
|
||||
gl_internalformat = 3;
|
||||
if (use_bgra)
|
||||
if (gl_use_bgra)
|
||||
gl_lightmap_format = GL_BGR;
|
||||
else
|
||||
gl_lightmap_format = GL_RGB;
|
||||
|
@ -719,7 +719,7 @@ GL_BuildLightmaps (model_t **models, int num_models)
|
|||
case 4:
|
||||
default:
|
||||
gl_internalformat = 3;
|
||||
if (use_bgra)
|
||||
if (gl_use_bgra)
|
||||
gl_lightmap_format = GL_BGRA;
|
||||
else
|
||||
gl_lightmap_format = GL_RGBA;
|
||||
|
|
|
@ -554,7 +554,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglDisable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglDisable (GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -564,7 +564,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
GL_DrawAliasFrame (vo);
|
||||
|
||||
if (gl_vector_light->int_val) {
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
qfglEnable (GL_LIGHTING);
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglDisable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglDisable (GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -611,7 +611,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglEnable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
}
|
||||
} else {
|
||||
|
@ -620,7 +620,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglDisable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglDisable (GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -631,7 +631,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglEnable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
}
|
||||
}
|
||||
|
@ -645,7 +645,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
qfglPushMatrix ();
|
||||
R_RotateForEntity (e);
|
||||
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglDisable (GL_NORMALIZE);
|
||||
qfglDisable (GL_LIGHTING);
|
||||
qfglDisable (GL_TEXTURE_2D);
|
||||
|
@ -664,7 +664,7 @@ R_DrawAliasModel (entity_t *e)
|
|||
qfglDepthMask (GL_TRUE);
|
||||
qfglEnable (GL_TEXTURE_2D);
|
||||
qfglEnable (GL_LIGHTING);
|
||||
if (!tess)
|
||||
if (!gl_tess)
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
qfglPopMatrix ();
|
||||
} else if (gl_modelalpha < 1.0) {
|
||||
|
|
|
@ -204,14 +204,14 @@ R_DrawEntitiesOnList (void)
|
|||
}
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
|
||||
if (tess)
|
||||
if (gl_tess)
|
||||
qfglEnable (GL_PN_TRIANGLES_ATI);
|
||||
qfglEnable (GL_CULL_FACE);
|
||||
|
||||
if (gl_vector_light->int_val) {
|
||||
qfglEnable (GL_LIGHTING);
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
} else if (tess) {
|
||||
} else if (gl_tess) {
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -228,7 +228,7 @@ R_DrawEntitiesOnList (void)
|
|||
qfglDisable (GL_LIGHTING);
|
||||
|
||||
qfglDisable (GL_CULL_FACE);
|
||||
if (tess)
|
||||
if (gl_tess)
|
||||
qfglDisable (GL_PN_TRIANGLES_ATI);
|
||||
if (gl_affinemodels->int_val)
|
||||
qfglHint (GL_PERSPECTIVE_CORRECTION_HINT, GL_DONT_CARE);
|
||||
|
@ -239,7 +239,7 @@ R_DrawEntitiesOnList (void)
|
|||
if (gl_combine_capable && gl_overbright->int_val) {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, rgb_scale);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, gl_rgb_scale);
|
||||
} else {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
}
|
||||
|
@ -279,7 +279,7 @@ R_DrawViewModel (void)
|
|||
if (gl_vector_light->int_val) {
|
||||
qfglEnable (GL_LIGHTING);
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
} else if (tess) {
|
||||
} else if (gl_tess) {
|
||||
qfglEnable (GL_NORMALIZE);
|
||||
}
|
||||
|
||||
|
@ -303,7 +303,7 @@ R_DrawViewModel (void)
|
|||
if (gl_combine_capable && gl_overbright->int_val) {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, rgb_scale);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, gl_rgb_scale);
|
||||
} else {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
}
|
||||
|
|
|
@ -151,9 +151,9 @@ R_Init (void)
|
|||
|
||||
GDT_Init ();
|
||||
|
||||
texture_extension_number = R_InitGraphTextures (texture_extension_number);
|
||||
gl_texture_number = R_InitGraphTextures (gl_texture_number);
|
||||
|
||||
texture_extension_number = Skin_Init_Textures (texture_extension_number);
|
||||
gl_texture_number = Skin_Init_Textures (gl_texture_number);
|
||||
|
||||
r_init = 1;
|
||||
R_InitParticles ();
|
||||
|
|
|
@ -428,7 +428,7 @@ R_InitSky (texture_t *mt)
|
|||
((byte *) & transpix)[3] = 0;
|
||||
|
||||
if (!gl_solidskytexture)
|
||||
gl_solidskytexture = texture_extension_number++;
|
||||
gl_solidskytexture = gl_texture_number++;
|
||||
qfglBindTexture (GL_TEXTURE_2D, gl_solidskytexture);
|
||||
qfglTexImage2D (GL_TEXTURE_2D, 0, gl_solid_format, 128, 128, 0, GL_RGBA,
|
||||
GL_UNSIGNED_BYTE, trans);
|
||||
|
@ -448,7 +448,7 @@ R_InitSky (texture_t *mt)
|
|||
}
|
||||
|
||||
if (!gl_alphaskytexture)
|
||||
gl_alphaskytexture = texture_extension_number++;
|
||||
gl_alphaskytexture = gl_texture_number++;
|
||||
qfglBindTexture (GL_TEXTURE_2D, gl_alphaskytexture);
|
||||
qfglTexImage2D (GL_TEXTURE_2D, 0, gl_alpha_format, 128, 128, 0, GL_RGBA,
|
||||
GL_UNSIGNED_BYTE, trans);
|
||||
|
|
|
@ -587,8 +587,8 @@ GL_LoadTexture (const char *identifier, int width, int height, const byte *data,
|
|||
strncpy (glt->identifier, identifier, sizeof (glt->identifier) - 1);
|
||||
glt->identifier[sizeof (glt->identifier) - 1] = '\0';
|
||||
|
||||
glt->texnum = texture_extension_number;
|
||||
texture_extension_number++;
|
||||
glt->texnum = gl_texture_number;
|
||||
gl_texture_number++;
|
||||
|
||||
SetupTexture:
|
||||
glt->crc = crc;
|
||||
|
|
|
@ -78,11 +78,11 @@ int gl_minor;
|
|||
int gl_release_number;
|
||||
|
||||
static int gl_bgra_capable;
|
||||
int use_bgra;
|
||||
int gl_use_bgra;
|
||||
int gl_va_capable;
|
||||
static int driver_vaelements;
|
||||
int vaelements;
|
||||
int texture_extension_number = 1;
|
||||
int gl_texture_number = 1;
|
||||
int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR;
|
||||
int gl_filter_max = GL_LINEAR;
|
||||
float gldepthmin, gldepthmax;
|
||||
|
@ -97,7 +97,7 @@ qboolean gl_mtex_fullbright = false;
|
|||
// Combine
|
||||
qboolean gl_combine_capable = false;
|
||||
int lm_src_blend, lm_dest_blend;
|
||||
float rgb_scale = 1.0;
|
||||
float gl_rgb_scale = 1.0;
|
||||
|
||||
QF_glColorTableEXT qglColorTableEXT = NULL;
|
||||
|
||||
|
@ -111,7 +111,7 @@ float gl_aniso;
|
|||
// GL_ATI_pn_triangles
|
||||
static qboolean TruForm;
|
||||
static int tess_max;
|
||||
int tess;
|
||||
int gl_tess;
|
||||
|
||||
// GL_LIGHT
|
||||
int gl_max_lights;
|
||||
|
@ -127,8 +127,7 @@ cvar_t *gl_textures_bgra;
|
|||
cvar_t *gl_vaelements_max;
|
||||
cvar_t *gl_vector_light;
|
||||
cvar_t *gl_screenshot_byte_swap;
|
||||
cvar_t *vid_mode;
|
||||
cvar_t *vid_use8bit;
|
||||
static cvar_t *vid_use8bit;
|
||||
|
||||
void gl_multitexture_f (cvar_t *var);
|
||||
|
||||
|
@ -157,9 +156,9 @@ gl_textures_bgra_f (cvar_t *var)
|
|||
return;
|
||||
|
||||
if (var->int_val && gl_bgra_capable) {
|
||||
use_bgra = 1;
|
||||
gl_use_bgra = 1;
|
||||
} else {
|
||||
use_bgra = 0;
|
||||
gl_use_bgra = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -212,7 +211,7 @@ gl_multitexture_f (cvar_t *var)
|
|||
if (gl_combine_capable && gl_overbright->int_val) {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_COMBINE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_COMBINE_RGB, GL_MODULATE);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, rgb_scale);
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_RGB_SCALE, gl_rgb_scale);
|
||||
} else {
|
||||
qfglTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
|
||||
}
|
||||
|
@ -260,12 +259,12 @@ gl_tessellate_f (cvar_t * var)
|
|||
{
|
||||
if (TruForm) {
|
||||
if (var)
|
||||
tess = (bound (0, var->int_val, tess_max));
|
||||
gl_tess = (bound (0, var->int_val, tess_max));
|
||||
else
|
||||
tess = 0;
|
||||
qfglPNTrianglesiATI (GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI, tess);
|
||||
gl_tess = 0;
|
||||
qfglPNTrianglesiATI (GL_PN_TRIANGLES_TESSELATION_LEVEL_ATI, gl_tess);
|
||||
} else {
|
||||
tess = 0;
|
||||
gl_tess = 0;
|
||||
if (var)
|
||||
Sys_MaskPrintf (SYS_VID,
|
||||
"TruForm (GL_ATI_pn_triangles) is not supported "
|
||||
|
@ -473,7 +472,7 @@ CheckTruFormExtensions (void)
|
|||
GL_PN_TRIANGLES_POINT_MODE_CUBIC_ATI);
|
||||
} else {
|
||||
TruForm = false;
|
||||
tess = 0;
|
||||
gl_tess = 0;
|
||||
tess_max = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,11 +61,11 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
|
|||
#include "r_internal.h"
|
||||
|
||||
/* Unknown renamed to GLErr_Unknown to solve conflict with winioctl.h */
|
||||
unsigned int GLErr_InvalidEnum;
|
||||
unsigned int GLErr_InvalidValue;
|
||||
unsigned int GLErr_InvalidOperation;
|
||||
unsigned int GLErr_OutOfMemory;
|
||||
unsigned int GLErr_Unknown;
|
||||
static unsigned int GLErr_InvalidEnum;
|
||||
static unsigned int GLErr_InvalidValue;
|
||||
static unsigned int GLErr_InvalidOperation;
|
||||
static unsigned int GLErr_OutOfMemory;
|
||||
static unsigned int GLErr_Unknown;
|
||||
|
||||
extern void (*R_DrawSpriteModel) (struct entity_s *ent);
|
||||
|
||||
|
|
|
@ -60,10 +60,6 @@ static __attribute__ ((used)) const char rcsid[] = "$Id$";
|
|||
|
||||
int glsl_palette;
|
||||
int glsl_colormap;
|
||||
int gl_filter_min = GL_LINEAR_MIPMAP_LINEAR;
|
||||
int gl_filter_max = GL_LINEAR;
|
||||
float gldepthmin, gldepthmax;
|
||||
qboolean is8bit = false;
|
||||
|
||||
static void
|
||||
GLSL_Common_Init_Cvars (void)
|
||||
|
|
Loading…
Reference in a new issue