1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
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;
}
}
}
|