Commits

Alex Szpakowski committed b757895

Added "mipmap" love.graphics.isSupported string

  • Participants
  • Parent commits 35020da

Comments (0)

Files changed (3)

File src/modules/graphics/Graphics.cpp

 	{ "pixeleffect", Graphics::SUPPORT_PIXELEFFECT },
 	{ "npot", Graphics::SUPPORT_NPOT },
 	{ "subtractive", Graphics::SUPPORT_SUBTRACTIVE },
+	{ "mipmap", Graphics::SUPPORT_MIPMAP },
 };
 
 StringMap<Graphics::Support, Graphics::SUPPORT_MAX_ENUM> Graphics::support(Graphics::supportEntries, sizeof(Graphics::supportEntries));

File src/modules/graphics/Graphics.h

 		SUPPORT_PIXELEFFECT,
 		SUPPORT_NPOT,
 		SUPPORT_SUBTRACTIVE,
+		SUPPORT_MIPMAP,
 		SUPPORT_MAX_ENUM
 	};
 

File src/modules/graphics/opengl/wrap_Graphics.cpp

 				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;