diff --git a/include/SFML/Graphics/BlendMode.hpp b/include/SFML/Graphics/BlendMode.hpp index 7f5803be..08f049dd 100644 --- a/include/SFML/Graphics/BlendMode.hpp +++ b/include/SFML/Graphics/BlendMode.hpp @@ -68,8 +68,9 @@ struct SFML_GRAPHICS_API BlendMode //////////////////////////////////////////////////////// enum Equation { - Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor - Subtract ///< Pixel = Src * SrcFactor - Dst * DstFactor + Add, ///< Pixel = Src * SrcFactor + Dst * DstFactor + Subtract, ///< Pixel = Src * SrcFactor - Dst * DstFactor + ReverseSubtract ///< Pixel = Dst * DstFactor - Src * SrcFactor }; //////////////////////////////////////////////////////////// diff --git a/src/SFML/Graphics/GLExtensions.hpp b/src/SFML/Graphics/GLExtensions.hpp index 7f76de9e..bcc5d7e6 100644 --- a/src/SFML/Graphics/GLExtensions.hpp +++ b/src/SFML/Graphics/GLExtensions.hpp @@ -64,6 +64,7 @@ #define GLEXT_glBlendEquation glBlendEquationOES #define GLEXT_GL_FUNC_ADD GL_FUNC_ADD_OES #define GLEXT_GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_OES + #define GLEXT_GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_OES // The following extensions are optional. @@ -142,6 +143,7 @@ // Core since 1.2 - EXT_blend_subtract #define GLEXT_blend_subtract sfogl_ext_EXT_blend_subtract #define GLEXT_GL_FUNC_SUBTRACT GL_FUNC_SUBTRACT_EXT + #define GLEXT_GL_FUNC_REVERSE_SUBTRACT GL_FUNC_REVERSE_SUBTRACT_EXT // Core since 1.3 - ARB_multitexture #define GLEXT_multitexture sfogl_ext_ARB_multitexture diff --git a/src/SFML/Graphics/RenderTarget.cpp b/src/SFML/Graphics/RenderTarget.cpp index 28b35e45..ded377c1 100644 --- a/src/SFML/Graphics/RenderTarget.cpp +++ b/src/SFML/Graphics/RenderTarget.cpp @@ -67,6 +67,7 @@ namespace { case sf::BlendMode::Add: return GLEXT_GL_FUNC_ADD; case sf::BlendMode::Subtract: return GLEXT_GL_FUNC_SUBTRACT; + case sf::BlendMode::ReverseSubtract: return GLEXT_GL_FUNC_REVERSE_SUBTRACT; } sf::err() << "Invalid value for sf::BlendMode::Equation! Fallback to sf::BlendMode::Add." << std::endl;