From 28fa348859063a7705f1c70f8f5a088054f1078b Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 4 Feb 2019 20:25:45 +0000 Subject: [PATCH] Use correct polygon winding order in GL3 renderer. --- src/render/rendergl3.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/render/rendergl3.cpp b/src/render/rendergl3.cpp index 8e65aa64..ced59862 100644 --- a/src/render/rendergl3.cpp +++ b/src/render/rendergl3.cpp @@ -634,6 +634,8 @@ void OpenGl3Renderer::NewFrame() { glClearDepthf(1.0); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glFrontFace(GL_CW); + glPolygonOffset(2.0, 1.0); } @@ -890,8 +892,8 @@ public: glEnable(GL_CULL_FACE); if(hasFillBack) - DrawFace(renderer, GL_FRONT, fillBack); - DrawFace(renderer, GL_BACK, fillFront); + DrawFace(renderer, GL_BACK, fillBack); + DrawFace(renderer, GL_FRONT, fillFront); glDisable(GL_POLYGON_OFFSET_FILL); glDisable(GL_CULL_FACE);