mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Fix link error. Move a couple Lua wrappers from Image to Texture.
This commit is contained in:
@@ -57,7 +57,6 @@ public:
|
|||||||
void replacePixels(love::image::ImageDataBase *d, int slice, int mipmap, int x, int y, bool reloadmipmaps);
|
void replacePixels(love::image::ImageDataBase *d, int slice, int mipmap, int x, int y, bool reloadmipmaps);
|
||||||
void replacePixels(const void *data, size_t size, int slice, int mipmap, const Rect &rect, bool reloadmipmaps);
|
void replacePixels(const void *data, size_t size, int slice, int mipmap, const Rect &rect, bool reloadmipmaps);
|
||||||
|
|
||||||
bool isFormatLinear() const;
|
|
||||||
MipmapsType getMipmapsType() const;
|
MipmapsType getMipmapsType() const;
|
||||||
|
|
||||||
static bool getConstant(const char *in, SettingType &out);
|
static bool getConstant(const char *in, SettingType &out);
|
||||||
|
|||||||
@@ -31,20 +31,6 @@ Image *luax_checkimage(lua_State *L, int idx)
|
|||||||
return luax_checktype<Image>(L, idx);
|
return luax_checktype<Image>(L, idx);
|
||||||
}
|
}
|
||||||
|
|
||||||
int w_Image_isFormatLinear(lua_State *L)
|
|
||||||
{
|
|
||||||
Image *i = luax_checkimage(L, 1);
|
|
||||||
luax_pushboolean(L, i->isFormatLinear());
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int w_Image_isCompressed(lua_State *L)
|
|
||||||
{
|
|
||||||
Image *i = luax_checkimage(L, 1);
|
|
||||||
luax_pushboolean(L, i->isCompressed());
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
int w_Image_replacePixels(lua_State *L)
|
int w_Image_replacePixels(lua_State *L)
|
||||||
{
|
{
|
||||||
Image *i = luax_checkimage(L, 1);
|
Image *i = luax_checkimage(L, 1);
|
||||||
@@ -76,8 +62,6 @@ int w_Image_replacePixels(lua_State *L)
|
|||||||
|
|
||||||
static const luaL_Reg w_Image_functions[] =
|
static const luaL_Reg w_Image_functions[] =
|
||||||
{
|
{
|
||||||
{ "isFormatLinear", w_Image_isFormatLinear },
|
|
||||||
{ "isCompressed", w_Image_isCompressed },
|
|
||||||
{ "replacePixels", w_Image_replacePixels },
|
{ "replacePixels", w_Image_replacePixels },
|
||||||
{ 0, 0 }
|
{ 0, 0 }
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -129,6 +129,20 @@ int w_Texture_getDPIScale(lua_State *L)
|
|||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int w_Texture_isFormatLinear(lua_State *L)
|
||||||
|
{
|
||||||
|
Texture *t = luax_checktexture(L, 1);
|
||||||
|
luax_pushboolean(L, t->isFormatLinear());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
int w_Texture_isCompressed(lua_State *L)
|
||||||
|
{
|
||||||
|
Texture *t = luax_checktexture(L, 1);
|
||||||
|
luax_pushboolean(L, t->isCompressed());
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
int w_Texture_setFilter(lua_State *L)
|
int w_Texture_setFilter(lua_State *L)
|
||||||
{
|
{
|
||||||
Texture *t = luax_checktexture(L, 1);
|
Texture *t = luax_checktexture(L, 1);
|
||||||
@@ -314,6 +328,8 @@ const luaL_Reg w_Texture_functions[] =
|
|||||||
{ "getPixelHeight", w_Texture_getPixelHeight },
|
{ "getPixelHeight", w_Texture_getPixelHeight },
|
||||||
{ "getPixelDimensions", w_Texture_getPixelDimensions },
|
{ "getPixelDimensions", w_Texture_getPixelDimensions },
|
||||||
{ "getDPIScale", w_Texture_getDPIScale },
|
{ "getDPIScale", w_Texture_getDPIScale },
|
||||||
|
{ "isFormatLinear", w_Texture_isFormatLinear },
|
||||||
|
{ "isCompressed", w_Texture_isCompressed },
|
||||||
{ "setFilter", w_Texture_setFilter },
|
{ "setFilter", w_Texture_setFilter },
|
||||||
{ "getFilter", w_Texture_getFilter },
|
{ "getFilter", w_Texture_getFilter },
|
||||||
{ "setMipmapFilter", w_Texture_setMipmapFilter },
|
{ "setMipmapFilter", w_Texture_setMipmapFilter },
|
||||||
|
|||||||
Reference in New Issue
Block a user