Oops, was calling glBegin() once for each triangle when showing

mesh!

[git-p4: depot-paths = "//depot/solvespace/": change = 1807]
solver
Jonathan Westhues 2008-06-23 00:48:19 -08:00
parent bc5b43de85
commit 2ff309590e
1 changed files with 8 additions and 8 deletions

View File

@ -312,20 +312,20 @@ void glxDebugMesh(SMesh *m)
glPointSize(7); glPointSize(7);
glxDepthRangeOffset(1); glxDepthRangeOffset(1);
glxUnlockColor(); glxUnlockColor();
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE);
glxColor4d(0, 1, 0, 1.0);
glBegin(GL_TRIANGLES);
for(i = 0; i < m->l.n; i++) { for(i = 0; i < m->l.n; i++) {
STriangle *t = &(m->l.elem[i]); STriangle *t = &(m->l.elem[i]);
if(t->tag) continue; if(t->tag) continue;
glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); glxVertex3v(t->a);
glxColor4d(0, 1, 0, 1.0); glxVertex3v(t->b);
glBegin(GL_TRIANGLES); glxVertex3v(t->c);
glxVertex3v(t->a);
glxVertex3v(t->b);
glxVertex3v(t->c);
glEnd();
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
} }
glEnd();
glxDepthRangeOffset(0); glxDepthRangeOffset(0);
glPolygonMode(GL_FRONT_AND_BACK, GL_FILL);
} }
void glxMarkPolygonNormal(SPolygon *p) void glxMarkPolygonNormal(SPolygon *p)