- reverted the counter for the vertex angle cache to a simple incrementing global variable.

Using I_MSTime is not precise enough, because some camera textures can be done quicker. It was pointless anyway trying to make this multithreading-safe, the entire caching idea here makes no sense if two clippers can simultaneously work on the same level data without changing the memory organization and rendering it ineffective.
This commit is contained in:
Christoph Oelckers 2017-03-20 01:21:33 +01:00
parent 1031481167
commit f45371e231
2 changed files with 4 additions and 3 deletions

View File

@ -38,10 +38,11 @@
#include "gl/scene/gl_clipper.h" #include "gl/scene/gl_clipper.h"
#include "g_levellocals.h" #include "g_levellocals.h"
unsigned Clipper::starttime;
Clipper::Clipper() Clipper::Clipper()
{ {
starttime = I_MSTime(); starttime++;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@ -94,7 +95,7 @@ void Clipper::Clear()
cliphead = NULL; cliphead = NULL;
silhouette = NULL; silhouette = NULL;
starttime = I_MSTime(); starttime++;
} }
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------

View File

@ -30,7 +30,7 @@ class ClipNode
class Clipper class Clipper
{ {
unsigned starttime; static unsigned starttime;
FMemArena nodearena; FMemArena nodearena;
ClipNode * freelist = nullptr; ClipNode * freelist = nullptr;