From e383b7fba8fbad23ac370ea5731a87b7eacdf6c8 Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 4 Feb 2019 20:41:50 +0000 Subject: [PATCH] Remove superfluous glPolygonOffset() call in GL3 renderer. This caused red fringes on mesh boundary with back faces turned on. --- src/render/rendergl3.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/render/rendergl3.cpp b/src/render/rendergl3.cpp index ced59862..c8e6cf36 100644 --- a/src/render/rendergl3.cpp +++ b/src/render/rendergl3.cpp @@ -635,8 +635,6 @@ void OpenGl3Renderer::NewFrame() { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glFrontFace(GL_CW); - - glPolygonOffset(2.0, 1.0); } void OpenGl3Renderer::FlushFrame() { @@ -888,14 +886,10 @@ public: } void Draw(OpenGl3Renderer *renderer) override { - glEnable(GL_POLYGON_OFFSET_FILL); glEnable(GL_CULL_FACE); - if(hasFillBack) DrawFace(renderer, GL_BACK, fillBack); DrawFace(renderer, GL_FRONT, fillFront); - - glDisable(GL_POLYGON_OFFSET_FILL); glDisable(GL_CULL_FACE); }