summaryrefslogtreecommitdiff
path: root/Runtime/Scripting/GL/GL.bind.cpp
diff options
context:
space:
mode:
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