From 35465f27ed87646a18cd9298eae861f14385300e Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Thu, 23 Dec 2021 20:52:49 +0100 Subject: First commit: moves a simple thing on the screen --- src/texture.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 src/texture.h (limited to 'src/texture.h') diff --git a/src/texture.h b/src/texture.h new file mode 100644 index 0000000..311db4a --- /dev/null +++ b/src/texture.h @@ -0,0 +1,15 @@ +#include +#include + +class Texture{ + public: + Texture(SDL_Renderer* renderer); + ~Texture(); + int loadFromFile(std::string path); + void render(int x, int y, SDL_Rect* clip = nullptr); + private: + SDL_Texture* texture_; + int w_; + int h_; + SDL_Renderer* renderer_; +}; -- cgit v1.2.3