| 1234567891011121314151617181920212223242526272829303132333435363738 |
- $#include "Graphics/Texture3D.h"
- enum TextureUsage{};
- class Texture3D : public Texture
- {
- Texture3D();
- ~Texture3D();
- bool SetSize(int width, int height, int depth, unsigned format, TextureUsage usage = TEXTURE_STATIC);
- // bool SetData(SharedPtr<Image> image, bool useAlpha = false);
- tolua_outside bool Texture3DSetData @ SetData(Image* image, bool useAlpha = false);
- };
- ${
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Texture3D_new00
- static int tolua_GraphicsLuaAPI_Texture3D_new00(lua_State* tolua_S)
- {
- return ToluaNewObject<Texture3D>(tolua_S);
- }
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Texture3D_new00_local
- static int tolua_GraphicsLuaAPI_Texture3D_new00_local(lua_State* tolua_S)
- {
- return ToluaNewObjectGC<Texture3D>(tolua_S);
- }
- static bool Texture3DSetData(Texture3D* texture, Image* image, bool useAlpha)
- {
- SharedPtr<Image> imagePtr(image);
- bool ret = texture->SetData(imagePtr, useAlpha);
- // Need to safely detach the object from the shared pointer so that the Lua script can manually
- // delete the object once done
- imagePtr.Detach();
- return ret;
- }
- $}
|