summaryrefslogtreecommitdiff
path: root/image.h
diff options
context:
space:
mode:
authorVegard Storheil Eriksen <zyp@jvnv.net>2011-01-28 22:08:37 +0100
committerVegard Storheil Eriksen <zyp@jvnv.net>2011-01-28 22:08:37 +0100
commitf84b25fc8e0619ad24974c4dc520449827f8d193 (patch)
tree71c623805bbb10b8e06a44ee40176e304a42f62f /image.h
parent7ebb0e91f63203753420b5a4b75d09d170f204f4 (diff)
Split out image loading from Texture into Image.
Diffstat (limited to 'image.h')
-rw-r--r--image.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/image.h b/image.h
new file mode 100644
index 0000000..41b0ed2
--- /dev/null
+++ b/image.h
@@ -0,0 +1,27 @@
+#ifndef IMAGE_H
+#define IMAGE_H
+
+#include <stdint.h>
+#include <string>
+
+class Image {
+ public:
+ Image();
+ Image(const std::string& filename);
+ ~Image();
+
+ void load(const std::string& filename);
+
+ unsigned int w() const;
+ unsigned int h() const;
+ unsigned int f() const;
+ const void* d() const;
+
+ protected:
+ unsigned int width;
+ unsigned int height;
+ unsigned int format;
+ void* data;
+};
+
+#endif