diff --git a/OpenRA.Platforms.Default/OpenGL.cs b/OpenRA.Platforms.Default/OpenGL.cs index be6b905e66..1701b67aa5 100644 --- a/OpenRA.Platforms.Default/OpenGL.cs +++ b/OpenRA.Platforms.Default/OpenGL.cs @@ -275,6 +275,9 @@ namespace OpenRA.Platforms.Default public delegate void BlendEquation(int mode); public static BlendEquation glBlendEquation { get; private set; } + public delegate void BlendEquationSeparate(int modeRGB, int modeAlpha); + public static BlendEquationSeparate glBlendEquationSeparate { get; private set; } + public delegate void BlendFunc(int sfactor, int dfactor); public static BlendFunc glBlendFunc { get; private set; } @@ -422,6 +425,7 @@ namespace OpenRA.Platforms.Default glEnable = Bind("glEnable"); glDisable = Bind("glDisable"); glBlendEquation = Bind("glBlendEquation"); + glBlendEquationSeparate = Bind("glBlendEquationSeparate"); glBlendFunc = Bind("glBlendFunc"); glDepthFunc = Bind("glDepthFunc"); glScissor = Bind("glScissor"); diff --git a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs index 74e8a193e9..c99fedf384 100644 --- a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs +++ b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs @@ -241,7 +241,7 @@ namespace OpenRA.Platforms.Default if (mode == BlendMode.Subtractive) { OpenGL.CheckGLError(); - OpenGL.glBlendEquation(OpenGL.GL_FUNC_REVERSE_SUBTRACT); + OpenGL.glBlendEquationSeparate(OpenGL.GL_FUNC_REVERSE_SUBTRACT, OpenGL.GL_FUNC_ADD); } break;