aboutsummaryrefslogtreecommitdiff
path: root/src/libjin/Graphics/Texture.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libjin/Graphics/Texture.h')
-rw-r--r--src/libjin/Graphics/Texture.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/src/libjin/Graphics/Texture.h b/src/libjin/Graphics/Texture.h
new file mode 100644
index 0000000..47f8d53
--- /dev/null
+++ b/src/libjin/Graphics/Texture.h
@@ -0,0 +1,40 @@
+#ifndef __JIN_IMAGE_H
+#define __JIN_IMAGE_H
+#include "../modules.h"
+#if JIN_MODULES_RENDER
+
+#include "../3rdparty/GLee/GLee.h"
+#include "color.h"
+#include "drawable.h"
+namespace jin
+{
+namespace graphics
+{
+
+ class Texture: public Drawable
+ {
+
+ public:
+
+ static Texture* createTexture(const char* file);
+ static Texture* createTexture(const void* mem, size_t size);
+
+ ~Texture();
+
+ color getPixel(int x, int y);
+
+ private:
+
+ Texture();
+
+ bool loadb(const void* buffer, size_t size);
+
+ color* pixels;
+
+ };
+
+}
+}
+
+#endif // JIN_MODULES_RENDER
+#endif // __JIN_IMAGE_H \ No newline at end of file