From f84b25fc8e0619ad24974c4dc520449827f8d193 Mon Sep 17 00:00:00 2001 From: Vegard Storheil Eriksen Date: Fri, 28 Jan 2011 22:08:37 +0100 Subject: Split out image loading from Texture into Image. --- image.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 image.h (limited to 'image.h') 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 +#include + +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 -- cgit v1.2.3