mirror of
https://github.com/nzp-team/fteqw.git
synced 2025-01-18 14:31:52 +00:00
add cvar gl_overbright_all, 0 (default) = use overbrights only on Q1/H2/Q2 models, 1 = use on all models, set an engineflag marking non-map stuff but Spike needs to implement a gl_overbright_models
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2222 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
f57808caf0
commit
a7a6dcc92f
6 changed files with 20 additions and 7 deletions
|
@ -145,6 +145,7 @@ extern cvar_t gl_mindist;
|
|||
cvar_t gl_detail = SCVARF("gl_detail", "0", CVAR_ARCHIVE);
|
||||
cvar_t gl_detailscale = SCVAR("gl_detailscale", "5");
|
||||
cvar_t gl_overbright = SCVARF("gl_overbright", "0", CVAR_ARCHIVE);
|
||||
cvar_t gl_overbright_all = SCVARF("gl_overbright_all", "0", CVAR_ARCHIVE);
|
||||
cvar_t r_shadows = SCVARF("r_shadows", "0", CVAR_ARCHIVE|CVAR_RENDERERLATCH);
|
||||
cvar_t r_shadow_realtime_world = SCVARF("r_shadow_realtime_world", "0", CVAR_CHEAT|CVAR_ARCHIVE);
|
||||
cvar_t r_shadow_realtime_world_lightmaps = SCVARF("r_shadow_realtime_world_lightmaps", "0.8", CVAR_CHEAT);
|
||||
|
@ -351,6 +352,7 @@ void GLRenderer_Init(void)
|
|||
Cvar_Register (&gl_detail, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_detailscale, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_overbright, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_overbright_all, GRAPHICALNICETIES);
|
||||
Cvar_Register (&gl_dither, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_fb_models, GRAPHICALNICETIES);
|
||||
Cvar_Register (&r_fb_bmodels, GRAPHICALNICETIES);
|
||||
|
|
|
@ -5997,6 +5997,7 @@ int map_checksum;
|
|||
qboolean Mod_LoadQ2BrushModel (model_t *mod, void *buffer)
|
||||
{
|
||||
mod->fromgame = fg_quake2;
|
||||
mod->engineflags |= MDLF_NEEDOVERBRIGHT;
|
||||
return CM_LoadMap(mod->name, buffer, true, &map_checksum) != NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -3412,6 +3412,8 @@ qboolean GL_LoadQ1Model (model_t *mod, void *buffer)
|
|||
|
||||
pq1inmodel = (dmdl_t *)buffer;
|
||||
|
||||
loadmodel->engineflags |= MDLF_NEEDOVERBRIGHT;
|
||||
|
||||
version = LittleLong(pq1inmodel->version);
|
||||
if (version == QTESTALIAS_VERSION)
|
||||
qtest = true;
|
||||
|
@ -3701,6 +3703,8 @@ qboolean GL_LoadQ2Model (model_t *mod, void *buffer)
|
|||
|
||||
loadmodel=mod;
|
||||
|
||||
loadmodel->engineflags |= MDLF_NEEDOVERBRIGHT;
|
||||
|
||||
Mod_DoCRC(mod, buffer, com_filesize);
|
||||
|
||||
hunkstart = Hunk_LowMark ();
|
||||
|
|
|
@ -2584,7 +2584,10 @@ qboolean GLMod_LoadBrushModel (model_t *mod, void *buffer)
|
|||
i = LittleLong (header->version);
|
||||
|
||||
if (i == BSPVERSION || i == BSPVERSIONPREREL)
|
||||
{
|
||||
loadmodel->fromgame = fg_quake;
|
||||
loadmodel->engineflags |= MDLF_NEEDOVERBRIGHT;
|
||||
}
|
||||
else if (i == BSPVERSIONHL) //halflife support
|
||||
loadmodel->fromgame = fg_halflife;
|
||||
else
|
||||
|
|
|
@ -810,6 +810,7 @@ typedef struct model_s
|
|||
#define MDLF_PLAYER 0x08 // players have specific lighting values
|
||||
#define MDLF_FLAME 0x10 // can be excluded with r_drawflame
|
||||
#define MDLF_DOCRC 0x20 // model needs CRC built
|
||||
#define MDLF_NEEDOVERBRIGHT 0x40 // only overbright these models with gl_overbright_all set
|
||||
|
||||
//============================================================================
|
||||
/*
|
||||
|
|
|
@ -29,7 +29,7 @@ extern int lightmap_bytes; // 1, 2, or 4
|
|||
|
||||
extern cvar_t gl_detail;
|
||||
extern cvar_t gl_detailscale;
|
||||
extern cvar_t gl_overbright;
|
||||
extern cvar_t gl_overbright, gl_overbright_all;
|
||||
extern cvar_t r_fb_bmodels;
|
||||
extern cvar_t gl_part_flame;
|
||||
|
||||
|
@ -1651,12 +1651,14 @@ void PPL_BaseTextures(model_t *model)
|
|||
|
||||
qglShadeModel(GL_FLAT);
|
||||
|
||||
if (gl_overbright.value>=2)
|
||||
overbright = 4;
|
||||
else if (gl_overbright.value)
|
||||
overbright = 2;
|
||||
else
|
||||
overbright = 1;
|
||||
overbright = 1;
|
||||
if (gl_overbright_all.value || (model->engineflags & MDLF_NEEDOVERBRIGHT))
|
||||
{
|
||||
if (gl_overbright.value>=2)
|
||||
overbright = 4;
|
||||
else if (gl_overbright.value)
|
||||
overbright = 2;
|
||||
}
|
||||
|
||||
currentmodel = model;
|
||||
|
||||
|
|
Loading…
Reference in a new issue