mirror of
https://github.com/love2d/love.git
synced 2026-08-16 00:02:12 +02:00
Changed love.graphics.newImage's optional second argument to be a table of flags. Current flags are 'mipmaps' and 'srgb'.
If mipmaps are enabled on image creation, the image will use the default mipmap filter (now 'nearest' by default.) Image:setMipmapFilter will error if the image was not created with mipmaps enabled. --HG-- branch : minor
This commit is contained in:
@@ -48,9 +48,7 @@ int w_Image_setMipmapFilter(lua_State *L)
|
||||
}
|
||||
|
||||
luax_catchexcept(L, [&](){ t->setFilter(f); });
|
||||
|
||||
float sharpness = (float) luaL_optnumber(L, 3, 0);
|
||||
t->setMipmapSharpness(sharpness);
|
||||
t->setMipmapSharpness((float) luaL_optnumber(L, 3, 0.0));
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user