From 8585c92b7d0744a1f1a39c872cf5096621161b6c Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 16 Aug 2018 14:21:56 +0800 Subject: *update --- src/lua/graphics/JSL.h | 92 -------------------------------------------------- 1 file changed, 92 deletions(-) delete mode 100644 src/lua/graphics/JSL.h (limited to 'src/lua/graphics/JSL.h') diff --git a/src/lua/graphics/JSL.h b/src/lua/graphics/JSL.h deleted file mode 100644 index af6c54d..0000000 --- a/src/lua/graphics/JSL.h +++ /dev/null @@ -1,92 +0,0 @@ -#ifndef __JIN_LUA_GRAPHICS_JSL_H -#define __JIN_LUA_GRAPHICS_JSL_H -#include "libjin/jin.h" -#include "../luaopen_types.h" -#include "Image.h" -#include "Color.h" -#include "Canvas.h" - -namespace jin -{ -namespace lua -{ -namespace graphics -{ - - class JSLProgram : public Object - { - public: - static JSLProgram* createJSLProgram(const char* program); - - inline void use() - { - currentJSLProgram = this; - jslprogram->use(); - } - - static inline void unuse() - { - currentJSLProgram = nullptr; - jin::graphics::JSLProgram::unuse(); - } - - void sendFloat(const char* name, float number) - { - jslprogram->sendFloat(name, number); - } - - void sendImage(const char* name, const Image* image) - { - jslprogram->sendTexture(name, image->getRawImage()); - } - - void sendVec2(const char* name, float x, float y) - { - jslprogram->sendVec2(name, x, y); - } - - void sendVec3(const char* name, float x, float y, float z) - { - jslprogram->sendVec3(name, x, y, z); - } - - void sendVec4(const char* name, float x, float y, float z, float w) - { - jslprogram->sendVec4(name, x, y, z, w); - } - - void sendCanvas(const char* name, const Canvas* canvas) - { - jslprogram->sendCanvas(name, canvas->getRawCanvas()); - } - - void sendColor(const char* name, const lua::graphics::color* col) - { - jslprogram->sendColor(name, col); - } - - static inline JSLProgram* getCurrentJSL() - { - return currentJSLProgram; - } - - private: - - static JSLProgram* currentJSLProgram; - - JSLProgram() {} - - ~JSLProgram() - { - delete jslprogram; - } - - jin::graphics::JSLProgram * jslprogram; - - }; - -} // graphics -} // lua -} // jin - -#endif // __JIN_LUA_GRAPHICS_JSL_H \ No newline at end of file -- cgit v1.1-26-g67d0