added drawing of edges in wireframe if meshes has no faces

This commit is contained in:
Paolo Cignoni 2011-05-10 21:57:01 +00:00
parent 2eec2e0d55
commit 384ea891dc
1 changed files with 13 additions and 0 deletions

View File

@ -832,6 +832,19 @@ void DrawWire()
DrawFill<nm,cm,TMNone>();
glPopAttrib();
}
if(m->fn==0 && m->en>0)
{
glPushAttrib(GL_ENABLE_BIT);
glDisable(GL_LIGHTING);
glBegin(GL_LINES);
for(typename mesh_type::EdgeIterator ei=m->edge.begin();ei!=m->edge.end(); ++ei)
{
glVertex((*ei).V(0)->P());
glVertex((*ei).V(1)->P());
}
glEnd();
glPopAttrib();
}
// {
// if(!HasEdges()) ComputeEdges();