mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Merged in from main repository (originally from love-mipmap fork)
This commit is contained in:
@@ -622,8 +622,10 @@ int w_setDefaultImageFilter(lua_State *L)
|
||||
{
|
||||
Image::FilterMode min;
|
||||
Image::FilterMode mag;
|
||||
|
||||
const char *minstr = luaL_checkstring(L, 1);
|
||||
const char *magstr = luaL_optstring(L, 2, minstr);
|
||||
|
||||
if (!Image::getConstant(minstr, min))
|
||||
return luaL_error(L, "Invalid filter mode: %s", minstr);
|
||||
if (!Image::getConstant(magstr, mag))
|
||||
@@ -632,6 +634,7 @@ int w_setDefaultImageFilter(lua_State *L)
|
||||
Image::Filter f;
|
||||
f.min = min;
|
||||
f.mag = mag;
|
||||
|
||||
instance->setDefaultImageFilter(f);
|
||||
|
||||
return 0;
|
||||
@@ -871,7 +874,12 @@ int w_isSupported(lua_State *L)
|
||||
supported = false;
|
||||
break;
|
||||
case Graphics::SUPPORT_SUBTRACTIVE:
|
||||
supported = (GLEE_VERSION_1_4 || GLEE_ARB_imaging) || (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract);
|
||||
if (!((GLEE_VERSION_1_4 || GLEE_ARB_imaging) || (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract)))
|
||||
supported = false;
|
||||
break;
|
||||
case Graphics::SUPPORT_MIPMAP:
|
||||
if (!Image::hasMipmapSupport())
|
||||
supported = false;
|
||||
break;
|
||||
default:
|
||||
supported = false;
|
||||
|
||||
Reference in New Issue
Block a user