Use correct polygon winding order in GL3 renderer.
parent
1012373818
commit
28fa348859
|
@ -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);
|
||||||
|
|
Loading…
Reference in New Issue