01/22/2001
15-462 Computer Graphics I
37
Step 7: Drawing a Face
•Use vector form of primitives and attributes
void face(int a, int b, int c, int d)
{glBegin(GL_POLYGON);
    glColor3fv(colors[a]);
    glVertex3fv(vertices[a]);
    glColor3fv(colors[b]);
    glVertex3fv(vertices[b]);
    glColor3fv(colors[c]);
    glVertex3fv(vertices[c]);
    glColor3fv(colors[d]);
    glVertex3fv(vertices[d]);
  glEnd(); }