aboutsummaryrefslogtreecommitdiff
path: root/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
diff options
context:
space:
mode:
authorgdkchan <gab.dark.100@gmail.com>2018-10-17 18:02:23 -0300
committerGitHub <noreply@github.com>2018-10-17 18:02:23 -0300
commit0e1e094b7a8f0134831fc4cebdb0841b9c10fe6a (patch)
tree81ba6446851a033f27adeafbfb94751032108047 /Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
parent02a8e7fc9369d7882db08a69d108beefb0f98677 (diff)
Improve texture tables (#457)
* Improve texture tables * More renaming and other tweaks * Minor tweaks
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs')
-rw-r--r--Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs26
1 files changed, 8 insertions, 18 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
index 7b435c45..cefbb2d2 100644
--- a/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
+++ b/Ryujinx.Graphics/Gal/OpenGL/OGLRasterizer.cs
@@ -5,8 +5,6 @@ namespace Ryujinx.Graphics.Gal.OpenGL
{
class OGLRasterizer : IGalRasterizer
{
- public bool DepthWriteEnabled { set; private get; }
-
private int[] VertexBuffers;
private OGLCachedResource<int> VboCache;
@@ -30,8 +28,6 @@ namespace Ryujinx.Graphics.Gal.OpenGL
IboCache = new OGLCachedResource<int>(GL.DeleteBuffer);
IndexBuffer = new IbInfo();
-
- DepthWriteEnabled = true;
}
public void LockCaches()
@@ -49,17 +45,15 @@ namespace Ryujinx.Graphics.Gal.OpenGL
public void ClearBuffers(
GalClearBufferFlags Flags,
int Attachment,
- float Red, float Green, float Blue, float Alpha,
+ float Red,
+ float Green,
+ float Blue,
+ float Alpha,
float Depth,
int Stencil)
{
- //OpenGL needs glDepthMask to be enabled to clear it
- if (!DepthWriteEnabled)
- {
- GL.DepthMask(true);
- }
-
GL.ColorMask(
+ Attachment,
Flags.HasFlag(GalClearBufferFlags.ColorRed),
Flags.HasFlag(GalClearBufferFlags.ColorGreen),
Flags.HasFlag(GalClearBufferFlags.ColorBlue),
@@ -67,6 +61,9 @@ namespace Ryujinx.Graphics.Gal.OpenGL
GL.ClearBuffer(ClearBuffer.Color, Attachment, new float[] { Red, Green, Blue, Alpha });
+ GL.ColorMask(Attachment, true, true, true, true);
+ GL.DepthMask(true);
+
if (Flags.HasFlag(GalClearBufferFlags.Depth))
{
GL.ClearBuffer(ClearBuffer.Depth, 0, ref Depth);
@@ -76,13 +73,6 @@ namespace Ryujinx.Graphics.Gal.OpenGL
{
GL.ClearBuffer(ClearBuffer.Stencil, 0, ref Stencil);
}
-
- GL.ColorMask(true, true, true, true);
-
- if (!DepthWriteEnabled)
- {
- GL.DepthMask(false);
- }
}
public bool IsVboCached(long Key, long DataSize)