add 2 new blend modes: Multiplicative, DoubleMultiplicative
This commit is contained in:
@@ -44,7 +44,9 @@ namespace OpenRA
|
|||||||
SoftAdditive,
|
SoftAdditive,
|
||||||
Translucency25,
|
Translucency25,
|
||||||
Translucency50,
|
Translucency50,
|
||||||
Translucency75
|
Translucency75,
|
||||||
|
Multiplicative,
|
||||||
|
DoubleMultiplicative
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface IGraphicsDevice : IDisposable
|
public interface IGraphicsDevice : IDisposable
|
||||||
|
|||||||
@@ -267,6 +267,16 @@ namespace OpenRA.Renderer.Sdl2
|
|||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
GL.BlendColor(1f, 1f, 1f, 0.75f);
|
GL.BlendColor(1f, 1f, 1f, 0.75f);
|
||||||
break;
|
break;
|
||||||
|
case BlendMode.Multiplicative:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.Zero, BlendingFactorDest.SrcColor);
|
||||||
|
break;
|
||||||
|
case BlendMode.DoubleMultiplicative:
|
||||||
|
GL.Enable(EnableCap.Blend);
|
||||||
|
ErrorHandler.CheckGlError();
|
||||||
|
GL.BlendFunc(BlendingFactorSrc.DstColor, BlendingFactorDest.SrcColor);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
ErrorHandler.CheckGlError();
|
ErrorHandler.CheckGlError();
|
||||||
|
|||||||
Reference in New Issue
Block a user