summaryrefslogtreecommitdiff
path: root/source/libs/asura-lib-core/graphics/binding
diff options
context:
space:
mode:
Diffstat (limited to 'source/libs/asura-lib-core/graphics/binding')
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_canvas.cpp46
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_color.cpp54
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_color32.cpp86
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_image.cpp99
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_image_data.cpp70
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_image_decode_task.cpp21
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp21
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_shader.cpp126
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp21
-rw-r--r--source/libs/asura-lib-core/graphics/binding/_window.cpp103
10 files changed, 0 insertions, 647 deletions
diff --git a/source/libs/asura-lib-core/graphics/binding/_canvas.cpp b/source/libs/asura-lib-core/graphics/binding/_canvas.cpp
deleted file mode 100644
index 7927995..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_canvas.cpp
+++ /dev/null
@@ -1,46 +0,0 @@
-#include "../canvas.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Canvas)
- {
- LUAX_REGISTER_METHODS(state,
- { "SetSize", _SetSize },
- { "Bind", _Bind },
- { "Unbind", _Unbind }
- );
- }
-
- LUAX_POSTPROCESS(Canvas)
- {
-
- }
-
- // canvas:SetSize()
- LUAX_IMPL_METHOD(Canvas, _SetSize)
- {
- LUAX_PREPARE(L, Canvas);
-
- }
-
- // canvas:Bind()
- LUAX_IMPL_METHOD(Canvas, _Bind)
- {
- LUAX_PREPARE(L, Canvas);
-
- }
-
- // canvas:Unbind()
- LUAX_IMPL_METHOD(Canvas, _Unbind)
- {
- LUAX_PREPARE(L, Canvas);
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_color.cpp b/source/libs/asura-lib-core/graphics/binding/_color.cpp
deleted file mode 100644
index 11e80a1..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_color.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "../color.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Color)
- {
- LUAX_REGISTER_METHODS(state,
- { "ToColor32", _ToColor32 },
- { "SetColor", _SetColor },
- { "GetColor", _GetColor },
- { "Multiply", _Multiply }
- );
- }
-
- LUAX_POSTPROCESS(Color)
- {
-
- }
-
- // color:ToColor32()
- LUAX_IMPL_METHOD(Color, _ToColor32)
- {
- LUAX_PREPARE(L, Color);
-
- }
-
- // color:SetColor()
- LUAX_IMPL_METHOD(Color, _SetColor)
- {
- LUAX_PREPARE(L, Color);
-
- }
-
- // color:GetColor()
- LUAX_IMPL_METHOD(Color, _GetColor)
- {
- LUAX_PREPARE(L, Color);
-
- }
-
- // color:Multiply()
- LUAX_IMPL_METHOD(Color, _Multiply)
- {
- LUAX_PREPARE(L, Color);
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_color32.cpp b/source/libs/asura-lib-core/graphics/binding/_color32.cpp
deleted file mode 100644
index 7095866..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_color32.cpp
+++ /dev/null
@@ -1,86 +0,0 @@
-#include "../color32.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Color32)
- {
- LUAX_REGISTER_METHODS(state,
- { "ToColor", _ToColor },
- { "GetRed", _GetRed },
- { "GetGreen", _GetGreen },
- { "GetBlue", _GetBlue },
- { "GetAlpha", _GetAlpha },
- { "Multiply", _Multiply },
- { "Index", _Index },
- { "NewIndex", _NewIndex }
- );
- }
-
- LUAX_POSTPROCESS(Color32)
- {
-
- }
-
- // color32:ToColor()
- LUAX_IMPL_METHOD(Color32, _ToColor)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:GetRed()
- LUAX_IMPL_METHOD(Color32, _GetRed)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:GetGreen()
- LUAX_IMPL_METHOD(Color32, _GetGreen)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:GetBlue()
- LUAX_IMPL_METHOD(Color32, _GetBlue)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:GetAlpha()
- LUAX_IMPL_METHOD(Color32, _GetAlpha)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:Multiply()
- LUAX_IMPL_METHOD(Color32, _Multiply)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:Index()
- LUAX_IMPL_METHOD(Color32, _Index)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- // color32:NewIndex()
- LUAX_IMPL_METHOD(Color32, _NewIndex)
- {
- LUAX_PREPARE(L, Color32);
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_image.cpp b/source/libs/asura-lib-core/graphics/binding/_image.cpp
deleted file mode 100644
index cb008d3..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_image.cpp
+++ /dev/null
@@ -1,99 +0,0 @@
-#include "../image.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Image)
- {
- LUAX_REGISTER_METHODS(state,
- { "New", _New },
- { "Load", _Load },
- { "GetWidth", _GetWidth },
- { "GetHeight", _GetHeight },
- { "GetSize", _GetSize },
- { "GetPixel", _GetPixel },
- { "Render", _Render }
- );
- }
-
- LUAX_POSTPROCESS(Image)
- {
-
- }
-
- // image = Image.New()
- LUAX_IMPL_METHOD(Image, _New)
- {
- LUAX_STATE(L);
-
- Image* image = new Image();
- image->PushLuaxUserdata(state);
- return 0;
- }
-
- // successed = image:Load(image_data)
- LUAX_IMPL_METHOD(Image, _Load)
- {
- LUAX_PREPARE(L, Image);
-
- ImageData* imgdata = state.CheckUserdata<ImageData>(2);
- bool loaded = self->Load(imgdata);
- state.Push(loaded);
- return 1;
- }
-
- // width = image:GetWidth()
- LUAX_IMPL_METHOD(Image, _GetWidth)
- {
- LUAX_PREPARE(L, Image);
-
- state.Push(self->GetWidth());
- return 1;
- }
-
- // height = image:GetHeight()
- LUAX_IMPL_METHOD(Image, _GetHeight)
- {
- LUAX_PREPARE(L, Image);
-
- state.Push(self->GetHeight());
- return 1;
- }
-
- // w, h = image:GetSize()
- LUAX_IMPL_METHOD(Image, _GetSize)
- {
- LUAX_PREPARE(L, Image);
-
- Math::Vector2u size = self->GetSize();
- state.Push(size.x);
- state.Push(size.y);
- return 2;
- }
-
- // color32 = image:GetPixel(x, y)
- LUAX_IMPL_METHOD(Image, _GetPixel)
- {
- LUAX_PREPARE(L, Image);
-
- uint x = state.CheckValue<uint>(2);
- uint y = state.CheckValue<uint>(3);
- Color32* c32 = new Color32(self->GetPixel(x, y));
- c32->PushLuaxUserdata(state);
- return 1;
- }
-
- // image:Render()
- LUAX_IMPL_METHOD(Image, _Render)
- {
- LUAX_PREPARE(L, Image);
-
- return 0;
- }
-
- }
-} \ No newline at end of file
diff --git a/source/libs/asura-lib-core/graphics/binding/_image_data.cpp b/source/libs/asura-lib-core/graphics/binding/_image_data.cpp
deleted file mode 100644
index 3ff38f9..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_image_data.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-#include "../image_data.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(ImageData)
- {
- LUAX_REGISTER_METHODS(state,
- { "New", _New },
- { "GetPixel", _GetPixel },
- { "GetSize", _GetSize },
- { "GetWidth", _GetWidth },
- { "GetHeight", _GetHeight },
- { "GetPixelFormat", _GetPixelFormat }
- );
- }
-
- LUAX_POSTPROCESS(ImageData)
- {
-
- }
-
- // ImageData.New()
- LUAX_IMPL_METHOD(ImageData, _New)
- {
- LUAX_STATE(L);
-
- }
-
- // imagedata:GetPixel()
- LUAX_IMPL_METHOD(ImageData, _GetPixel)
- {
- LUAX_PREPARE(L, ImageData);
-
- }
-
- // imagedata:GetSize()
- LUAX_IMPL_METHOD(ImageData, _GetSize)
- {
- LUAX_PREPARE(L, ImageData);
-
- }
-
- // imagedata:GetWidth()
- LUAX_IMPL_METHOD(ImageData, _GetWidth)
- {
- LUAX_PREPARE(L, ImageData);
-
- }
-
- // imagedata:GetHeight()
- LUAX_IMPL_METHOD(ImageData, _GetHeight)
- {
- LUAX_PREPARE(L, ImageData);
-
- }
-
- // imagedata:GetPixelFormat()
- LUAX_IMPL_METHOD(ImageData, _GetPixelFormat)
- {
- LUAX_PREPARE(L, ImageData);
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_image_decode_task.cpp b/source/libs/asura-lib-core/graphics/binding/_image_decode_task.cpp
deleted file mode 100644
index 76b544b..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_image_decode_task.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "../image_decode_task.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(ImageDecodeTask)
- {
-
- }
-
- LUAX_POSTPROCESS(ImageDecodeTask)
- {
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp b/source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp
deleted file mode 100644
index 07e9f12..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_mesh2d.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "../mesh2d.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Mesh2D)
- {
-
- }
-
- LUAX_POSTPROCESS(Mesh2D)
- {
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_shader.cpp b/source/libs/asura-lib-core/graphics/binding/_shader.cpp
deleted file mode 100644
index a06e54b..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_shader.cpp
+++ /dev/null
@@ -1,126 +0,0 @@
-#include "../shader.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Shader)
- {
- LUAX_REGISTER_METHODS(state,
- { "New", _New },
- { "Use", _Use },
- { "Unuse", _Unuse },
- { "Load", _Load },
- { "HasUniform", _HasUniform },
- { "GetUniformLocation", _GetUniformLocation },
- { "SetBuiltInUniforms", _SetBuiltInUniforms },
- { "SetUniformFloat", _SetUniformFloat },
- { "SetUniformTexture", _SetUniformTexture },
- { "SetUniformVector2", _SetUniformVector2 },
- { "SetUniformVector3", _SetUniformVector3 },
- { "SetUniformVector4", _SetUniformVector4 },
- { "SetUniformColor", _SetUniformColor }
- );
- }
-
- LUAX_POSTPROCESS(Shader)
- {
-
- }
-
- // Shader.New()
- LUAX_IMPL_METHOD(Shader, _New)
- {
- LUAX_STATE(L);
-
- }
-
- // shader:Use()
- LUAX_IMPL_METHOD(Shader, _Use)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:Unuse()
- LUAX_IMPL_METHOD(Shader, _Unuse)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:Load()
- LUAX_IMPL_METHOD(Shader, _Load)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:HasUniform()
- LUAX_IMPL_METHOD(Shader, _HasUniform)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:GetUniformLocation()
- LUAX_IMPL_METHOD(Shader, _GetUniformLocation)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetBuiltInUniforms()
- LUAX_IMPL_METHOD(Shader, _SetBuiltInUniforms)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformFloat()
- LUAX_IMPL_METHOD(Shader, _SetUniformFloat)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformTexture()
- LUAX_IMPL_METHOD(Shader, _SetUniformTexture)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformVector2()
- LUAX_IMPL_METHOD(Shader, _SetUniformVector2)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformVector3()
- LUAX_IMPL_METHOD(Shader, _SetUniformVector3)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformVector4()
- LUAX_IMPL_METHOD(Shader, _SetUniformVector4)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- // shader:SetUniformColor()
- LUAX_IMPL_METHOD(Shader, _SetUniformColor)
- {
- LUAX_PREPARE(L, Shader);
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp b/source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp
deleted file mode 100644
index 8556c02..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_sprite_batch.cpp
+++ /dev/null
@@ -1,21 +0,0 @@
-#include "../sprite_batch.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(SpriteBatch)
- {
-
- }
-
- LUAX_POSTPROCESS(SpriteBatch)
- {
-
- }
-
- }
-}
diff --git a/source/libs/asura-lib-core/graphics/binding/_window.cpp b/source/libs/asura-lib-core/graphics/binding/_window.cpp
deleted file mode 100644
index fc74d6c..0000000
--- a/source/libs/asura-lib-core/graphics/binding/_window.cpp
+++ /dev/null
@@ -1,103 +0,0 @@
-#include "../window.h"
-
-using namespace std;
-
-namespace AsuraEngine
-{
- namespace Graphics
- {
-
- LUAX_REGISTRY(Window)
- {
- LUAX_REGISTER_METHODS(state,
- { "Show", _Show },
- { "Hide", _Hide },
- { "SetResolution", _SetResolution },
- { "SetFullScreen", _SetFullScreen },
- { "SetTitle", _SetTitle },
- { "SetWindowStyle", _SetWindowStyle },
- { "Clear", _Clear },
- { "Draw", _Draw },
- { "SwapRenderBuffer", _SwapRenderBuffer }
- );
- }
-
- LUAX_POSTPROCESS(Window)
- {
-
- }
-
- // window:Show()
- LUAX_IMPL_METHOD(Window, _Show)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:Hide()
- LUAX_IMPL_METHOD(Window, _Hide)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:SetResolution()
- LUAX_IMPL_METHOD(Window, _SetResolution)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:SetFullScreen()
- LUAX_IMPL_METHOD(Window, _SetFullScreen)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:SetTitle()
- LUAX_IMPL_METHOD(Window, _SetTitle)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:SetWindowStyle()
- LUAX_IMPL_METHOD(Window, _SetWindowStyle)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:Clear()
- LUAX_IMPL_METHOD(Window, _Clear)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:Draw()
- LUAX_IMPL_METHOD(Window, _Draw)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- // window:SwapRenderBuffer()
- LUAX_IMPL_METHOD(Window, _SwapRenderBuffer)
- {
- LUAX_PREPARE(L, Window);
-
- return 0;
- }
-
- }
-}