diff options
author | chai <chaifix@163.com> | 2018-08-14 14:56:47 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2018-08-14 14:56:47 +0800 |
commit | 5c9af043503f92852a1a765b6ecfbc1aea24d2e9 (patch) | |
tree | eb371092c4137a672e7bfc13dc56ee777623ebfe /src/lua/graphics/luaopen_JSL.cpp | |
parent | 5162f84be0a4deb447c6ba1226722b049335d525 (diff) |
*update
Diffstat (limited to 'src/lua/graphics/luaopen_JSL.cpp')
-rw-r--r-- | src/lua/graphics/luaopen_JSL.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/lua/graphics/luaopen_JSL.cpp b/src/lua/graphics/luaopen_JSL.cpp index 8d25178..774f2b6 100644 --- a/src/lua/graphics/luaopen_JSL.cpp +++ b/src/lua/graphics/luaopen_JSL.cpp @@ -1,13 +1,16 @@ #include "lua/luax.h" -#include "libjin/jin.h" #include "lua/luaopen_types.h" +#include "Image.h" +#include "JSL.h" +#include "Canvas.h" +#include "Color.h" namespace jin { namespace lua { - - using namespace jin::graphics; + + using namespace lua::graphics; static inline JSLProgram* checkJSLProgram(lua_State* L) { @@ -67,8 +70,8 @@ namespace lua case IMAGE: { Proxy* proxy = (Proxy*)luax_checktype(L, 4, JIN_GRAPHICS_IMAGE); - Texture* tex = (Texture*)proxy->object; - jsl->sendTexture(variable, tex); + Image* tex = (Image*)proxy->object; + jsl->sendImage(variable, tex); break; } case CANVAS: @@ -122,8 +125,7 @@ namespace lua static int l_gc(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_SHADER); - JSLProgram* jsl = (JSLProgram*)proxy->object; - delete jsl; + proxy->release(); return 0; } |