From 0371f99359d1f58dbec6353234c2b1ebd86a7585 Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 25 Jul 2018 20:27:55 +0800 Subject: *image->texture --- src/libjin/render/texture.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 src/libjin/render/texture.h (limited to 'src/libjin/render/texture.h') diff --git a/src/libjin/render/texture.h b/src/libjin/render/texture.h new file mode 100644 index 0000000..6b0c699 --- /dev/null +++ b/src/libjin/render/texture.h @@ -0,0 +1,34 @@ +#ifndef __JIN_IMAGE_H +#define __JIN_IMAGE_H +#include "3rdparty/GLee/GLee.h" +#include "color.h" +#include "drawable.h" +namespace jin +{ +namespace render +{ + 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 \ No newline at end of file -- cgit v1.1-26-g67d0