void build_object(Polygon3D *Object)
{
unsigned int i,j;
Face *face;
int *verts;
unsigned char a, b, c;
icVector3 up, ray;
theObject = glGenLists(1);
glNewList(theObject, GL_COMPILE);
for (i=0; i<Object->nfaces; i++) {
a = i >> 16;
b = (i & 0xFF00) >> 8;
c = i & 0xFF;
glColor3ub(255-a, 255-b, 255-c);
face = Object->flist[i];
verts = face->verts;
glBegin(GL_POLYGON);
for (j=0; j<face->nverts; j++) {
glVertex3d(Object->vlist[verts[j]]->x, Object->vlist[verts[j]]->y, Object->vlist[verts[j]]->z);
}
glEnd();
}
glEndList();
}