From 7b462801d500b43bd7ebebe69c2e8a9d5e3f1261 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 25 Jan 2024 23:49:27 +0000 Subject: Remove the static texture cache Static variables persist too long, destruction is unmanaged and occurs after the gl context is gone. --- gfx/models/texture.h | 4 ---- 1 file changed, 4 deletions(-) (limited to 'gfx/models/texture.h') 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 #include #include #include -// 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 cachedTexture; - virtual void bind(GLenum unit = GL_TEXTURE0) const; void save(const char * path) const; -- cgit v1.2.3