diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-09-19 22:02:11 -0300 |
|---|---|---|
| committer | gdkchan <gab.dark.100@gmail.com> | 2018-09-19 22:02:11 -0300 |
| commit | 47a62e826fe15fce9b7e33f5aa8a04807fe3d172 (patch) | |
| tree | 704de1a40446d8198de34fc93c7fd162642407fa /Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs | |
| parent | bed13f2022e3b81d694e51e1c29ee66f4a18f5f9 (diff) | |
Implement DepthWriteMask and add R16G16 (#425)
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs index cf856a15..20e92ff2 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs @@ -85,6 +85,7 @@ namespace Ryujinx.Graphics.Gal.OpenGL CullFace = GalCullFace.Back, DepthTestEnabled = false, + DepthWriteEnabled = true, DepthFunc = GalComparisonOp.Less, StencilTestEnabled = false, @@ -138,19 +139,19 @@ namespace Ryujinx.Graphics.Gal.OpenGL //Note: Uncomment SetFrontFace and SetCullFace when flipping issues are solved - //if (New.FrontFace != O.FrontFace) + //if (New.FrontFace != Old.FrontFace) //{ // GL.FrontFace(OGLEnumConverter.GetFrontFace(New.FrontFace)); //} - //if (New.CullFaceEnabled != O.CullFaceEnabled) + //if (New.CullFaceEnabled != Old.CullFaceEnabled) //{ // Enable(EnableCap.CullFace, New.CullFaceEnabled); //} //if (New.CullFaceEnabled) //{ - // if (New.CullFace != O.CullFace) + // if (New.CullFace != Old.CullFace) // { // GL.CullFace(OGLEnumConverter.GetCullFace(New.CullFace)); // } @@ -161,6 +162,13 @@ namespace Ryujinx.Graphics.Gal.OpenGL Enable(EnableCap.DepthTest, New.DepthTestEnabled); } + if (New.DepthWriteEnabled != Old.DepthWriteEnabled) + { + Rasterizer.DepthWriteEnabled = New.DepthWriteEnabled; + + GL.DepthMask(New.DepthWriteEnabled); + } + if (New.DepthTestEnabled) { if (New.DepthFunc != Old.DepthFunc) |
