Remove superfluous glPolygonOffset() call in GL3 renderer.

This caused red fringes on mesh boundary with back faces turned on.
pull/380/head
whitequark 2019-02-04 20:41:50 +00:00
parent 28fa348859
commit e383b7fba8
1 changed files with 0 additions and 6 deletions

View File

@ -635,8 +635,6 @@ void OpenGl3Renderer::NewFrame() {
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glFrontFace(GL_CW); glFrontFace(GL_CW);
glPolygonOffset(2.0, 1.0);
} }
void OpenGl3Renderer::FlushFrame() { void OpenGl3Renderer::FlushFrame() {
@ -888,14 +886,10 @@ public:
} }
void Draw(OpenGl3Renderer *renderer) override { void Draw(OpenGl3Renderer *renderer) override {
glEnable(GL_POLYGON_OFFSET_FILL);
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
if(hasFillBack) if(hasFillBack)
DrawFace(renderer, GL_BACK, fillBack); DrawFace(renderer, GL_BACK, fillBack);
DrawFace(renderer, GL_FRONT, fillFront); DrawFace(renderer, GL_FRONT, fillFront);
glDisable(GL_POLYGON_OFFSET_FILL);
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);
} }