- gluTessBeginPolygon (tobj, 0);
- gluTessBeginContour (tobj);
- for (j = 0; j < f->npoints; j++)
- {
- point *pp = &p->points[f->points[j]];
- gluTessVertex (tobj, &pp->x, &pp->x);
+# ifdef HAVE_TESS
+ gluTessBeginPolygon (tobj, 0);
+ gluTessBeginContour (tobj);
+ for (j = 0; j < f->npoints; j++)
+ {
+ point *pp = &p->points[f->points[j]];
+ gluTessVertex (tobj, &pp->x, &pp->x);
+ }
+ gluTessEndContour (tobj);
+ gluTessEndPolygon (tobj);
+# else /* !HAVE_TESS */
+ glBegin (wire ? GL_LINE_LOOP :
+ f->npoints == 3 ? GL_TRIANGLES :
+ f->npoints == 4 ? GL_QUADS :
+ GL_POLYGON);
+ for (j = 0; j < f->npoints; j++)
+ {
+ point *pp = &p->points[f->points[j]];
+ glVertex3f (pp->x, pp->y, pp->z);
+ }
+ glEnd();
+# endif /* !HAVE_TESS */