diff options
| author | gdkchan <gab.dark.100@gmail.com> | 2019-02-15 00:23:14 -0300 |
|---|---|---|
| committer | jduncanator <1518948+jduncanator@users.noreply.github.com> | 2019-02-15 14:23:14 +1100 |
| commit | 9cbcbaa90c2af78873d145850e0676b19b2ae79e (patch) | |
| tree | f1280ddc743d86c93c0000ffb82841a03e8aeda2 /Ryujinx.Graphics/Gal/OpenGL | |
| parent | b126ea48c63a3de8da8f3b817860c0323f2621ef (diff) | |
Fix XMAD shader instruction, gl_FrontFacing and enable face culling (#583)
* Fix XMAD shader instruction implementation
* Fix gl_FrontFacing constant value
* Enable face culling again
* Fix typo
Diffstat (limited to 'Ryujinx.Graphics/Gal/OpenGL')
| -rw-r--r-- | Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs | 36 |
1 files changed, 17 insertions, 19 deletions
diff --git a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs index deccd890..6a928603 100644 --- a/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs +++ b/Ryujinx.Graphics/Gal/OpenGL/OGLPipeline.cs @@ -159,25 +159,23 @@ namespace Ryujinx.Graphics.Gal.OpenGL Shader.SetExtraData(New.FlipX, New.FlipY, New.Instance); } - //Note: Uncomment SetFrontFace and SetCullFace when flipping issues are solved - - //if (New.FrontFace != Old.FrontFace) - //{ - // GL.FrontFace(OGLEnumConverter.GetFrontFace(New.FrontFace)); - //} - - //if (New.CullFaceEnabled != Old.CullFaceEnabled) - //{ - // Enable(EnableCap.CullFace, New.CullFaceEnabled); - //} - - //if (New.CullFaceEnabled) - //{ - // if (New.CullFace != Old.CullFace) - // { - // GL.CullFace(OGLEnumConverter.GetCullFace(New.CullFace)); - // } - //} + if (New.FrontFace != Old.FrontFace) + { + GL.FrontFace(OGLEnumConverter.GetFrontFace(New.FrontFace)); + } + + if (New.CullFaceEnabled != Old.CullFaceEnabled) + { + Enable(EnableCap.CullFace, New.CullFaceEnabled); + } + + if (New.CullFaceEnabled) + { + if (New.CullFace != Old.CullFace) + { + GL.CullFace(OGLEnumConverter.GetCullFace(New.CullFace)); + } + } if (New.DepthTestEnabled != Old.DepthTestEnabled) { |
