summaryrefslogtreecommitdiff
path: root/source/modules/asura-core/graphics/binding/_shader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/modules/asura-core/graphics/binding/_shader.cpp')
-rw-r--r--source/modules/asura-core/graphics/binding/_shader.cpp100
1 files changed, 85 insertions, 15 deletions
diff --git a/source/modules/asura-core/graphics/binding/_shader.cpp b/source/modules/asura-core/graphics/binding/_shader.cpp
index af6e981..e0a6320 100644
--- a/source/modules/asura-core/graphics/binding/_shader.cpp
+++ b/source/modules/asura-core/graphics/binding/_shader.cpp
@@ -1,6 +1,7 @@
#include "../shader.h"
using namespace std;
+using namespace Luax;
namespace AsuraEngine
{
@@ -11,9 +12,8 @@ namespace AsuraEngine
{
LUAX_REGISTER_METHODS(state,
{ "New", _New },
- { "Use", _Use },
- { "Unuse", _Unuse },
{ "Load", _Load },
+ { "Update", _Update },
{ "HasUniform", _HasUniform },
{ "GetUniformLocation", _GetUniformLocation },
{ "SetBuiltInUniforms", _SetBuiltInUniforms },
@@ -22,7 +22,16 @@ namespace AsuraEngine
{ "SetUniformVector2", _SetUniformVector2 },
{ "SetUniformVector3", _SetUniformVector3 },
{ "SetUniformVector4", _SetUniformVector4 },
- { "SetUniformColor", _SetUniformColor }
+ { "SetUniformColor", _SetUniformColor },
+ { "SetAttribPosition", _SetAttribPosition },
+ { "SetAttribTangent", _SetAttribTangent },
+ { "SetAttribNormal", _SetAttribNormal },
+ { "SetAttribColor", _SetAttribColor },
+ { "SetAttribTexcoord0", _SetAttribTexcoord0 },
+ { "SetAttribTexcoord1", _SetAttribTexcoord1 },
+ { "SetAttribTexcoord2", _SetAttribTexcoord2 },
+ { "SetAttribTexcoord3", _SetAttribTexcoord3 },
+ { "SetBuiltInUniforms", _SetBuiltInUniforms }
);
}
@@ -39,24 +48,16 @@ namespace AsuraEngine
return 0;
}
- // shader:Use()
- LUAX_IMPL_METHOD(Shader, _Use)
+ // shader:Load()
+ LUAX_IMPL_METHOD(Shader, _Load)
{
LUAX_PREPARE(L, Shader);
- return 0;
-
- }
- // shader:Unuse()
- LUAX_IMPL_METHOD(Shader, _Unuse)
- {
- LUAX_PREPARE(L, Shader);
return 0;
-
}
- // shader:Load()
- LUAX_IMPL_METHOD(Shader, _Load)
+ // shader:Update()
+ LUAX_IMPL_METHOD(Shader, _Update)
{
LUAX_PREPARE(L, Shader);
@@ -99,6 +100,7 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Shader, _SetUniformTexture)
{
LUAX_PREPARE(L, Shader);
+
return 0;
}
@@ -106,6 +108,7 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Shader, _SetUniformVector2)
{
LUAX_PREPARE(L, Shader);
+
return 0;
}
@@ -113,6 +116,7 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Shader, _SetUniformVector3)
{
LUAX_PREPARE(L, Shader);
+
return 0;
}
@@ -120,6 +124,7 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Shader, _SetUniformVector4)
{
LUAX_PREPARE(L, Shader);
+
return 0;
}
@@ -127,6 +132,71 @@ namespace AsuraEngine
LUAX_IMPL_METHOD(Shader, _SetUniformColor)
{
LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribPosition()
+ LUAX_IMPL_METHOD(Shader, _SetAttribPosition)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribTangent()
+ LUAX_IMPL_METHOD(Shader, _SetAttribTangent)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribNormal()
+ LUAX_IMPL_METHOD(Shader, _SetAttribNormal)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribColor()
+ LUAX_IMPL_METHOD(Shader, _SetAttribColor)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribTexcoord0()
+ LUAX_IMPL_METHOD(Shader, _SetAttribTexcoord0)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribTexcoord1()
+ LUAX_IMPL_METHOD(Shader, _SetAttribTexcoord1)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribTexcoord2()
+ LUAX_IMPL_METHOD(Shader, _SetAttribTexcoord2)
+ {
+ LUAX_PREPARE(L, Shader);
+
+ return 0;
+ }
+
+ // shader:SetAttribTexcoord3()
+ LUAX_IMPL_METHOD(Shader, _SetAttribTexcoord3)
+ {
+ LUAX_PREPARE(L, Shader);
+
return 0;
}