added drawing of edges in wireframe if meshes has no faces
This commit is contained in:
parent
2eec2e0d55
commit
384ea891dc
|
@ -832,6 +832,19 @@ void DrawWire()
|
||||||
DrawFill<nm,cm,TMNone>();
|
DrawFill<nm,cm,TMNone>();
|
||||||
glPopAttrib();
|
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();
|
// if(!HasEdges()) ComputeEdges();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue