From d24f17b88d901b779c81c7434995675eb2a17429 Mon Sep 17 00:00:00 2001 From: chai Date: Thu, 4 Nov 2021 12:55:25 +0800 Subject: - Internal:: --- Runtime/Scripting/GL/GL.bind.cpp | 2 +- Runtime/Scripting/GUI/Font.bind.cpp | 5 +++-- Runtime/Scripting/Rendering/Rendering.bind.cpp | 3 ++- Runtime/Scripting/Rendering/Shader.bind.cpp | 9 +++++---- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'Runtime/Scripting') diff --git a/Runtime/Scripting/GL/GL.bind.cpp b/Runtime/Scripting/GL/GL.bind.cpp index f2a270b..f97b1e0 100644 --- a/Runtime/Scripting/GL/GL.bind.cpp +++ b/Runtime/Scripting/GL/GL.bind.cpp @@ -133,7 +133,7 @@ int Vertex(lua_State* L) } else { - state.ErrorType(1, "Internal::Vector3 or vector3 table"); + state.ErrorType(1, "Vector3 or vector3 table"); } return 0; } diff --git a/Runtime/Scripting/GUI/Font.bind.cpp b/Runtime/Scripting/GUI/Font.bind.cpp index e749303..1928e0e 100644 --- a/Runtime/Scripting/GUI/Font.bind.cpp +++ b/Runtime/Scripting/GUI/Font.bind.cpp @@ -6,6 +6,7 @@ #include "Runtime/GUI/utf8.h" #include "Runtime/Utilities/StaticInitiator.h" #include "Runtime/GUI/UITextMesh.h" +#include "Runtime/Math/Math.h" static std::vector* s_Codepoints; @@ -39,7 +40,7 @@ LUA_BIND_IMPL_METHOD(Font, _New) { const char* path = state.GetValue(1, ""); TextGeneratingSettings setting; - setting.atlasSize = state.GetValue(2, Internal::Vector2(128, 128)); + setting.atlasSize = state.GetValue(2, Vector2(128, 128)); setting.margin = state.GetValue(3, 0); setting.padding = state.GetValue(4, 0); try { @@ -62,7 +63,7 @@ LUA_BIND_IMPL_METHOD(Font, _New) return 1; } TextGeneratingSettings setting; - setting.atlasSize = state.GetValue(2, Internal::Vector2(128, 128)); + setting.atlasSize = state.GetValue(2, Vector2(128, 128)); setting.margin = state.GetValue(3, 0); setting.padding = state.GetValue(4, 0); try { diff --git a/Runtime/Scripting/Rendering/Rendering.bind.cpp b/Runtime/Scripting/Rendering/Rendering.bind.cpp index c9332f8..58e95bc 100644 --- a/Runtime/Scripting/Rendering/Rendering.bind.cpp +++ b/Runtime/Scripting/Rendering/Rendering.bind.cpp @@ -4,12 +4,13 @@ #include "Runtime/Graphics/GfxDevice.h" #include "Runtime/GUI/UIQuad.h" #include "Runtime/GUI/UI9Slicing.h" +#include "Runtime/Math/Math.h" // Rendering.DrawUIQuad({}) static int DrawUIQuad(lua_State* L) { LUA_BIND_STATE(L); - Internal::Rect rect = state.GetValue(1, Internal::Rect()); + Rect rect = state.GetValue(1, Rect()); UIQuad quad = UIQuad(rect.x, rect.x + rect.width, rect.y, rect.y + rect.height); quad.Draw(); return 0; diff --git a/Runtime/Scripting/Rendering/Shader.bind.cpp b/Runtime/Scripting/Rendering/Shader.bind.cpp index 08c96f9..4c0c321 100644 --- a/Runtime/Scripting/Rendering/Shader.bind.cpp +++ b/Runtime/Scripting/Rendering/Shader.bind.cpp @@ -2,6 +2,7 @@ #include "Runtime/Debug/Log.h" #include "Runtime/Graphics/GfxDevice.h" #include "Runtime/Common/DataBuffer.h" +#include "Runtime/Math/Math.h" using namespace LuaBind; @@ -130,7 +131,7 @@ LUA_BIND_IMPL_METHOD(Shader, _SetVector2) LUA_BIND_CHECK(L, "ST"); cc8* name = state.GetValue(1, ""); - Internal::Vector2 v2 = state.GetValue(2, Internal::Vector2::zero); + Vector2 v2 = state.GetValue(2, Vector2::zero); g_GfxDevice.SetUniformVec2(name, v2); return 1; @@ -144,7 +145,7 @@ LUA_BIND_IMPL_METHOD(Shader, _SetVector3) LUA_BIND_CHECK(L, "ST"); cc8* name = state.GetValue(1, ""); - Internal::Vector3 v3 = state.GetValue(2, Internal::Vector3::zero); + Vector3 v3 = state.GetValue(2, Vector3::zero); g_GfxDevice.SetUniformVec3(name, v3); return 1; @@ -158,7 +159,7 @@ LUA_BIND_IMPL_METHOD(Shader, _SetVector4) LUA_BIND_CHECK(L, "ST"); cc8* name = state.GetValue(1, ""); - Internal::Vector4 v4 = state.GetValue(2, Internal::Vector4::zero); + Vector4 v4 = state.GetValue(2, Vector4::zero); g_GfxDevice.SetUniformVec4(name, v4); return 1; @@ -172,7 +173,7 @@ LUA_BIND_IMPL_METHOD(Shader, _SetMatrix4) LUA_BIND_CHECK(L, "ST"); cc8* name = state.GetValue(1, ""); - Internal::Matrix44 m4 = state.GetValue(2, Internal::Matrix44::identity); + Matrix44 m4 = state.GetValue(2, Matrix44::identity); g_GfxDevice.SetUniformMat4(name, m4); return 1; -- cgit v1.1-26-g67d0