+ if (t->tris[i].gone > 3) { continue; }
+ if (t->tris[i].gone > 0) {
+ glColor3f(t->color.x,t->color.y,t->color.z);
+ col[0] = 1.0f;
+ col[1] = 1.0f;
+ col[2] = 1.0f;
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, col);
+ col[0] *= 0.8;
+ col[1] *= 0.8;
+ col[2] *= 0.8;
+ glMaterialfv(GL_FRONT, GL_EMISSION,col);
+
+ pos = i*3;
+ glPushMatrix();
+ glTranslatef(t->tris[i].loc.x,t->tris[i].loc.y,t->tris[i].loc.z);
+ glBegin(wire ? GL_LINE_LOOP : GL_TRIANGLES);
+ glNormal3f(t->normals[i].x,t->normals[i].y,t->normals[i].z);
+ glVertex3f(spherev[pos+0].x,spherev[pos+0].y,spherev[pos+0].z);
+ glVertex3f(spherev[pos+1].x,spherev[pos+1].y,spherev[pos+1].z);
+ glVertex3f(spherev[pos+2].x,spherev[pos+2].y,spherev[pos+2].z);
+ polys++;
+ glEnd();
+ glPopMatrix();
+
+ glColor3f(t->color.x,t->color.y,t->color.z);
+ col[0] = t->color.x;
+ col[1] = t->color.y;
+ col[2] = t->color.z;
+ glMaterialfv(GL_FRONT, GL_DIFFUSE, col);
+ col[0] *= 0.3;
+ col[1] *= 0.3;
+ col[2] *= 0.3;
+ glMaterialfv(GL_FRONT, GL_EMISSION,col);
+
+ t->tris[i].gone++;
+ continue;
+ }
+