summaryrefslogtreecommitdiff
path: root/Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp')
-rw-r--r--Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp151
1 files changed, 151 insertions, 0 deletions
diff --git a/Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp b/Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp
new file mode 100644
index 0000000..f6c2004
--- /dev/null
+++ b/Source/modules/asura-core/Graphics/binding/GfxDevice.binding.cpp
@@ -0,0 +1,151 @@
+#include "../GfxDevice.h"
+
+using namespace std;
+using namespace Luax;
+
+namespace_begin(AsuraEngine)
+namespace_begin(Graphics)
+
+
+ LUAX_REGISTRY(GfxDevice)
+ {
+ LUAX_REGISTER_METHODS(state,
+ { "SetMatrixMode", _SetMatrixMode },
+ { "GetMatrixMode", _GetMatrixMode },
+ { "PushMatrix", _PushMatrix },
+ { "PopMatrix", _PopMatrix },
+ { "LoadIdentity", _LoadIdentity },
+ { "Rotate", _Rotate },
+ { "Translate", _Translate },
+ { "Scale", _Scale },
+ { "Ortho", _Ortho },
+ { "GetMatrixDepth", _GetMatrixDepth },
+ { "GetMatrixIndex", _GetMatrixIndex },
+ { "UseShader", _UseShader },
+ { "UnuseShader", _UnuseShader }
+ );
+ }
+
+ LUAX_POSTPROCESS(GfxDevice)
+ {
+ LUAX_REGISTER_ENUM(state, "EMatrixMode",
+ { "PROJECTION", MATRIX_MODE_PROJECTION },
+ { "0", 0 },
+ { "MODEL", MATRIX_MODE_MODEL },
+ { "1", 1 },
+ { "VIEW", MATRIX_MODE_VIEW },
+ { "2", 2 }
+ );
+ LUAX_REGISTER_ENUM(state, "EGLParams",
+ { "MAX_TEXTURE_UNIT", GL_PARAM_MAX_TEXTURE_UNIT },
+ { "1", 1 }
+ );
+
+ }
+
+ // gfxdevice:SetMatrixMode()
+ LUAX_IMPL_METHOD(GfxDevice, _SetMatrixMode)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:GetMatrixMode()
+ LUAX_IMPL_METHOD(GfxDevice, _GetMatrixMode)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:PushMatrix()
+ LUAX_IMPL_METHOD(GfxDevice, _PushMatrix)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:PopMatrix()
+ LUAX_IMPL_METHOD(GfxDevice, _PopMatrix)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:LoadIdentity()
+ LUAX_IMPL_METHOD(GfxDevice, _LoadIdentity)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:Rotate()
+ LUAX_IMPL_METHOD(GfxDevice, _Rotate)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:Translate()
+ LUAX_IMPL_METHOD(GfxDevice, _Translate)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:Scale()
+ LUAX_IMPL_METHOD(GfxDevice, _Scale)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:Ortho()
+ LUAX_IMPL_METHOD(GfxDevice, _Ortho)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:GetMatrixDepth()
+ LUAX_IMPL_METHOD(GfxDevice, _GetMatrixDepth)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:GetMatrixIndex()
+ LUAX_IMPL_METHOD(GfxDevice, _GetMatrixIndex)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:UseShader()
+ LUAX_IMPL_METHOD(GfxDevice, _UseShader)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ // gfxdevice:UnuseShader()
+ LUAX_IMPL_METHOD(GfxDevice, _UnuseShader)
+ {
+ LUAX_PREPARE(L, GfxDevice);
+
+ return 0;
+ }
+
+ }
+}