GLUT Environment Summary This is an effort to abstract GLUT calls out of the main application code. The following handler functions must be defined externally: void visibility(int state) void reshape(int w, int h) void display() void idle() void mouse(int button, int state, int x, int y) void motion(int x, int y) void passive(int x, int y) void keydown(unsigned char key, int x, int y) void keyup(unsigned char key, int x, int y) void specialdown(int key, int x, int y) void specialup(int key, int x, int y) Defines LEFT_ARROW = 100 UP_ARROW = 101 RIGHT_ARROW = 102 DOWN_ARROW = 103 DOUBLE_RGBA_DEPTH = GLUT_DOUBLE | GLUT_RGBA | GLUT_DEPTH WinsysInit(x, y) = glutInit(x, y) InitDisplayMode(mode) = glutInitDisplayMode(mode) WarpPointer(x, y) = glutWarpPointer(x, y) SwapBuffers() = glutSwapBuffers() GetWindowWidth() = glutGet(GLUT_WINDOW_WIDTH) GetWindowHeight() = glutGet(GLUT_WINDOW_HEIGHT) HideCursor() = glutSetCursor(GLUT_CURSOR_NONE) ShowCursor() = glutSetCursor(GLUT_CURSOR_INHERIT) KeyRepeatOn() = glutSetKeyRepeat(GLUT_KEY_REPEAT_ON) KeyRepeatOff() = glutSetKeyRepeat(GLUT_KEY_REPEAT_OFF) MainLoop() = glutMainLoop() EnterGameMode() = glutEnterGameMode() LeaveGameMode() = glutLeaveGameMode() Functions void non_display() Don't display anything. void SetHandlers() Set all callback handlers to default functions. void Pause() Nullify most callback handlers and set the display callback to non_display(). void Unpause() Set all callback handlers to default functions--SetHandlers().