summaryrefslogtreecommitdiff
path: root/Runtime/Scripting/GL/GL.bind.cpp
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-10-29 15:02:46 +0800
committerchai <chaifix@163.com>2021-10-29 15:02:46 +0800
commit796b4b05ec62eb5d58a634854998f485072e8a2b (patch)
tree30f188382f14b3b9c69fe5846262a39a8b4664cc /Runtime/Scripting/GL/GL.bind.cpp
parent91c32cb173201ac8803a1e4452e8342969b8e484 (diff)
*passing texture to glsl
Diffstat (limited to 'Runtime/Scripting/GL/GL.bind.cpp')
-rw-r--r--Runtime/Scripting/GL/GL.bind.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/Runtime/Scripting/GL/GL.bind.cpp b/Runtime/Scripting/GL/GL.bind.cpp
index 903e706..40093e9 100644
--- a/Runtime/Scripting/GL/GL.bind.cpp
+++ b/Runtime/Scripting/GL/GL.bind.cpp
@@ -54,10 +54,10 @@ int ClearColor(lua_State* L)
LUA_BIND_STATE(L);
if (LuaHelper::IsType(state, "GameLab.Engine.Rendering.Color", -1))
{
- float r = state.GetField(-1, "r", 0);
- float g = state.GetField(-1, "g", 0);
- float b = state.GetField(-1, "b", 0);
- float a = state.GetField(-1, "a", 0);
+ float r = state.GetField<float>(-1, "r", 0);
+ float g = state.GetField<float>(-1, "g", 0);
+ float b = state.GetField<float>(-1, "b", 0);
+ float a = state.GetField<float>(-1, "a", 0);
glClearColor(r, g, b, a);
}
else if (LuaHelper::IsType(state, "GameLab.Engine.Rendering.Color32", -1))
@@ -70,10 +70,10 @@ int ClearColor(lua_State* L)
}
else if (LuaHelper::IsType(state, "table", -1))
{
- float r = state.GetField(-1, 1, 0);
- float g = state.GetField(-1, 2, 0);
- float b = state.GetField(-1, 3, 0);
- float a = state.GetField(-1, 4, 0);
+ float r = state.GetField<float>(-1, 1, 0);
+ float g = state.GetField<float>(-1, 2, 0);
+ float b = state.GetField<float>(-1, 3, 0);
+ float a = state.GetField<float>(-1, 4, 0);
glClearColor(r, g, b, a);
}
else