aboutsummaryrefslogtreecommitdiff
path: root/src/lua/modules/graphics/je_lua_shader.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2018-11-10 20:13:55 +0800
committerchai <chaifix@163.com>2018-11-10 20:13:55 +0800
commite92caa97329016d012b46b9d37e1b2c3b613a8f2 (patch)
tree5bef0b7547e12f61dede5e09843e1718b808f9c4 /src/lua/modules/graphics/je_lua_shader.cpp
parent63153bc8e742c522cfd3f5ab10609966e33310e6 (diff)
*修改代码结构
Diffstat (limited to 'src/lua/modules/graphics/je_lua_shader.cpp')
-rw-r--r--src/lua/modules/graphics/je_lua_shader.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lua/modules/graphics/je_lua_shader.cpp b/src/lua/modules/graphics/je_lua_shader.cpp
index 9131815..e2e1413 100644
--- a/src/lua/modules/graphics/je_lua_shader.cpp
+++ b/src/lua/modules/graphics/je_lua_shader.cpp
@@ -11,12 +11,12 @@ namespace JinEngine
namespace Lua
{
- typedef Ref<Shader>& ShaderRef;
+ typedef Shared<Shader>& ShaderRef;
static inline ShaderRef checkShader(lua_State* L)
{
Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_SHADER);
- return proxy->getRef<Shader>();
+ return proxy->getShared<Shader>();
}
/**
@@ -36,7 +36,7 @@ namespace JinEngine
ShaderRef ref = checkShader(L);
const char* variable = luax_checkstring(L, 2);
Proxy* proxy = (Proxy*)luax_checktype(L, 3, JIN_GRAPHICS_TEXTURE);
- Ref<Texture>& tex = proxy->getRef<Texture>();
+ Shared<Texture>& tex = proxy->getShared<Texture>();
ref->sendTexture(variable, tex.getObject());
return 0;
}
@@ -46,7 +46,7 @@ namespace JinEngine
ShaderRef ref = checkShader(L);
const char* variable = luax_checkstring(L, 2);
Proxy* proxy = (Proxy*)luax_checktype(L, 3, JIN_GRAPHICS_CANVAS);
- Ref<Canvas>& canvas = proxy->getRef<Canvas>();
+ Shared<Canvas>& canvas = proxy->getShared<Canvas>();
ref->sendCanvas(variable, canvas.getObject());
return 0;
}