add: texture cache

This commit is contained in:
Samuliak 2024-07-02 13:25:05 +02:00
parent 8d94cce537
commit bac3a8e040
6 changed files with 338 additions and 2 deletions

View file

@ -2,6 +2,9 @@
#include <QuartzCore/QuartzCore.hpp>
#include "renderer.hpp"
#include "texture.hpp"
// HACK: use the OpenGL cache
#include "../renderer_gl/surface_cache.hpp"
class GPU;
@ -30,6 +33,9 @@ class RendererMTL final : public Renderer {
MTL::Device* device;
MTL::CommandQueue* commandQueue;
// Caches
SurfaceCache<Metal::Texture, 256, true> textureCache;
// HACK
MTL::Texture* topScreenTexture;