diff options
Diffstat (limited to 'source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp')
-rw-r--r-- | source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp b/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp index 0d68c11..72e33da 100644 --- a/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp +++ b/source/libs/asura-lib-core/graphics/binding/image_data.binding.cpp @@ -1,4 +1,4 @@ -#include "../image.h" +#include "../image_data.h" using namespace Luax; @@ -7,23 +7,55 @@ namespace AsuraEngine namespace Graphics { - void Image::RegisterLuaxClass(LuaxState& state) + LUAX_REGISTRY(ImageData) { } - void Image::RegisterLuaxPostprocess(LuaxState& state) + LUAX_POSTPROCESS(ImageData) + { + LUAX_REGISTER_ENUM(state, "EBlendMode", + { "Additive", 1 } + ); + LUAX_REGISTER_ENUM(state, "EPixelFormat", + { "RGBA32", 1 } + ); + } + + // imagedata = ImageData.New(databuffer) + LUAX_IMPL_METHOD(ImageData, _New) + { + LUAX_STATE(L); + + Filesystem::DataBuffer* db = state.CheckUserdata<Filesystem::DataBuffer>(1); + ImageData* image = new ImageData(*db); + image->PushLuaxUserdata(state); + return 1; + } + + LUAX_IMPL_METHOD(ImageData, _GetPixel) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetSize) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetWidth) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetHeight) + { + + } + + LUAX_IMPL_METHOD(ImageData, _GetPixelFormat) { - // blendö٣AsuraEngine.EBlendMode - LuaxEnum EBlendMode[] = { - { "Additive", 1 }, - { "PreBlend", 2 }, - { "Substruction", 3 }, - { "Multiplied", 4 }, - {0, 0} - }; - state.RegisterEnum("EBlendMode", EBlendMode); } } |