diff --git a/platform/xcode/macosx/love-macosx.plist b/platform/xcode/macosx/love-macosx.plist index 386742df1..9357ab49f 100644 --- a/platform/xcode/macosx/love-macosx.plist +++ b/platform/xcode/macosx/love-macosx.plist @@ -69,12 +69,12 @@ public.app-category.games NSHighResolutionCapable - NSSupportsAutomaticGraphicsSwitching - NSHumanReadableCopyright © 2006-2016 LÖVE Development Team NSPrincipalClass NSApplication + NSSupportsAutomaticGraphicsSwitching + UTExportedTypeDeclarations diff --git a/src/modules/graphics/Graphics.cpp b/src/modules/graphics/Graphics.cpp index 3f40823d2..6a78c0a73 100644 --- a/src/modules/graphics/Graphics.cpp +++ b/src/modules/graphics/Graphics.cpp @@ -610,6 +610,7 @@ StringMap::Entry Graphics::blendM { "darken", BLEND_DARKEN }, { "screen", BLEND_SCREEN }, { "replace", BLEND_REPLACE }, + { "none", BLEND_NONE }, }; StringMap Graphics::blendModes(Graphics::blendModeEntries, sizeof(Graphics::blendModeEntries)); diff --git a/src/modules/graphics/Graphics.h b/src/modules/graphics/Graphics.h index 4d17219b4..6b63c9c06 100644 --- a/src/modules/graphics/Graphics.h +++ b/src/modules/graphics/Graphics.h @@ -97,6 +97,7 @@ public: BLEND_DARKEN, BLEND_SCREEN, BLEND_REPLACE, + BLEND_NONE, BLEND_MAX_ENUM }; diff --git a/src/modules/graphics/opengl/Graphics.cpp b/src/modules/graphics/opengl/Graphics.cpp index ab1dc99af..ec62a39a6 100644 --- a/src/modules/graphics/opengl/Graphics.cpp +++ b/src/modules/graphics/opengl/Graphics.cpp @@ -1602,6 +1602,7 @@ void Graphics::setBlendMode(BlendMode mode, BlendAlpha alphamode) dstRGB = dstA = GL_ONE_MINUS_SRC_COLOR; break; case BLEND_REPLACE: + case BLEND_NONE: default: srcRGB = srcA = GL_ONE; dstRGB = dstA = GL_ZERO; @@ -1609,7 +1610,7 @@ void Graphics::setBlendMode(BlendMode mode, BlendAlpha alphamode) } // We can only do alpha-multiplication when srcRGB would have been unmodified. - if (srcRGB == GL_ONE && alphamode == BLENDALPHA_MULTIPLY) + if (srcRGB == GL_ONE && alphamode == BLENDALPHA_MULTIPLY && mode != BLEND_NONE) srcRGB = GL_SRC_ALPHA; glBlendEquation(func);