Пример #1
0
int main(int argc, char **argv) {
    graphicsSetup(argc, argv);
    glutDisplayFunc(drawScene);
    glutIdleFunc(animate);
    glutKeyboardFunc(handleKey);
    glutMainLoop();
    glutSwapBuffers();
}
Пример #2
0
int main(int argc, char **argv) {
    graphicsSetup(argc, argv);      // initialize the graphics system
    glutDisplayFunc(drawScene);     // tell GLUT what function draws the scene
    glutIdleFunc(animate);          // Move objects when animating
    glutKeyboardFunc(handleKey);    // set up the "q" key to quit
    glutMainLoop();                 // GLUT will control the action
    //glutSwapBuffers();              // double buffering control
}
Пример #3
0
int main(int argc, char **argv) {
    // initialize the drawing surface
    graphicsSetup(argc, argv);

    // register event handlers
    glutDisplayFunc(drawScene);
    glutIdleFunc(animate);
    glutKeyboardFunc(handleKey);

    // start the animation
    glutMainLoop();
}