| 12345678910111213141516171819202122232425262728293031323334353637383940 |
- $#include "Graphics/Texture2D.h"
- enum TextureUsage{};
- class Texture2D : public Texture
- {
- Texture2D();
- ~Texture2D();
- bool SetSize(int width, int height, unsigned format, TextureUsage usage = TEXTURE_STATIC, int multiSample = 1, bool autoResolve = true);
- bool SetData(Image* image, bool useAlpha = false);
- tolua_outside Image* Texture2DGetImage @ GetImage() const;
- RenderSurface* GetRenderSurface() const;
-
- tolua_readonly tolua_property__get_set RenderSurface* renderSurface;
- };
- ${
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Texture2D_new00
- static int tolua_GraphicsLuaAPI_Texture2D_new00(lua_State* tolua_S)
- {
- return ToluaNewObject<Texture2D>(tolua_S);
- }
- #define TOLUA_DISABLE_tolua_GraphicsLuaAPI_Texture2D_new00_local
- static int tolua_GraphicsLuaAPI_Texture2D_new00_local(lua_State* tolua_S)
- {
- return ToluaNewObjectGC<Texture2D>(tolua_S);
- }
- static Image* Texture2DGetImage(const Texture2D* texture2D)
- {
- if (!texture2D)
- return 0;
- return texture2D->GetImage().Detach();
- }
- $}
|