Add cvar for speed testing always updating the lightmap

This commit is contained in:
Magnus Norddahl 2023-09-16 05:33:00 +02:00 committed by Christoph Oelckers
parent b7618d3a5d
commit f45ab9b75c
2 changed files with 9 additions and 0 deletions

View file

@ -52,6 +52,8 @@
EXTERN_CVAR(Float, r_visibility) EXTERN_CVAR(Float, r_visibility)
EXTERN_CVAR(Int, lm_background_updates); EXTERN_CVAR(Int, lm_background_updates);
CVAR(Bool, lm_always_update, false, 0)
CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE) CVAR(Bool, gl_bandedswlight, false, CVAR_ARCHIVE)
CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, gl_sort_textures, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)
CVAR(Bool, gl_no_skyclear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG) CVAR(Bool, gl_no_skyclear, false, CVAR_ARCHIVE | CVAR_GLOBALCONFIG)

View file

@ -10,6 +10,8 @@
#include "hw_weapon.h" #include "hw_weapon.h"
#include "hw_drawlist.h" #include "hw_drawlist.h"
EXTERN_CVAR(Bool, lm_always_update);
enum EDrawMode enum EDrawMode
{ {
DM_MAINVIEW, DM_MAINVIEW,
@ -207,6 +209,11 @@ struct HWDrawInfo
return; return;
} }
if (lm_always_update)
{
surface->needsUpdate = true;
}
if (surface->needsUpdate && !surface->portalIndex && !surface->bSky) if (surface->needsUpdate && !surface->portalIndex && !surface->bSky)
{ {
VisibleSurfaces.Push(surface); VisibleSurfaces.Push(surface);