Add gl_meshcache cvar for toggling it on and off

This commit is contained in:
Magnus Norddahl 2022-12-28 23:56:26 +01:00
commit 2d335d0f97
2 changed files with 28 additions and 12 deletions

View file

@ -10,6 +10,7 @@
EXTERN_CVAR(Bool, gl_texture)
EXTERN_CVAR(Float, gl_mask_threshold)
EXTERN_CVAR(Bool, gl_meshcache)
HWMeshCache meshcache;
@ -21,6 +22,9 @@ void HWMeshCache::Clear()
void HWMeshCache::Update(FRenderViewpoint& vp)
{
if (!gl_meshcache)
return;
auto level = vp.ViewLevel;
unsigned int count = level->sectors.Size();
Sectors.Resize(count);