aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_texture.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-15 08:32:38 +0800
committerchai <chaifix@163.com>2018-11-15 08:32:38 +0800
commita6f2d5fff89b7322009c46a9272668ca4c32ce64 (patch)
treeff81127c3be8bde426e57db544d69b9616ddc25b /src/lua/modules/graphics/je_lua_texture.cpp
parent611d12bdd245dd43b7434661d3e24f2b435378cb (diff)
*修改代码结构
Diffstat (limited to 'src/lua/modules/graphics/je_lua_texture.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_texture.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_texture.cpp b/src/lua/modules/graphics/je_lua_texture.cpp
index d7571b6..08a98eb 100644
--- a/src/lua/modules/graphics/je_lua_texture.cpp
+++ b/src/lua/modules/graphics/je_lua_texture.cpp
@@ -1,5 +1,5 @@
#include "lua/modules/luax.h"
-#include "lua/modules/types.h"
+
#include "lua/common/je_lua_common.h"
#include "libjin/jin.h"
@@ -9,12 +9,14 @@ namespace JinEngine
{
namespace Lua
{
+
+ const char* Jin_Lua_Texture = "Texture";
typedef Shared<Texture>& SharedTexture;
LUA_IMPLEMENT inline SharedTexture checkTexture(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_TEXTURE);
+ Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Texture);
return proxy->getShared<Texture>();
}
@@ -42,7 +44,7 @@ namespace JinEngine
LUA_IMPLEMENT int l_gc(lua_State* L)
{
- Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_TEXTURE);
+ Proxy* proxy = (Proxy*)luax_checktype(L, 1, Jin_Lua_Texture);
proxy->release();
return 0;
}
@@ -56,7 +58,7 @@ namespace JinEngine
{ "getSize", l_getSize },
{ 0, 0 }
};
- luax_newtype(L, JIN_GRAPHICS_TEXTURE, f);
+ luax_newtype(L, Jin_Lua_Texture, f);
return 0;
}