diff options
author | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-28 22:08:37 +0100 |
---|---|---|
committer | Vegard Storheil Eriksen <zyp@jvnv.net> | 2011-01-28 22:08:37 +0100 |
commit | f84b25fc8e0619ad24974c4dc520449827f8d193 (patch) | |
tree | 71c623805bbb10b8e06a44ee40176e304a42f62f /image.h | |
parent | 7ebb0e91f63203753420b5a4b75d09d170f204f4 (diff) |
Split out image loading from Texture into Image.
Diffstat (limited to 'image.h')
-rw-r--r-- | image.h | 27 |
1 files changed, 27 insertions, 0 deletions
@@ -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 |