removed r_nobind and r_showImages, wrote help etc. for the renderer's other temp/cheat CVars

This commit is contained in:
myT 2020-04-02 05:06:00 +02:00
parent 546296e6ef
commit d5984db690
5 changed files with 24 additions and 37 deletions

View file

@ -122,7 +122,7 @@ chg: r_textureMode <filter> (default: "best") is now latched and only supports 2
r_textureMode GL_NEAREST = LEGO(R) mode - nearest-neighbor filtering for a subset of surfaces
r_textureMode anything else = normal mode - the engine picks the most appropriate filters
chg: r_measureOverdraw was removed
chg: removed the following CVars: r_measureOverdraw, r_nobind, r_showImages
chg: r_speeds 1 now reports more precise timings, V-Sync status, GPU time and the selected back-end

View file

@ -823,10 +823,6 @@ static void GL_Bind( const image_t* image )
texnum = (GLuint)image->texnum;
}
if ( r_nobind->integer && tr.defaultImage && !backEnd.projection2D ) {
texnum = (GLuint)tr.defaultImage->texnum;
}
if ( glState.texID[glState.currenttmu] != texnum ) {
glState.texID[glState.currenttmu] = texnum;
glBindTexture( GL_TEXTURE_2D, texnum );

View file

@ -85,7 +85,6 @@ cvar_t *r_vertexLight;
cvar_t *r_uiFullScreen;
cvar_t *r_mode;
cvar_t *r_blitMode;
cvar_t *r_nobind;
cvar_t *r_singleShader;
cvar_t *r_roundImagesDown;
cvar_t *r_colorMipLevels;
@ -113,8 +112,6 @@ cvar_t *r_mapBrightness;
cvar_t *r_debugSurface;
cvar_t *r_showImages;
cvar_t *r_ambientScale;
cvar_t *r_directedScale;
cvar_t *r_debugLight;
@ -416,31 +413,29 @@ static const cvarTableItem_t r_cvars[] =
//
// temporary variables that can change at any time
//
{ &r_ambientScale, "r_ambientScale", "0.6", CVAR_CHEAT },
{ &r_directedScale, "r_directedScale", "1", CVAR_CHEAT },
{ &r_uiFullScreen, "r_uifullscreen", "0", CVAR_TEMP },
{ &r_showImages, "r_showImages", "0", CVAR_TEMP },
{ &r_debugLight, "r_debuglight", "0", CVAR_TEMP },
{ &r_debugSort, "r_debugSort", "0", CVAR_CHEAT, CVART_FLOAT },
{ &r_nocurves, "r_nocurves", "0", CVAR_CHEAT },
{ &r_drawworld, "r_drawworld", "1", CVAR_CHEAT },
{ &r_portalOnly, "r_portalOnly", "0", CVAR_CHEAT },
{ &r_lodscale, "r_lodscale", "5", CVAR_CHEAT },
{ &r_norefresh, "r_norefresh", "0", CVAR_CHEAT },
{ &r_drawentities, "r_drawentities", "1", CVAR_CHEAT },
{ &r_nocull, "r_nocull", "0", CVAR_CHEAT },
{ &r_novis, "r_novis", "0", CVAR_CHEAT },
{ &r_speeds, "r_speeds", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "draw rendering performance counters" },
{ &r_verbose, "r_verbose", "0", CVAR_CHEAT },
{ &r_debugSurface, "r_debugSurface", "0", CVAR_CHEAT },
{ &r_nobind, "r_nobind", "0", CVAR_CHEAT },
{ &r_showtris, "r_showtris", "0", CVAR_CHEAT },
{ &r_ambientScale, "r_ambientScale", "0.6", CVAR_CHEAT, CVART_FLOAT, "0", NULL, "entity ambient light scale" },
{ &r_directedScale, "r_directedScale", "1", CVAR_CHEAT, CVART_FLOAT, "0", NULL, "entity directed light scale" },
{ &r_uiFullScreen, "r_uifullscreen", "0", CVAR_TEMP, CVART_BOOL }, // keeping it around in case we enable other mods again
{ &r_debugLight, "r_debuglight", "0", CVAR_TEMP, CVART_BOOL, NULL, NULL, "prints entity light values" },
{ &r_debugSort, "r_debugSort", "0", CVAR_CHEAT, CVART_FLOAT, "0", NULL, "doesn't render shaders with a greater sort key" },
{ &r_nocurves, "r_nocurves", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "doesn't render grid meshes" },
{ &r_drawworld, "r_drawworld", "1", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "disables rendering of world surfaces" },
{ &r_portalOnly, "r_portalOnly", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "only draws the mirrored plane" },
{ &r_lodscale, "r_lodscale", "5", CVAR_CHEAT, CVART_FLOAT, "1", "20", "LOD scale for MD3 models" },
{ &r_norefresh, "r_norefresh", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "disables 3D scene rendering" },
{ &r_drawentities, "r_drawentities", "1", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "enables entity rendering" },
{ &r_nocull, "r_nocull", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "disables frustum culling" },
{ &r_novis, "r_novis", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "disables PVS usage" },
{ &r_speeds, "r_speeds", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "draws rendering performance counters" },
{ &r_verbose, "r_verbose", "0", CVAR_TEMP, CVART_BOOL, NULL, NULL, "prints additional information" },
{ &r_debugSurface, "r_debugSurface", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "draws collision models" },
{ &r_showtris, "r_showtris", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "draws wireframe triangles" },
{ &r_showsky, "r_showsky", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "forces sky in front of all surfaces" },
{ &r_shownormals, "r_shownormals", "0", CVAR_CHEAT },
{ &r_clear, "r_clear", "0", CVAR_CHEAT },
{ &r_lockpvs, "r_lockpvs", "0", CVAR_CHEAT },
{ &r_maxpolys, "r_maxpolys", XSTRING(DEFAULT_MAX_POLYS), 0 },
{ &r_maxpolyverts, "r_maxpolyverts", XSTRING(DEFAULT_MAX_POLYVERTS), 0 }
{ &r_shownormals, "r_shownormals", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "draws wireframe normals" },
{ &r_clear, "r_clear", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "clears to violet instead of black" },
{ &r_lockpvs, "r_lockpvs", "0", CVAR_CHEAT, CVART_BOOL, NULL, NULL, "helps visualize the current PVS' limits" },
{ &r_maxpolys, "r_maxpolys", XSTRING(DEFAULT_MAX_POLYS), 0, CVART_INTEGER, XSTRING(DEFAULT_MAX_POLYS), NULL, "maximum polygon count per frame" },
{ &r_maxpolyverts, "r_maxpolyverts", XSTRING(DEFAULT_MAX_POLYVERTS), 0, CVART_INTEGER, XSTRING(DEFAULT_MAX_POLYVERTS), NULL, "maximum polygon vertex count per frame" }
};

View file

@ -1013,7 +1013,6 @@ extern cvar_t *r_d3d11_presentMode; // DXGI presentation model, see DXGIPM_*
extern cvar_t *r_ext_max_anisotropy;
extern cvar_t *r_msaa;
extern cvar_t *r_nobind; // turns off binding to appropriate textures
extern cvar_t *r_singleShader; // make most world faces use default shader
extern cvar_t *r_roundImagesDown;
extern cvar_t *r_colorMipLevels; // development aid to see texture mip usage
@ -1044,7 +1043,6 @@ extern cvar_t *r_mapBrightness;
extern cvar_t *r_debugSurface;
extern cvar_t *r_showImages;
extern cvar_t *r_debugSort;

View file

@ -176,9 +176,7 @@ static int R_ComputeLOD( const trRefEntity_t* ent )
if ( ( projectedRadius = ProjectRadius( radius, ent->e.origin ) ) != 0 )
{
float lodscale = r_lodscale->value;
if (lodscale > 20) lodscale = 20;
flod = 1.0f - projectedRadius * lodscale;
flod = 1.0f - projectedRadius * r_lodscale->value;
}
else
{