diff options
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs index b6e97454..45106692 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs @@ -3,7 +3,7 @@ using System; namespace Ryujinx.Graphics.Gal.OpenGL { - public class OGLRasterizer : IGalRasterizer + class OGLRasterizer : IGalRasterizer { private int[] VertexBuffers; @@ -44,36 +44,29 @@ namespace Ryujinx.Graphics.Gal.OpenGL public void ClearBuffers( GalClearBufferFlags Flags, + int Attachment, float Red, float Green, float Blue, float Alpha, float Depth, int Stencil) { - ClearBufferMask Mask = ClearBufferMask.ColorBufferBit; - GL.ColorMask( Flags.HasFlag(GalClearBufferFlags.ColorRed), Flags.HasFlag(GalClearBufferFlags.ColorGreen), Flags.HasFlag(GalClearBufferFlags.ColorBlue), Flags.HasFlag(GalClearBufferFlags.ColorAlpha)); + GL.ClearBuffer(ClearBuffer.Color, Attachment, new float[] { Red, Green, Blue, Alpha }); + if (Flags.HasFlag(GalClearBufferFlags.Depth)) { - Mask |= ClearBufferMask.DepthBufferBit; + GL.ClearBuffer(ClearBuffer.Depth, 0, ref Depth); } if (Flags.HasFlag(GalClearBufferFlags.Stencil)) { - Mask |= ClearBufferMask.StencilBufferBit; + GL.ClearBuffer(ClearBuffer.Stencil, 0, ref Stencil); } - GL.ClearColor(Red, Green, Blue, Alpha); - - GL.ClearDepth(Depth); - - GL.ClearStencil(Stencil); - - GL.Clear(Mask); - GL.ColorMask(true, true, true, true); } |
