   Polygon tesselation - How to draw the edges? (not filling)
  HiDoes anybody know how to draw the lines, connected between each pair of vertexes after the tesselation of a polygon?Right now my code is just filling the polygon with a color (see below).Is it possible to draw the edges in a different color?I've tried with "glPolygonMode(GL_FRONT, GL_LINES);" but it didn't work.Code:GLvoid __stdcall combinee(GLdouble c[3], void *d[4], GLfloat w[4], void **out) { GLdouble *nv = new GLdouble[3]; nv[0] = c[0]; nv[1] = c[1]; nv[2] = c[2]; *out = nv;}// The tesselationGLUtesselator *tess = gluNewTess(); gluTessCallback(tess, GLU_TESS_BEGIN, (GLvoid (__stdcall *) ()) glBegin); gluTessCallback(tess, GLU_TESS_VERTEX, (GLvoid (__stdcall *) ()) glVertex3dv); gluTessCallback(tess, GLU_TESS_END, (GLvoid (__stdcall *) ()) glEnd); gluTessCallback(tess, GLU_TESS_COMBINE, (GLvoid (__stdcall *) ()) vertexCombine); gluTessBeginPolygon(tess,NULL);  gluTessBeginContour(tess);   for(int i=0; i<v.size(); i++) {    GLdouble *vertex = new GLdouble[3];    vertex[0] = v.x();    vertex[1] = v.y();    vertex[2] = 0;    gluTessVertex(tess, vertex, vertex);   }  gluTessEndContour(tess); gluTessEndPolygon(tess); gluDeleteTess(tess);
glPolygonMode(GL_FRONT, GL_LINE); should have done it, thats how I do it. Try glPolygonMode(GL_BACK, GL_LINE); to see if you're drawing faces in the wrong direction.   ;Quote:Original post by AtorI've tried with "glPolygonMode(GL_FRONT, GL_LINES);" but it didn't work.Try: glPolygonMode(GL_FRONT, GL_LINE);   ;  HeheYes, the solution was to have "GL_LINE" and not "GL_LINES" ;) :)How do I remove the interier lines? I only want the borders to be drawn.Thanks!   ;  do you mean that you just want to draw the silhouette?   ;Quote:Original post by AtorHow do I remove the interier lines? I only want the borders to be drawn.With edge flags.  gluTessCallback can accept GLU_TESS_EDGE_FLAG and GLU_TESS_EDGE_FLAG_DATA enums as it's which parameter.   ;  How should these enums be implemented?   ;Quote:Original post by AtorHow should these enums be implemented?I don't know, I've never used the GLU tesselator before.It looks like you can also use gluTessProperty with which set to GLU_TESS_BOUNDARY_ONLY instead of setting edge flags.   ;  Yes, "gluTessProperty(tess, GLU_TESS_BOUNDARY_ONLY, GL_TRUE);" worked.Thanks   