aboutsummaryrefslogtreecommitdiffstats
path: root/include/yage/sprite.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'include/yage/sprite.hpp')
-rw-r--r--include/yage/sprite.hpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/include/yage/sprite.hpp b/include/yage/sprite.hpp
new file mode 100644
index 00000000..9f765c7d
--- /dev/null
+++ b/include/yage/sprite.hpp
@@ -0,0 +1,27 @@
+#ifndef SPRITE_HPP
+#define SPRITE_HPP
+
+#include "gl_texture.hpp"
+
+#include <GL/glew.h>
+
+#include <string>
+
+class Sprite
+{
+private:
+ float x_;
+ float y_;
+ float width_;
+ float height_;
+ GLuint vbo_id_ = 0;
+ GlTexture texture_;
+public:
+ Sprite();
+ ~Sprite();
+
+ void init(float x, float y, float width, float height, const std::string &texture_path);
+ void draw();
+};
+
+#endif