summaryrefslogtreecommitdiff
path: root/Runtime/Scripting
diff options
context:
space:
mode:
authorchai <chaifix@163.com>2021-11-04 12:55:25 +0800
committerchai <chaifix@163.com>2021-11-04 12:55:25 +0800
commitd24f17b88d901b779c81c7434995675eb2a17429 (patch)
treed8f4cfee93d70598ef4b1419316b30acfff0eb04 /Runtime/Scripting
parent94a9a28de16badb75e66a60efca3b01d31cc0fc6 (diff)
- Internal::
Diffstat (limited to 'Runtime/Scripting')
-rw-r--r--Runtime/Scripting/GL/GL.bind.cpp2
-rw-r--r--Runtime/Scripting/GUI/Font.bind.cpp5
-rw-r--r--Runtime/Scripting/Rendering/Rendering.bind.cpp3
-rw-r--r--Runtime/Scripting/Rendering/Shader.bind.cpp9
4 files changed, 11 insertions, 8 deletions
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<character::Unicode>* s_Codepoints;
@@ -39,7 +40,7 @@ LUA_BIND_IMPL_METHOD(Font, _New)
{
const char* path = state.GetValue<const char*>(1, "");
TextGeneratingSettings setting;
- setting.atlasSize = state.GetValue<Internal::Vector2>(2, Internal::Vector2(128, 128));
+ setting.atlasSize = state.GetValue<Vector2>(2, Vector2(128, 128));
setting.margin = state.GetValue<int>(3, 0);
setting.padding = state.GetValue<int>(4, 0);
try {
@@ -62,7 +63,7 @@ LUA_BIND_IMPL_METHOD(Font, _New)
return 1;
}
TextGeneratingSettings setting;
- setting.atlasSize = state.GetValue<Internal::Vector2>(2, Internal::Vector2(128, 128));
+ setting.atlasSize = state.GetValue<Vector2>(2, Vector2(128, 128));
setting.margin = state.GetValue<int>(3, 0);
setting.padding = state.GetValue<int>(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<Internal::Rect>(1, Internal::Rect());
+ Rect rect = state.GetValue<Rect>(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<Internal::Vector2>(2, Internal::Vector2::zero);
+ Vector2 v2 = state.GetValue<Vector2>(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<Internal::Vector3>(2, Internal::Vector3::zero);
+ Vector3 v3 = state.GetValue<Vector3>(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<Internal::Vector4>(2, Internal::Vector4::zero);
+ Vector4 v4 = state.GetValue<Vector4>(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<Internal::Matrix44>(2, Internal::Matrix44::identity);
+ Matrix44 m4 = state.GetValue<Matrix44>(2, Matrix44::identity);
g_GfxDevice.SetUniformMat4(name, m4);
return 1;