diff options
Diffstat (limited to 'Ryujinx.Graphics.OpenGL/Pipeline.cs')
-rw-r--r-- | Ryujinx.Graphics.OpenGL/Pipeline.cs | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/Ryujinx.Graphics.OpenGL/Pipeline.cs b/Ryujinx.Graphics.OpenGL/Pipeline.cs index e32b5b85..eec2b643 100644 --- a/Ryujinx.Graphics.OpenGL/Pipeline.cs +++ b/Ryujinx.Graphics.OpenGL/Pipeline.cs @@ -35,6 +35,8 @@ namespace Ryujinx.Graphics.OpenGL private bool _scissor0Enable = false; + ColorF _blendConstant = new ColorF(0, 0, 0, 0); + internal Pipeline() { _rasterizerDiscard = false; @@ -478,11 +480,6 @@ namespace Ryujinx.Graphics.OpenGL } } - public void SetBlendColor(ColorF color) - { - GL.BlendColor(color.Red, color.Green, color.Blue, color.Alpha); - } - public void SetBlendState(int index, BlendDescriptor blend) { if (!blend.Enable) @@ -504,6 +501,17 @@ namespace Ryujinx.Graphics.OpenGL (BlendingFactorSrc)blend.AlphaSrcFactor.Convert(), (BlendingFactorDest)blend.AlphaDstFactor.Convert()); + if (_blendConstant != blend.BlendConstant) + { + _blendConstant = blend.BlendConstant; + + GL.BlendColor( + blend.BlendConstant.Red, + blend.BlendConstant.Green, + blend.BlendConstant.Blue, + blend.BlendConstant.Alpha); + } + GL.Enable(IndexedEnableCap.Blend, index); } |