mirror of
https://github.com/love2d/love.git
synced 2026-08-17 19:23:38 +02:00
Added "mipmap" love.graphics.isSupported string
This commit is contained in:
@@ -160,6 +160,7 @@ StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM>::Entry Graphics::suppor
|
|||||||
{ "pixeleffect", Graphics::SUPPORT_PIXELEFFECT },
|
{ "pixeleffect", Graphics::SUPPORT_PIXELEFFECT },
|
||||||
{ "npot", Graphics::SUPPORT_NPOT },
|
{ "npot", Graphics::SUPPORT_NPOT },
|
||||||
{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
|
{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
|
||||||
|
{ "mipmap", Graphics::SUPPORT_MIPMAP },
|
||||||
};
|
};
|
||||||
|
|
||||||
StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM> Graphics::support(Graphics::supportEntries, sizeof(Graphics::supportEntries));
|
StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM> Graphics::support(Graphics::supportEntries, sizeof(Graphics::supportEntries));
|
||||||
|
|||||||
@@ -89,6 +89,7 @@ public:
|
|||||||
SUPPORT_PIXELEFFECT,
|
SUPPORT_PIXELEFFECT,
|
||||||
SUPPORT_NPOT,
|
SUPPORT_NPOT,
|
||||||
SUPPORT_SUBTRACTIVE,
|
SUPPORT_SUBTRACTIVE,
|
||||||
|
SUPPORT_MIPMAP,
|
||||||
SUPPORT_MAX_ENUM
|
SUPPORT_MAX_ENUM
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -853,7 +853,12 @@ int w_isSupported(lua_State *L)
|
|||||||
supported = false;
|
supported = false;
|
||||||
break;
|
break;
|
||||||
case Graphics::SUPPORT_SUBTRACTIVE:
|
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;
|
break;
|
||||||
default:
|
default:
|
||||||
supported = false;
|
supported = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user