From 589ee7ee7014a5f8918e1d99c0e04bff4f7a83cb Mon Sep 17 00:00:00 2001 From: chai Date: Sat, 28 Jul 2018 10:39:31 +0800 Subject: *update --- src/libjin/Graphics/Texture.h | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/libjin/Graphics/Texture.h (limited to 'src/libjin/Graphics/Texture.h') diff --git a/src/libjin/Graphics/Texture.h b/src/libjin/Graphics/Texture.h new file mode 100644 index 0000000..47f8d53 --- /dev/null +++ b/src/libjin/Graphics/Texture.h @@ -0,0 +1,40 @@ +#ifndef __JIN_IMAGE_H +#define __JIN_IMAGE_H +#include "../modules.h" +#if JIN_MODULES_RENDER + +#include "../3rdparty/GLee/GLee.h" +#include "color.h" +#include "drawable.h" +namespace jin +{ +namespace graphics +{ + + 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 // JIN_MODULES_RENDER +#endif // __JIN_IMAGE_H \ No newline at end of file -- cgit v1.1-26-g67d0