Merged in from main repository (originally from love-mipmap fork)

This commit is contained in:
Alexander Szpakowski
2013-01-12 18:07:14 -05:00
21 changed files with 677 additions and 318 deletions
@@ -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;