Fixed resource loader
This commit is contained in:
20
src/renderer/Renderer.h
Normal file
20
src/renderer/Renderer.h
Normal 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
|
||||
Reference in New Issue
Block a user