summaryrefslogtreecommitdiff
path: root/gfx/models/texture.h
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2024-01-25 23:49:27 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2024-01-25 23:49:27 +0000
commit7b462801d500b43bd7ebebe69c2e8a9d5e3f1261 (patch)
tree3c0c941cd7a98defb8d8e138f0c0ddb5d5903c68 /gfx/models/texture.h
parentAdd traits helpers for glTexParameter functions (diff)
downloadilt-7b462801d500b43bd7ebebe69c2e8a9d5e3f1261.tar.bz2
ilt-7b462801d500b43bd7ebebe69c2e8a9d5e3f1261.tar.xz
ilt-7b462801d500b43bd7ebebe69c2e8a9d5e3f1261.zip
Remove the static texture cache
Static variables persist too long, destruction is unmanaged and occurs after the gl context is gone.
Diffstat (limited to 'gfx/models/texture.h')
-rw-r--r--gfx/models/texture.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/gfx/models/texture.h b/gfx/models/texture.h
index 5d40b39..689d378 100644
--- a/gfx/models/texture.h
+++ b/gfx/models/texture.h
@@ -1,12 +1,10 @@
#pragma once
#include "config/types.h"
-#include <cache.h>
#include <filesystem>
#include <glArrays.h>
#include <glm/fwd.hpp>
-// IWYU pragma: no_forward_declare Cache
class Image;
struct TextureOptions {
@@ -32,8 +30,6 @@ public:
explicit Texture(GLsizei width, GLsizei height, TextureOptions = {});
explicit Texture(GLsizei width, GLsizei height, const void * data, TextureOptions = {});
- static Cache<Texture, std::filesystem::path> cachedTexture;
-
virtual void bind(GLenum unit = GL_TEXTURE0) const;
void save(const char * path) const;