diff --git a/include/renderer_gl/renderer_gl.hpp b/include/renderer_gl/renderer_gl.hpp index ad4be9f4..0082db4b 100644 --- a/include/renderer_gl/renderer_gl.hpp +++ b/include/renderer_gl/renderer_gl.hpp @@ -4,6 +4,7 @@ #include "logger.hpp" #include "opengl.hpp" #include "surface_cache.hpp" +#include "textures.hpp" // More circular dependencies! class GPU; @@ -25,6 +26,8 @@ class Renderer { SurfaceCache depthBufferCache; SurfaceCache colourBufferCache; + SurfaceCache textureCache; + OpenGL::uvec2 fbSize; // The size of the framebuffer (ie both the colour and depth buffer)' u32 colourBufferLoc; // Location in 3DS VRAM for the colour buffer diff --git a/include/renderer_gl/surface_cache.hpp b/include/renderer_gl/surface_cache.hpp index 8523e7fb..07dcc7dd 100644 --- a/include/renderer_gl/surface_cache.hpp +++ b/include/renderer_gl/surface_cache.hpp @@ -2,6 +2,7 @@ #include #include #include "surfaces.hpp" +#include "textures.hpp" // Surface cache class that can fit "capacity" instances of the "SurfaceType" class of surfaces // SurfaceType *must* have all of the following @@ -16,8 +17,8 @@ template class SurfaceCache { // Vanilla std::optional can't hold actual references using OptionalRef = std::optional>; - static_assert(std::is_same() || std::is_same(), - "Invalid surface type"); + static_assert(std::is_same() || std::is_same() || + std::is_same(), "Invalid surface type"); size_t size; std::array buffer;