summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Editor/GUI/ContainerWindow.cpp5
-rw-r--r--Editor/GUI/EditorWindows.h9
-rw-r--r--Editor/GUI/GUIWindow.cpp5
-rw-r--r--Editor/GUI/WindowManager.cpp7
-rw-r--r--Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp7
-rw-r--r--Editor/Scripting/EditorGUI/GUIWindow.bind.cpp3
-rw-r--r--Runtime/GUI/Font.cpp16
-rw-r--r--Runtime/GUI/UIQuad.cpp8
-rw-r--r--Runtime/Graphics/GfxDevice.cpp9
-rw-r--r--Runtime/Graphics/GfxDevice.h13
-rw-r--r--Runtime/Graphics/PolyLine.cpp6
-rw-r--r--Runtime/Graphics/Texture.cpp3
-rw-r--r--Runtime/Graphics/Texture.h3
-rw-r--r--Runtime/Lua/LuaHelper.cpp25
-rw-r--r--Runtime/Rendering/Quad.cpp7
-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
19 files changed, 78 insertions, 67 deletions
diff --git a/Editor/GUI/ContainerWindow.cpp b/Editor/GUI/ContainerWindow.cpp
index d737838..f7d9e45 100644
--- a/Editor/GUI/ContainerWindow.cpp
+++ b/Editor/GUI/ContainerWindow.cpp
@@ -6,6 +6,7 @@
#include "MenuManager.h"
#include "Runtime/Utilities/Assert.h"
#include "Editor/Graphics/Graphics.h"
+#include "Runtime/Math/Math.h"
using namespace std;
@@ -273,7 +274,7 @@ bool ContainerWindow::SetRenderContext()
}
// 初始化,创建窗口
-void ContainerWindow::Init(Internal::Rect pixelRect, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name)
+void ContainerWindow::Init(Rect pixelRect, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name)
{
// Aux windows are mac only. on windows they look just like normal utility windows.
if (showMode == kShowAuxWindow)
@@ -342,7 +343,7 @@ void ContainerWindow::Init(Internal::Rect pixelRect, int showMode, const Interna
// parentWindow = GetMainEditorWindow();
}
- bool notSizeable = (minSize == maxSize) && (minSize != Internal::Vector2::zero);
+ bool notSizeable = (minSize == maxSize) && (minSize != Vector2::zero);
if (notSizeable)
windowStyle &= ~(WS_THICKFRAME);
diff --git a/Editor/GUI/EditorWindows.h b/Editor/GUI/EditorWindows.h
index e1ad89a..78d9ca8 100644
--- a/Editor/GUI/EditorWindows.h
+++ b/Editor/GUI/EditorWindows.h
@@ -11,6 +11,7 @@
#include "Runtime/Graphics/OpenGL.h"
#include "Runtime/Utilities/UtilMacros.h"
#include "Editor/Utils/HelperFuncs.h"
+#include "Runtime/Math/Math.h"
using namespace LuaBind;
@@ -29,7 +30,7 @@ public :
class WindowManager : Singleton<WindowManager>
{
public:
- static Internal::Vector2 GetMousePosition();
+ static Vector2 GetMousePosition();
static GUIWindow* GetMouseOverWindow();
private:
@@ -56,7 +57,7 @@ public:
ContainerWindow(LuaBind::VM* vm);
~ContainerWindow();
- void Init(Internal::Rect size, int showMode, const Internal::Vector2& minSize, const Internal::Vector2& maxSize, std::string name = "");
+ void Init(Rect size, int showMode, const Vector2& minSize, const Vector2& maxSize, std::string name = "");
void SetTitle(const char* title);
void SetIcon(LPCSTR iconName);
void SetAsRenderContext();
@@ -83,7 +84,7 @@ private:
bool m_IsClosing;
bool m_InMenuLoop;
bool m_CloseFromScriptDontShutdown;
- Internal::Rect m_InternalRect;
+ Rect m_InternalRect;
POINT m_MinSize;
POINT m_MaxSize;
@@ -138,7 +139,7 @@ public:
void DoPaint();
void SetContainerWindow(ContainerWindow* wnd);
void Focus();
- void SetPosition(Internal::Rect position);
+ void SetPosition(Rect position);
void SetAsRenderContext();
void OnFocus();
diff --git a/Editor/GUI/GUIWindow.cpp b/Editor/GUI/GUIWindow.cpp
index 011dfa8..cd49445 100644
--- a/Editor/GUI/GUIWindow.cpp
+++ b/Editor/GUI/GUIWindow.cpp
@@ -3,6 +3,7 @@
#include "Runtime/Graphics/OpenGL.h"
#include "Editor/Graphics/Graphics.h"
#include "Editor/Win/Win.h"
+#include "Runtime/Math/Math.h"
static bool RedirectMouseWheel(HWND window, WPARAM wParam, LPARAM lParam)
{
@@ -201,7 +202,7 @@ void GUIWindow::Init(std::string name)
//DWORD windowStyle = WS_OVERLAPPED | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_CLIPCHILDREN | WS_MAXIMIZEBOX | WS_MINIMIZEBOX;
DWORD extendedStyle = WS_EX_TOOLWINDOW;
- Internal::Rect pixelRect;
+ Rect pixelRect;
pixelRect.x = 0;
pixelRect.y = 0;
pixelRect.width = 32;
@@ -316,7 +317,7 @@ void GUIWindow::OnPaint()
InvokeLuaCallback(m_Script, "OnGUI");
}
-void GUIWindow::SetPosition(Internal::Rect position)
+void GUIWindow::SetPosition(Rect position)
{
log_info("GUIWindow::SetPosition()");
RECT rc;
diff --git a/Editor/GUI/WindowManager.cpp b/Editor/GUI/WindowManager.cpp
index d6d8b1e..5ba3086 100644
--- a/Editor/GUI/WindowManager.cpp
+++ b/Editor/GUI/WindowManager.cpp
@@ -1,5 +1,6 @@
#include "EditorWindows.h"
#include "WinUtils.h"
+#include "Runtime/Math/Math.h"
std::vector<GUIWindow*> WindowManager::s_GUIWindows;
@@ -8,12 +9,12 @@ GUIWindow* WindowManager::GetMouseOverWindow()
return NULL;
}
-Internal::Vector2 WindowManager::GetMousePosition()
+Vector2 WindowManager::GetMousePosition()
{
POINT pt;
if (!GetCursorPos(&pt))
- return Internal::Vector2(0, 0);
+ return Vector2(0, 0);
- return Internal::Vector2(pt.x, pt.y);
+ return Vector2(pt.x, pt.y);
}
diff --git a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
index 5906788..0269b72 100644
--- a/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
+++ b/Editor/Scripting/EditorGUI/ContainerWindow.bind.cpp
@@ -1,4 +1,5 @@
#include "Editor/GUI/EditorWindows.h"
+#include "Runtime/Math/Math.h"
LUA_BIND_REGISTRY(ContainerWindow)
{
@@ -56,10 +57,10 @@ LUA_BIND_IMPL_METHOD(ContainerWindow, ContainerWindow::_New)
ContainerWindow* wnd = new ContainerWindow(state.GetVM());
- Internal::Rect rect = state.GetValue<Internal::Rect>(state, Internal::Rect());
+ Rect rect = state.GetValue<Rect>(state, Rect());
int showMode = state.GetValue<int>(2, 0);
- Internal::Vector2 min = state.GetValue<Internal::Vector2>(state, Internal::Vector2());
- Internal::Vector2 max = state.GetValue<Internal::Vector2>(state, Internal::Vector2());
+ Vector2 min = state.GetValue<Vector2>(state, Vector2());
+ Vector2 max = state.GetValue<Vector2>(state, Vector2());
wnd->Init(rect, showMode, min, max);
diff --git a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
index 7e31da5..dbb26f4 100644
--- a/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
+++ b/Editor/Scripting/EditorGUI/GUIWindow.bind.cpp
@@ -1,4 +1,5 @@
#include "Editor/GUI/EditorWindows.h"
+#include "Runtime/Math/Math.h"
LUA_BIND_REGISTRY(GUIWindow)
{
@@ -62,7 +63,7 @@ LUA_BIND_IMPL_METHOD(GUIWindow, _SetPosition)
if (!state.CheckParams(1, "UT"))
return 0;
- Internal::Rect rect;
+ Rect rect;
rect.x = state.GetField<float>(2, 1, 0);
rect.y = state.GetField<float>(2, 2, 0);
rect.width = state.GetField<float>(2, 3, 0);
diff --git a/Runtime/GUI/Font.cpp b/Runtime/GUI/Font.cpp
index 4425b17..a2d3078 100644
--- a/Runtime/GUI/Font.cpp
+++ b/Runtime/GUI/Font.cpp
@@ -188,10 +188,10 @@ bool Font::RenderCharacter(character::Unicode codepoint, int pixelSize)
TextHelper::print_glyph(&s_PixelBuffer[0], w, h);
- GlyphAtals* atlas = RequestAtlas(pixelSize, Internal::Vector2(w, h));
+ GlyphAtals* atlas = RequestAtlas(pixelSize, Vector2(w, h));
Assert(atlas);
- Internal::Rect rect = GetRenderChartAndMove(atlas, Internal::Vector2(w, h));
+ Rect rect = GetRenderChartAndMove(atlas, Vector2(w, h));
try
{
@@ -209,7 +209,7 @@ bool Font::RenderCharacter(character::Unicode codepoint, int pixelSize)
character.atlas = atlas->index;
character.position = rect;
- character.bearing = Internal::Vector2(m_FTFace->glyph->bitmap_left, m_FTFace->glyph->bitmap_top);
+ character.bearing = Vector2(m_FTFace->glyph->bitmap_left, m_FTFace->glyph->bitmap_top);
}
else // space、tab
{
@@ -232,7 +232,7 @@ const GlyphAtals* Font::GetGlyphAtlas(int index)
return &m_Atlases[index];
}
-Internal::Rect Font::GetRenderChartAndMove(GlyphAtals* atlas, Internal::Vector2 preferSize)
+Rect Font::GetRenderChartAndMove(GlyphAtals* atlas, Vector2 preferSize)
{
Rect rect;
Vector2 space;
@@ -264,7 +264,7 @@ Internal::Rect Font::GetRenderChartAndMove(GlyphAtals* atlas, Internal::Vector2
return rect;
}
-GlyphAtals* Font::RequestAtlas(int pixelSize, Internal::Vector2 preferSize)
+GlyphAtals* Font::RequestAtlas(int pixelSize, Vector2 preferSize)
{
GlyphAtals* atlas = NULL;
auto iter = m_AtlasCache.find(pixelSize);
@@ -278,7 +278,7 @@ GlyphAtals* Font::RequestAtlas(int pixelSize, Internal::Vector2 preferSize)
newAtlas.width = m_AtlasSize.x;
newAtlas.height = m_AtlasSize.y;
newAtlas.index = m_Atlases.size();
- newAtlas.cursor = Internal::Vector2(m_AtlasMargin, m_AtlasMargin);
+ newAtlas.cursor = Vector2(m_AtlasMargin, m_AtlasMargin);
m_Atlases.push_back(newAtlas);
atlas = &m_Atlases[m_Atlases.size() - 1];
@@ -307,11 +307,11 @@ Texture* Font::CreateAtlas()
return tex;
}
-bool Font::HasEnoughSpace(GlyphAtals* atlas, Internal::Vector2 preferSize)
+bool Font::HasEnoughSpace(GlyphAtals* atlas, Vector2 preferSize)
{
if (atlas == NULL)
return false;
- Internal::Vector2 space;
+ Vector2 space;
space.x = atlas->width - atlas->cursor.x - m_AtlasMargin;
space.y = atlas->height - atlas->cursor.y - m_AtlasMargin;
if (space.x > preferSize.x && space.y > preferSize.y)
diff --git a/Runtime/GUI/UIQuad.cpp b/Runtime/GUI/UIQuad.cpp
index 089d0e1..e28a772 100644
--- a/Runtime/GUI/UIQuad.cpp
+++ b/Runtime/GUI/UIQuad.cpp
@@ -1,18 +1,18 @@
-#include "../Math/Vector2.h"
#include "../Graphics/GfxDevice.h"
#include "UIQuad.h"
+#include "Runtime/Math/Math.h"
struct UIQuadLayout
{
- Internal::Vector2 position;
- Internal::Vector2 uv;
+ Vector2 position;
+ Vector2 uv;
};
static CustomVertexLayout layout;
InitializeStaticVariables([]() {
VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 2, VertexAttrFormat_Float, sizeof(UIQuadLayout));
- VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Internal::Vector2), 2, VertexAttrFormat_Float, sizeof(UIQuadLayout));
+ VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector2), 2, VertexAttrFormat_Float, sizeof(UIQuadLayout));
layout.attributes.push_back(POSITION);
layout.attributes.push_back(UV);
diff --git a/Runtime/Graphics/GfxDevice.cpp b/Runtime/Graphics/GfxDevice.cpp
index 2c740ed..e172756 100644
--- a/Runtime/Graphics/GfxDevice.cpp
+++ b/Runtime/Graphics/GfxDevice.cpp
@@ -1,5 +1,6 @@
#include <vector>
#include "GfxDevice.h"
+#include "Runtime/Math/Math.h"
static bool deviceInited = false;
@@ -94,7 +95,7 @@ void GfxDevice::UnuseShader()
glUseProgram(0);
}
-void GfxDevice::SetUniformVec2(const char* name, Internal::Vector2 vec2)
+void GfxDevice::SetUniformVec2(const char* name, Vector2 vec2)
{
if (!m_Shader)
return;
@@ -102,7 +103,7 @@ void GfxDevice::SetUniformVec2(const char* name, Internal::Vector2 vec2)
glUniform2f(loc, vec2.x, vec2.y);
}
-void GfxDevice::SetUniformVec3(const char* name, Internal::Vector3 vec3)
+void GfxDevice::SetUniformVec3(const char* name, Vector3 vec3)
{
if (!m_Shader)
return;
@@ -110,7 +111,7 @@ void GfxDevice::SetUniformVec3(const char* name, Internal::Vector3 vec3)
glUniform3f(loc, vec3.x, vec3.y, vec3.z);
}
-void GfxDevice::SetUniformVec4(const char* name, Internal::Vector4 vec4)
+void GfxDevice::SetUniformVec4(const char* name, Vector4 vec4)
{
if (!m_Shader)
return;
@@ -118,7 +119,7 @@ void GfxDevice::SetUniformVec4(const char* name, Internal::Vector4 vec4)
glUniform4f(loc, vec4.x, vec4.y, vec4.z, vec4.w);
}
-void GfxDevice::SetUniformMat4(const char* name, Internal::Matrix44 mat4)
+void GfxDevice::SetUniformMat4(const char* name, Matrix44 mat4)
{
if (!m_Shader)
return;
diff --git a/Runtime/Graphics/GfxDevice.h b/Runtime/Graphics/GfxDevice.h
index 437696a..f00a58f 100644
--- a/Runtime/Graphics/GfxDevice.h
+++ b/Runtime/Graphics/GfxDevice.h
@@ -1,5 +1,6 @@
#ifndef DEVICE_H
#define DEVICE_H
+#include "Runtime/Math/Math.h"
#include "../Utilities/NonCopyable.h"
#include "../Utilities/Type.h"
@@ -63,10 +64,10 @@ public:
void UseShader(LuaBind::State& state, Shader* shader, int idx);
void UnuseShader();
- void SetUniformVec2(const char* name, Internal::Vector2 vec2);
- void SetUniformVec3(const char* name, Internal::Vector3 vec3);
- void SetUniformVec4(const char* name, Internal::Vector4 vec4);
- void SetUniformMat4(const char* name, Internal::Matrix44 mat4);
+ void SetUniformVec2(const char* name, Vector2 vec2);
+ void SetUniformVec3(const char* name, Vector3 vec3);
+ void SetUniformVec4(const char* name, Vector4 vec4);
+ void SetUniformMat4(const char* name, Matrix44 mat4);
void SetUniformTexture(const char* name, Texture* texture);
void ResetUniformsState();
@@ -79,7 +80,7 @@ public:
DynamicVertexBuffer* GetSharedVBO() { return &m_DynamicVBO; }
- GET_SET(Internal::Color, ClearColor, m_ClearColor);
+ GET_SET(Color, ClearColor, m_ClearColor);
GET_SET(ETextureFilterMode, DefaultFilterMode, m_DefaultFilterMode);
GET_SET(ETextureWrapMode, DefaultWrapMode, m_DefaultWrapMode);
@@ -88,7 +89,7 @@ private:
// 渲染状态
uint m_EnableFlag;
- Internal::Color m_ClearColor;
+ Color m_ClearColor;
EDepthTest m_DepthTest;
EStencilTest m_StencilTest;
EStencilOp m_StencilOp;
diff --git a/Runtime/Graphics/PolyLine.cpp b/Runtime/Graphics/PolyLine.cpp
index 24686f9..279a493 100644
--- a/Runtime/Graphics/PolyLine.cpp
+++ b/Runtime/Graphics/PolyLine.cpp
@@ -1,9 +1,9 @@
#include "PolyLine.h"
-#include "../Math/Vector3.h"
#include "Color.h"
+#include "Runtime/Math/Math.h"
struct PolyLineVBOLayout
{
- Internal::Vector3 position;
- Internal::Color32 color;
+ Vector3 position;
+ Color32 color;
};
diff --git a/Runtime/Graphics/Texture.cpp b/Runtime/Graphics/Texture.cpp
index 0cabd07..19042e9 100644
--- a/Runtime/Graphics/Texture.cpp
+++ b/Runtime/Graphics/Texture.cpp
@@ -1,5 +1,6 @@
#include "ImageData.h"
#include "Texture.h"
+#include "Runtime/Math/Math.h"
using namespace LuaBind;
@@ -196,7 +197,7 @@ Texture::~Texture()
glDeleteTextures(1, &m_GPUID);
}
-void Texture::UpdateSubImage(Internal::Rect rect, int format, int type, const void* data)
+void Texture::UpdateSubImage(Rect rect, int format, int type, const void* data)
{
glBindTexture(GL_TEXTURE_2D, m_GPUID);
diff --git a/Runtime/Graphics/Texture.h b/Runtime/Graphics/Texture.h
index 9633db5..5c23fd7 100644
--- a/Runtime/Graphics/Texture.h
+++ b/Runtime/Graphics/Texture.h
@@ -4,6 +4,7 @@
#include "Runtime/Lua/LuaHelper.h"
#include "../Utilities/UtilMacros.h"
#include "OpenGL.h"
+#include "Runtime/Math/Math.h"
class ImageData;
@@ -66,7 +67,7 @@ public:
Texture(LuaBind::VM* vm, TextureSetting setting, ImageData* imgData)/*throw TextureException*/;
~Texture();
- void UpdateSubImage(Internal::Rect rect, int format, int type, const void* data);
+ void UpdateSubImage(Rect rect, int format, int type, const void* data);
GET(int, Width, m_Width);
GET(int, Height, m_Height);
diff --git a/Runtime/Lua/LuaHelper.cpp b/Runtime/Lua/LuaHelper.cpp
index 2c95043..951f2fe 100644
--- a/Runtime/Lua/LuaHelper.cpp
+++ b/Runtime/Lua/LuaHelper.cpp
@@ -1,17 +1,14 @@
#include "LuaHelper.h"
-#include "Runtime/Math/Vector2.h"
-#include "Runtime/Math/Vector3.h"
-#include "Runtime/Math/Vector4.h"
-#include "Runtime/Math/Matrix44.h"
+#include "Runtime/Math/Math.h"
#include "Runtime/GUI/Font.h"
using namespace LuaBind;
template <>
-Internal::Rect State::GetValue < Internal::Rect >(int idx, const Internal::Rect value)
+Rect State::GetValue < Rect >(int idx, const Rect value)
{
- Internal::Rect rect = value;
+ Rect rect = value;
if (LuaHelper::IsType(*this, "GameLab.Engine.Math.Rect", idx))
{
rect.x = GetField<float>(idx, "x", 0);
@@ -30,9 +27,9 @@ Internal::Rect State::GetValue < Internal::Rect >(int idx, const Internal::Rect
}
template <>
-Internal::Vector2 State::GetValue < Internal::Vector2 >(int idx, const Internal::Vector2 value)
+Vector2 State::GetValue < Vector2 >(int idx, const Vector2 value)
{
- Internal::Vector2 v2 = value;
+ Vector2 v2 = value;
if (LuaHelper::IsType(*this, "GameLab.Engine.Math.Vector2", idx))
{
v2.x = GetField<float>(idx, "x", 0);
@@ -47,9 +44,9 @@ Internal::Vector2 State::GetValue < Internal::Vector2 >(int idx, const Internal:
}
template <>
-Internal::Vector3 State::GetValue < Internal::Vector3 >(int idx, const Internal::Vector3 value)
+Vector3 State::GetValue < Vector3 >(int idx, const Vector3 value)
{
- Internal::Vector3 v3 = value;
+ Vector3 v3 = value;
if (LuaHelper::IsType(*this, "GameLab.Engine.Math.Vector3", idx))
{
v3.x = GetField<float>(idx, "x", 0);
@@ -66,9 +63,9 @@ Internal::Vector3 State::GetValue < Internal::Vector3 >(int idx, const Internal:
}
template <>
-Internal::Vector4 State::GetValue < Internal::Vector4 >(int idx, const Internal::Vector4 value)
+Vector4 State::GetValue < Vector4 >(int idx, const Vector4 value)
{
- Internal::Vector4 v4 = value;
+ Vector4 v4 = value;
if (LuaHelper::IsType(*this, "GameLab.Engine.Math.Vector4", idx))
{
v4.x = GetField<float>(idx, "x", 0);
@@ -87,9 +84,9 @@ Internal::Vector4 State::GetValue < Internal::Vector4 >(int idx, const Internal:
}
template <>
-Internal::Matrix44 State::GetValue < Internal::Matrix44 >(int idx, const Internal::Matrix44 value)
+Matrix44 State::GetValue < Matrix44 >(int idx, const Matrix44 value)
{
- Internal::Matrix44 m4 = value;
+ Matrix44 m4 = value;
if (LuaHelper::IsType(*this, "GameLab.Engine.Math.Matrix44", idx))
{
m4.m[0][0] = GetField<float>(idx, "m00", 0);
diff --git a/Runtime/Rendering/Quad.cpp b/Runtime/Rendering/Quad.cpp
index 4c58674..dae1152 100644
--- a/Runtime/Rendering/Quad.cpp
+++ b/Runtime/Rendering/Quad.cpp
@@ -1,18 +1,19 @@
#include "../Math/Math.h"
#include "Quad.h"
#include "../Graphics/GfxDevice.h"
+#include "Runtime/Math/Math.h"
struct QuadVBOLayout
{
- Internal::Vector3 position;
- Internal::Vector2 uv;
+ Vector3 position;
+ Vector2 uv;
};
static CustomVertexLayout layout;
InitializeStaticVariables([]() {
VertexAttributeDescriptor POSITION = VertexAttributeDescriptor(0, 3, VertexAttrFormat_Float, sizeof(QuadVBOLayout));
- VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Internal::Vector3), 2, VertexAttrFormat_Float, sizeof(QuadVBOLayout));
+ VertexAttributeDescriptor UV = VertexAttributeDescriptor(sizeof(Vector3), 2, VertexAttrFormat_Float, sizeof(QuadVBOLayout));
layout.attributes.push_back(POSITION);
layout.attributes.push_back(UV);
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;