Game Development Reference
In-Depth Information
Figure 3.1 GLUT Example program.
glutKeyboardFunc(keyboard);
glutMouseFunc(mouse);
glutMotionFunc(motion);
init();
glutMainLoop();
}
The declarations for each of these functions, along with a description of
the use of the function, are outlined below:
void glutInitDisplayMode (unsigned int mode )
This specifies a display mode such as RGB or RGBA. The argument
'mode' is a bitwise Or-ed combination of the display colour depth,
whether single or double buffering and the additional buffers
required.
When animation is used it is best if the display is created off-screen
and then flipped to the foreground when all drawing is complete. This
technique is referred to as double buffering and eliminates the
Search Nedrilad ::




Custom Search