summaryrefslogtreecommitdiff
path: root/src/texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/texture.h')
-rw-r--r--src/texture.h15
1 files changed, 15 insertions, 0 deletions
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 <SDL2/SDL.h>
+#include <string>
+
+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_;
+};