Commit f079384f authored by Richard Gobeille's avatar Richard Gobeille
Browse files

engine: skip CVAR_RESTARTVID handling for polymer-specific cvars when not...

engine: skip CVAR_RESTARTVID handling for polymer-specific cvars when not running polymer, limit r_pr_shadowdetail to 5 (4096x4096)
parent 6bdc1147
......@@ -2334,7 +2334,11 @@ int osdcmd_cvar_set(osdcmdptr_t parm)
break;
fallthrough__;
case CVAR_RESTARTVID:
osdcmd_restartvid(NULL);
{
int const pr = Bstrncmp(pData.name, "r_pr", 4);
if ((!pr && videoGetRenderMode() == REND_POLYMER) || pr)
osdcmd_restartvid(NULL);
}
break;
case CVAR_INVALIDATEALL:
gltexinvalidatetype(INVALIDATE_ALL);
......
......@@ -10058,9 +10058,9 @@ void polymost_initosdfuncs(void)
{ "r_pr_overridespecular", "overrides specular material power and factor values with values from the pr_specularpower and pr_specularfactor cvars; use it to fine-tune DEF tokens", (void *) &pr_overridespecular, CVAR_BOOL | CVAR_NOSAVE, 0, 1 },
{ "r_pr_parallaxbias", "overriden parallax mapping offset bias", (void *) &pr_parallaxbias, CVAR_FLOAT | CVAR_NOSAVE, -10, 10 },
{ "r_pr_parallaxscale", "overriden parallax mapping offset scale", (void *) &pr_parallaxscale, CVAR_FLOAT | CVAR_NOSAVE, -10, 10 },
{ "r_pr_shadowcount", "maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void *) &pr_shadowcount, CVAR_INT, 0, 64 },
{ "r_pr_shadowdetail", "sets the shadow map resolution - you need to restart the renderer for it to take effect", (void *) &pr_shadowdetail, CVAR_INT, 0, 6 },
{ "r_pr_shadowfiltering", "enable/disable shadow edges filtering - you need to restart the renderer for it to take effect", (void *) &pr_shadowfiltering, CVAR_BOOL, 0, 1 },
{ "r_pr_shadowcount", "maximal amount of shadow emitting lights on screen - you need to restart the renderer for it to take effect", (void *) &pr_shadowcount, CVAR_INT | CVAR_RESTARTVID, 0, 64 },
{ "r_pr_shadowdetail", "sets the shadow map resolution - you need to restart the renderer for it to take effect", (void *) &pr_shadowdetail, CVAR_INT | CVAR_RESTARTVID, 0, 5 },
{ "r_pr_shadowfiltering", "enable/disable shadow edges filtering - you need to restart the renderer for it to take effect", (void *) &pr_shadowfiltering, CVAR_BOOL | CVAR_RESTARTVID, 0, 1 },
{ "r_pr_shadows", "enable/disable dynamic shadows", (void *) &pr_shadows, CVAR_BOOL, 0, 1 },
{ "r_pr_specularfactor", "overriden specular material factor", (void *) &pr_specularfactor, CVAR_FLOAT | CVAR_NOSAVE, -10, 1000 },
{ "r_pr_specularmapping", "enable/disable specular mapping", (void *) &pr_specularmapping, CVAR_BOOL, 0, 1 },
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment