diff --git a/OpenRA.Game/Graphics/PlatformInterfaces.cs b/OpenRA.Game/Graphics/PlatformInterfaces.cs index c266b3ae7b..0a582dd636 100644 --- a/OpenRA.Game/Graphics/PlatformInterfaces.cs +++ b/OpenRA.Game/Graphics/PlatformInterfaces.cs @@ -32,7 +32,10 @@ namespace OpenRA Subtractive, Multiply, Multiplicative, - DoubleMultiplicative + DoubleMultiplicative, + LowAdditive, + Screen, + Translucent } public interface IPlatformWindow : IDisposable diff --git a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs index 5a5af71c77..03c3cb1914 100644 --- a/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs +++ b/OpenRA.Platforms.Default/Sdl2GraphicsContext.cs @@ -226,6 +226,21 @@ namespace OpenRA.Platforms.Default OpenGL.CheckGLError(); OpenGL.glBlendFunc(OpenGL.GL_DST_COLOR, OpenGL.GL_SRC_COLOR); break; + case BlendMode.LowAdditive: + OpenGL.glEnable(OpenGL.GL_BLEND); + OpenGL.CheckGLError(); + OpenGL.glBlendFunc(OpenGL.GL_DST_COLOR, OpenGL.GL_ONE); + break; + case BlendMode.Screen: + OpenGL.glEnable(OpenGL.GL_BLEND); + OpenGL.CheckGLError(); + OpenGL.glBlendFunc(OpenGL.GL_SRC_COLOR, OpenGL.GL_ONE_MINUS_SRC_COLOR); + break; + case BlendMode.Translucent: + OpenGL.glEnable(OpenGL.GL_BLEND); + OpenGL.CheckGLError(); + OpenGL.glBlendFunc(OpenGL.GL_DST_COLOR, OpenGL.GL_ONE_MINUS_DST_COLOR); + break; } OpenGL.CheckGLError();