From 384ea891dc1deb221803443dd159980355d8469a Mon Sep 17 00:00:00 2001 From: cignoni Date: Tue, 10 May 2011 21:57:01 +0000 Subject: [PATCH] added drawing of edges in wireframe if meshes has no faces --- wrap/gl/trimesh.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/wrap/gl/trimesh.h b/wrap/gl/trimesh.h index d8910852..185c6d8d 100644 --- a/wrap/gl/trimesh.h +++ b/wrap/gl/trimesh.h @@ -832,6 +832,19 @@ void DrawWire() DrawFill(); 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();