From 796b4b05ec62eb5d58a634854998f485072e8a2b Mon Sep 17 00:00:00 2001 From: chai Date: Fri, 29 Oct 2021 15:02:46 +0800 Subject: *passing texture to glsl --- Runtime/Scripting/GL/GL.bind.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'Runtime/Scripting/GL/GL.bind.cpp') 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(-1, "r", 0); + float g = state.GetField(-1, "g", 0); + float b = state.GetField(-1, "b", 0); + float a = state.GetField(-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(-1, 1, 0); + float g = state.GetField(-1, 2, 0); + float b = state.GetField(-1, 3, 0); + float a = state.GetField(-1, 4, 0); glClearColor(r, g, b, a); } else -- cgit v1.1-26-g67d0