Skip to content

Commit

Permalink
remove shadowcache object
Browse files Browse the repository at this point in the history
literally just a hashtable anyways
  • Loading branch information
no-lex committed Oct 19, 2023
1 parent f1cbc12 commit 624cff3
Showing 1 changed file with 2 additions and 12 deletions.
14 changes: 2 additions & 12 deletions src/engine/render/renderlights.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1120,21 +1120,11 @@ struct shadowcacheval
shadowcacheval(const shadowmapinfo &sm) : x(sm.x), y(sm.y), size(sm.size), sidemask(sm.sidemask) {}
};

struct shadowcache : hashtable<shadowcachekey, shadowcacheval>
{
shadowcache() : hashtable<shadowcachekey, shadowcacheval>(256) {}

void reset()
{
clear();
}
};

class ShadowAtlas
{
public:
GLuint fbo = 0;
shadowcache cache;
hashtable<shadowcachekey, shadowcacheval> cache;
bool full = false;

void cleanup();
Expand Down Expand Up @@ -1883,7 +1873,7 @@ void resetlights()
{
static constexpr int shadowcacheevict = 2;
static int evictshadowcache = 0;
shadowatlas.cache.reset();
shadowatlas.cache.clear();
if(smcache)
{
vec2 sasize = shadowatlaspacker.dimensions();
Expand Down

0 comments on commit 624cff3

Please sign in to comment.