01/22/2001
15-462 Computer Graphics I
32
Step 2: Set Up
•Enable depth testing and double buffering
int main(int argc, char **argv)
{
    glutInit(&argc, argv);
    /* double buffering for smooth animation */
    glutInitDisplayMode
     (GLUT_DOUBLE | GLUT_DEPTH | GLUT_RGB);
    ...    /* window creation and callbacks here */
    glEnable(GL_DEPTH_TEST);
    glutMainLoop();
    return(0);
}