Use correct polygon winding order in GL3 renderer.

pull/380/head
whitequark 2019-02-04 20:25:45 +00:00
parent 1012373818
commit 28fa348859
1 changed files with 4 additions and 2 deletions

View File

@ -634,6 +634,8 @@ void OpenGl3Renderer::NewFrame() {
glClearDepthf(1.0); glClearDepthf(1.0);
glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
glFrontFace(GL_CW);
glPolygonOffset(2.0, 1.0); glPolygonOffset(2.0, 1.0);
} }
@ -890,8 +892,8 @@ public:
glEnable(GL_CULL_FACE); glEnable(GL_CULL_FACE);
if(hasFillBack) if(hasFillBack)
DrawFace(renderer, GL_FRONT, fillBack); DrawFace(renderer, GL_BACK, fillBack);
DrawFace(renderer, GL_BACK, fillFront); DrawFace(renderer, GL_FRONT, fillFront);
glDisable(GL_POLYGON_OFFSET_FILL); glDisable(GL_POLYGON_OFFSET_FILL);
glDisable(GL_CULL_FACE); glDisable(GL_CULL_FACE);