mirror of
https://github.com/love2d/love.git
synced 2026-08-15 15:51:12 +02:00
Fixed love.graphics.getBlendMode on systems which don't support the subtractive blend mode
This commit is contained in:
@@ -551,10 +551,14 @@ void Graphics::setColorMode(Graphics::ColorMode mode)
|
||||
|
||||
Graphics::BlendMode Graphics::getBlendMode() const
|
||||
{
|
||||
GLint dst, src, equation;
|
||||
GLint dst, src;
|
||||
glGetIntegerv(GL_BLEND_DST, &dst);
|
||||
glGetIntegerv(GL_BLEND_SRC, &src);
|
||||
glGetIntegerv(GL_BLEND_EQUATION, &equation);
|
||||
|
||||
GLint equation = GL_FUNC_ADD;
|
||||
|
||||
if (GLEE_VERSION_1_4 || GLEE_ARB_imaging || (GLEE_EXT_blend_minmax && GLEE_EXT_blend_subtract))
|
||||
glGetIntegerv(GL_BLEND_EQUATION, &equation);
|
||||
|
||||
if (equation == GL_FUNC_REVERSE_SUBTRACT) // && src == GL_SRC_ALPHA && dst == GL_ONE
|
||||
return BLEND_SUBTRACTIVE;
|
||||
|
||||
Reference in New Issue
Block a user