blob: 88412e56477e61fc74b0f8b0c0a4c6a7378ba3fc (
plain)
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
|
#include "Runtime/Graphics/ImageData.h"
using namespace LuaBind;
LUA_BIND_REGISTRY(ImageData)
{
LUA_BIND_REGISTER_METHODS(state,
{ "GetWidth", _GetWidth },
{ "GetHeight", _GetHeight },
{ "GetSize", _GetSize }
);
}
LUA_BIND_POSTPROCESS(ImageData)
{
}
LUA_BIND_IMPL_METHOD(ImageData, _GetWidth)
{
LUA_BIND_PREPARE(L, ImageData);
state.Push(self->width);
return 1;
}
LUA_BIND_IMPL_METHOD(ImageData, _GetHeight)
{
LUA_BIND_PREPARE(L, ImageData);
state.Push(self->height);
return 1;
}
LUA_BIND_IMPL_METHOD(ImageData, _GetSize)
{
LUA_BIND_PREPARE(L, ImageData);
state.Push(self->width);
state.Push(self->height);
return 2;
}
|