Skip to content

Commit

Permalink
Fix wireframe quality after rendering rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
ousnius committed Oct 8, 2016
1 parent 67f6533 commit aa311e8
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/render/GLSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -740,16 +740,15 @@ void GLSurface::RenderMesh(mesh* m) {
}

// Offset triangles so that points can be visible
if (m->bShowPoints) {
glEnable(GL_POLYGON_OFFSET_FILL);
glEnable(GL_POLYGON_OFFSET_FILL);
if (m->bShowPoints)
glPolygonOffset(4.0f, 4.0f);
}
else
glPolygonOffset(0.03f, 0.03f);

// Render mesh
glDrawElements(GL_TRIANGLES, m->nTris * 3, GL_UNSIGNED_SHORT, (GLvoid*)0);

if (m->bShowPoints)
glDisable(GL_POLYGON_OFFSET_FILL);
glDisable(GL_POLYGON_OFFSET_FILL);

// Render wireframe
if (bWireframe && m->rendermode == RenderMode::Normal) {
Expand Down

0 comments on commit aa311e8

Please sign in to comment.