Fixed resource loader

This commit is contained in:
2025-12-25 14:23:17 +01:00
parent 45086e58d8
commit 0b546ce25c
11 changed files with 253 additions and 18 deletions

20
src/renderer/Renderer.h Normal file
View File

@ -0,0 +1,20 @@
#pragma once
#include <SDL3/SDL.h>
#include <memory>
namespace renderer {
class Renderer {
public:
virtual ~Renderer() = default;
// Wrap common operations used by renderers
virtual SDL_Texture* createTextureFromSurface(SDL_Surface* surf) = 0;
virtual void destroyTexture(SDL_Texture* tex) = 0;
virtual void copy(SDL_Texture* tex, const SDL_Rect* src, const SDL_Rect* dst) = 0;
virtual void clear(const SDL_Color& color) = 0;
virtual void present() = 0;
};
} // namespace renderer