|
|
@ -56,33 +56,21 @@ int r_screenwidth; |
|
|
|
|
|
|
|
|
|
|
|
int r_viewcluster, r_oldviewcluster; |
|
|
|
int r_viewcluster, r_oldviewcluster; |
|
|
|
|
|
|
|
|
|
|
|
cvar_t *sw_aliasstats; |
|
|
|
CVAR_DEFINE_AUTO( sw_clearcolor, "48999", 0, "screen clear color"); |
|
|
|
cvar_t *sw_allow_modex; |
|
|
|
CVAR_DEFINE_AUTO( sw_drawflat, "0", 0, ""); |
|
|
|
cvar_t *sw_clearcolor; |
|
|
|
CVAR_DEFINE_AUTO( sw_draworder, "0", 0, ""); |
|
|
|
cvar_t *sw_drawflat; |
|
|
|
CVAR_DEFINE_AUTO( sw_maxedges, "32", 0, ""); |
|
|
|
cvar_t *sw_draworder; |
|
|
|
static CVAR_DEFINE_AUTO( sw_maxsurfs, "0", 0, ""); |
|
|
|
cvar_t *sw_maxedges; |
|
|
|
CVAR_DEFINE_AUTO( sw_mipscale, "1", FCVAR_GLCONFIG, "nothing"); |
|
|
|
cvar_t *sw_maxsurfs; |
|
|
|
CVAR_DEFINE_AUTO( sw_mipcap, "0", FCVAR_GLCONFIG, "nothing" ); |
|
|
|
cvar_t *sw_reportedgeout; |
|
|
|
CVAR_DEFINE_AUTO( sw_surfcacheoverride, "0", 0, ""); |
|
|
|
cvar_t *sw_reportsurfout; |
|
|
|
static CVAR_DEFINE_AUTO( sw_waterwarp, "1", FCVAR_GLCONFIG, "nothing"); |
|
|
|
cvar_t *sw_stipplealpha; |
|
|
|
static CVAR_DEFINE_AUTO( sw_notransbrushes, "0", FCVAR_GLCONFIG, "do not apply transparency to water/glasses (faster)"); |
|
|
|
cvar_t *sw_surfcacheoverride; |
|
|
|
CVAR_DEFINE_AUTO( sw_noalphabrushes, "0", FCVAR_GLCONFIG, "do not draw brush holes (faster)"); |
|
|
|
cvar_t *sw_waterwarp; |
|
|
|
CVAR_DEFINE_AUTO( r_traceglow, "1", FCVAR_GLCONFIG, "cull flares behind models" ); |
|
|
|
cvar_t *sw_texfilt; |
|
|
|
CVAR_DEFINE_AUTO( sw_texfilt, "0", FCVAR_GLCONFIG, "texture dither"); |
|
|
|
cvar_t *sw_notransbrushes; |
|
|
|
static CVAR_DEFINE_AUTO( r_novis, "0", 0, "" ); |
|
|
|
cvar_t *sw_noalphabrushes; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cvar_t *r_drawworld; |
|
|
|
|
|
|
|
cvar_t *r_dspeeds; |
|
|
|
|
|
|
|
cvar_t *r_lerpmodels; |
|
|
|
|
|
|
|
cvar_t *r_novis; |
|
|
|
|
|
|
|
cvar_t *r_traceglow; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
cvar_t *r_lightlevel; //FIXME HACK
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//PGM
|
|
|
|
|
|
|
|
cvar_t *sw_lockpvs; |
|
|
|
|
|
|
|
//PGM
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DEFINE_ENGINE_SHARED_CVAR_LIST() |
|
|
|
DEFINE_ENGINE_SHARED_CVAR_LIST() |
|
|
|
|
|
|
|
|
|
|
@ -164,10 +152,10 @@ static qboolean R_OpaqueEntity( cl_entity_t *ent ) |
|
|
|
if( rendermode == kRenderNormal ) |
|
|
|
if( rendermode == kRenderNormal ) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
if( sw_notransbrushes->value && ent->model && ent->model->type == mod_brush && rendermode == kRenderTransTexture ) |
|
|
|
if( sw_notransbrushes.value && ent->model && ent->model->type == mod_brush && rendermode == kRenderTransTexture ) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
if( sw_noalphabrushes->value && ent->model && ent->model->type == mod_brush && rendermode == kRenderTransAlpha ) |
|
|
|
if( sw_noalphabrushes.value && ent->model && ent->model->type == mod_brush && rendermode == kRenderTransAlpha ) |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -1529,7 +1517,7 @@ void R_MarkLeaves (void) |
|
|
|
mnode_t *node; |
|
|
|
mnode_t *node; |
|
|
|
int i; |
|
|
|
int i; |
|
|
|
|
|
|
|
|
|
|
|
if (r_oldviewcluster == r_viewcluster && !r_novis->value && r_viewcluster != -1) |
|
|
|
if (r_oldviewcluster == r_viewcluster && !r_novis.value && r_viewcluster != -1) |
|
|
|
return; |
|
|
|
return; |
|
|
|
|
|
|
|
|
|
|
|
tr.visframecount++; |
|
|
|
tr.visframecount++; |
|
|
@ -1823,7 +1811,7 @@ void GAME_EXPORT R_NewMap (void) |
|
|
|
R_ClearDecals(); // clear all level decals
|
|
|
|
R_ClearDecals(); // clear all level decals
|
|
|
|
R_StudioResetPlayerModels(); |
|
|
|
R_StudioResetPlayerModels(); |
|
|
|
|
|
|
|
|
|
|
|
r_cnumsurfs = sw_maxsurfs->value; |
|
|
|
r_cnumsurfs = sw_maxsurfs.value; |
|
|
|
|
|
|
|
|
|
|
|
if (r_cnumsurfs <= MINSURFACES) |
|
|
|
if (r_cnumsurfs <= MINSURFACES) |
|
|
|
r_cnumsurfs = MINSURFACES; |
|
|
|
r_cnumsurfs = MINSURFACES; |
|
|
@ -1844,7 +1832,7 @@ void GAME_EXPORT R_NewMap (void) |
|
|
|
r_surfsonstack = true; |
|
|
|
r_surfsonstack = true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
r_numallocatededges = sw_maxedges->value; |
|
|
|
r_numallocatededges = sw_maxedges.value; |
|
|
|
|
|
|
|
|
|
|
|
if (r_numallocatededges < MINEDGES) |
|
|
|
if (r_numallocatededges < MINEDGES) |
|
|
|
r_numallocatededges = MINEDGES; |
|
|
|
r_numallocatededges = MINEDGES; |
|
|
@ -1913,32 +1901,23 @@ qboolean GAME_EXPORT R_Init( void ) |
|
|
|
|
|
|
|
|
|
|
|
RETRIEVE_ENGINE_SHARED_CVAR_LIST(); |
|
|
|
RETRIEVE_ENGINE_SHARED_CVAR_LIST(); |
|
|
|
|
|
|
|
|
|
|
|
// sw_aliasstats = ri.Cvar_Get ("sw_polymodelstats", "0", 0);
|
|
|
|
|
|
|
|
// sw_allow_modex = ri.Cvar_Get( "sw_allow_modex", "1", CVAR_ARCHIVE );
|
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_clearcolor ); |
|
|
|
sw_clearcolor = gEngfuncs.Cvar_Get ("sw_clearcolor", "48999", 0, "screen clear color"); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_drawflat ); |
|
|
|
sw_drawflat = gEngfuncs.Cvar_Get ("sw_drawflat", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_draworder ); |
|
|
|
sw_draworder = gEngfuncs.Cvar_Get ("sw_draworder", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_maxedges ); |
|
|
|
sw_maxedges = gEngfuncs.Cvar_Get ("sw_maxedges", "32", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_maxsurfs ); |
|
|
|
sw_maxsurfs = gEngfuncs.Cvar_Get ("sw_maxsurfs", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_mipscale ); |
|
|
|
sw_mipscale = gEngfuncs.Cvar_Get ("sw_mipscale", "1", FCVAR_GLCONFIG, "nothing"); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_mipcap ); |
|
|
|
sw_mipcap = gEngfuncs.Cvar_Get( "sw_mipcap", "0", FCVAR_GLCONFIG, "nothing" ); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_surfcacheoverride ); |
|
|
|
sw_reportedgeout = gEngfuncs.Cvar_Get ("sw_reportedgeout", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_waterwarp ); |
|
|
|
sw_reportsurfout = gEngfuncs.Cvar_Get ("sw_reportsurfout", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_notransbrushes ); |
|
|
|
sw_stipplealpha = gEngfuncs.Cvar_Get( "sw_stipplealpha", "1", FCVAR_GLCONFIG, "nothing" ); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_noalphabrushes ); |
|
|
|
sw_surfcacheoverride = gEngfuncs.Cvar_Get ("sw_surfcacheoverride", "0", 0, ""); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &r_traceglow ); |
|
|
|
sw_waterwarp = gEngfuncs.Cvar_Get ("sw_waterwarp", "1", FCVAR_GLCONFIG, "nothing"); |
|
|
|
|
|
|
|
sw_notransbrushes = gEngfuncs.Cvar_Get( "sw_notransbrushes", "0", FCVAR_GLCONFIG, "do not apply transparency to water/glasses (faster)"); |
|
|
|
|
|
|
|
sw_noalphabrushes = gEngfuncs.Cvar_Get( "sw_noalphabrushes", "0", FCVAR_GLCONFIG, "do not draw brush holes (faster)"); |
|
|
|
|
|
|
|
r_traceglow = gEngfuncs.Cvar_Get( "r_traceglow", "1", FCVAR_GLCONFIG, "cull flares behind models" ); |
|
|
|
|
|
|
|
#ifndef DISABLE_TEXFILTER |
|
|
|
#ifndef DISABLE_TEXFILTER |
|
|
|
sw_texfilt = gEngfuncs.Cvar_Get ("sw_texfilt", "0", FCVAR_GLCONFIG, "texture dither"); |
|
|
|
gEngfuncs.Cvar_RegisterVariable( &sw_texfilt ); |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
// r_speeds = ri.Cvar_Get ("r_speeds", "0", 0);
|
|
|
|
gEngfuncs.Cvar_RegisterVariable( &r_novis ); |
|
|
|
//r_drawworld = ri.Cvar_Get ("r_drawworld", "1", 0);
|
|
|
|
|
|
|
|
//r_dspeeds = ri.Cvar_Get ("r_dspeeds", "0", 0);
|
|
|
|
|
|
|
|
// r_lightlevel = ri.Cvar_Get ("r_lightlevel", "0", 0);
|
|
|
|
|
|
|
|
//r_lerpmodels = ri.Cvar_Get( "r_lerpmodels", "1", 0 );
|
|
|
|
|
|
|
|
r_novis = gEngfuncs.Cvar_Get( "r_novis", "0", 0, "" ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
r_temppool = Mem_AllocPool( "ref_soft zone" ); |
|
|
|
r_temppool = Mem_AllocPool( "ref_soft zone" ); |
|
|
|
|
|
|
|
|
|
|
|