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 /texture.h | |
parent | 7ebb0e91f63203753420b5a4b75d09d170f204f4 (diff) |
Split out image loading from Texture into Image.
Diffstat (limited to 'texture.h')
-rw-r--r-- | texture.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,22 +1,22 @@ #ifndef _TEXTURE_H_ #define _TEXTURE_H_ -#include <stdint.h> -#include <string> +#include "image.h" class Texture { public: Texture(); + Texture(const Image& image); Texture(const std::string& filename); - void load(const std::string& filename); + void load(const Image& image); void bind() const; unsigned int tex() const; unsigned int w() const; unsigned int h() const; protected: - void build(void* data, unsigned int format, unsigned int w, unsigned int h); + void build(const void* data, unsigned int format, unsigned int w, unsigned int h); unsigned int width; unsigned int height; unsigned int texture; |