From 789895b4b9f99668b8b772f271d07d1ce3115742 Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 5 Oct 2018 15:40:31 +0800 Subject: *update --- src/lua/modules/graphics/shader.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/lua/modules/graphics/shader.cpp') diff --git a/src/lua/modules/graphics/shader.cpp b/src/lua/modules/graphics/shader.cpp index db78c4d..a9603bc 100644 --- a/src/lua/modules/graphics/shader.cpp +++ b/src/lua/modules/graphics/shader.cpp @@ -10,12 +10,12 @@ namespace lua using namespace jin::graphics; - typedef Ref& JSLRef; + typedef Ref& ShaderRef; - static inline JSLRef checkJSLProgram(lua_State* L) + static inline ShaderRef checkShader(lua_State* L) { Proxy* proxy = (Proxy*)luax_checktype(L, 1, JIN_GRAPHICS_SHADER); - return proxy->getRef(); + return proxy->getRef(); } /** @@ -23,7 +23,7 @@ namespace lua */ static int l_sendNumber (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); float number = luax_checknumber(L, 3); ref->sendFloat(variable, number); @@ -32,7 +32,7 @@ namespace lua static int l_sendTexture (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); Proxy* proxy = (Proxy*)luax_checktype(L, 3, JIN_GRAPHICS_TEXTURE); Ref& tex = proxy->getRef(); @@ -42,7 +42,7 @@ namespace lua static int l_sendCanvas (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); Proxy* proxy = (Proxy*)luax_checktype(L, 3, JIN_GRAPHICS_CANVAS); Ref& canvas = proxy->getRef(); @@ -52,7 +52,7 @@ namespace lua static int l_sendVec2 (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); if (!luax_istable(L, 3)) { @@ -67,7 +67,7 @@ namespace lua static int l_sendVec3 (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); if (!luax_istable(L, 3)) { @@ -83,7 +83,7 @@ namespace lua static int l_sendVec4 (lua_State* L) { - JSLRef ref = checkJSLProgram(L); + ShaderRef ref = checkShader(L); const char* variable = luax_checkstring(L, 2); if (!luax_istable(L, 3)) { -- cgit v1.1-26-g67d0