aboutsummaryrefslogtreecommitdiff
path: root/src/lua/graphics/luaopen_JSL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lua/graphics/luaopen_JSL.cpp')
-rw-r--r--src/lua/graphics/luaopen_JSL.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lua/graphics/luaopen_JSL.cpp b/src/lua/graphics/luaopen_JSL.cpp
index 19fa285..d1d3bac 100644
--- a/src/lua/graphics/luaopen_JSL.cpp
+++ b/src/lua/graphics/luaopen_JSL.cpp
@@ -5,9 +5,15 @@ namespace jin
{
namespace lua
{
+
using namespace render;
- enum VARIABLE_TYPE
+ static inline JSLProgram* checkJSLProgram(lua_State* L)
+ {
+ return (JSLProgram*)luax_checktype(L, 1, TYPE_JSL);
+ }
+
+ static enum VARIABLE_TYPE
{
INVALID = 0,
NUMBER ,
@@ -29,7 +35,7 @@ namespace lua
*/
static int l_send(lua_State* L)
{
- JSLProgram* jsl = (JSLProgram*)luax_checktype(L, 1, TYPE_JSL);
+ JSLProgram* jsl = checkJSLProgram(L);
// number Image Texel
const char* typestr = luax_checkstring(L, 2);
// variable name