Add three additional blending modes.
This commit is contained in:
committed by
reaperrr
parent
1e64048956
commit
8b7e72b95e
@@ -32,7 +32,10 @@ namespace OpenRA
|
|||||||
Subtractive,
|
Subtractive,
|
||||||
Multiply,
|
Multiply,
|
||||||
Multiplicative,
|
Multiplicative,
|
||||||
DoubleMultiplicative
|
DoubleMultiplicative,
|
||||||
|
LowAdditive,
|
||||||
|
Screen,
|
||||||
|
Translucent
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IPlatformWindow : IDisposable
|
public interface IPlatformWindow : IDisposable
|
||||||
|
|||||||
@@ -226,6 +226,21 @@ namespace OpenRA.Platforms.Default
|
|||||||
OpenGL.CheckGLError();
|
OpenGL.CheckGLError();
|
||||||
OpenGL.glBlendFunc(OpenGL.GL_DST_COLOR, OpenGL.GL_SRC_COLOR);
|
OpenGL.glBlendFunc(OpenGL.GL_DST_COLOR, OpenGL.GL_SRC_COLOR);
|
||||||
break;
|
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();
|
OpenGL.CheckGLError();
|
||||||
|
|||||||
Reference in New Issue
Block a user