#include <cstdlib>
#include <config.h>
#include <GL/glut.h>
#include "Display.h"

Go to the source code of this file.
Functions | |
| void | display_init () | 
| Call the init() method of the Display instance.  | |
| void | display_quit () | 
| Call the quit() method of the Display instance.  | |
| void | display_draw () | 
| Call the draw() method of the Display instance.  | |
| void | display_reshape (int width, int height) | 
| Call the reshape() method of the Display instance.   | |
| void | display_inputKey (unsigned char key, int x, int y) | 
| Call the inputKey() method of the Display instance.   | |
| void | display_inputMouse (int button, int state, int x, int y) | 
| Call the inputMouse() method of the Display instance.   | |
| int | main (int argc, char *argv[]) | 
| The main function.   | |
Definition in file Main.cpp.
| void display_inputKey | ( | unsigned char | key, | |
| int | x, | |||
| int | y | |||
| ) | 
Call the inputKey() method of the Display instance.
| key | the key pressed | |
| x | the x mouse coordinate | |
| y | the y mouse coordinate | 
Definition at line 75 of file Main.cpp.
References Display::inputKey(), and Display::instance().
Referenced by main().
00075 { 00076 Display::instance()->inputKey(key, x, y); 00077 }


| void display_inputMouse | ( | int | button, | |
| int | state, | |||
| int | x, | |||
| int | y | |||
| ) | 
Call the inputMouse() method of the Display instance.
| button | the button pressed | |
| state | the state of the button (up or down) | |
| x | the x mouse coordinate | |
| y | the y mouse coordinate | 
Definition at line 87 of file Main.cpp.
References Display::inputMouse(), and Display::instance().
Referenced by main().
00087 { 00088 Display::instance()->inputMouse(button, state, x, y); 00089 }


| void display_reshape | ( | int | width, | |
| int | height | |||
| ) | 
Call the reshape() method of the Display instance.
| width | the new width of the window | |
| height | the new height of the window | 
Definition at line 64 of file Main.cpp.
References Display::instance(), and Display::reshape().
Referenced by main().
00064 { 00065 Display::instance()->reshape(width, height); 00066 }


| int main | ( | int | argc, | |
| char * | argv[] | |||
| ) | 
The main function.
| argc | the number of parameters | |
| argv | the parameters of the program | 
Definition at line 97 of file Main.cpp.
References display_draw(), display_init(), display_inputKey(), display_inputMouse(), display_quit(), and display_reshape().
00097 { 00098 int win; 00099 00100 glutInit(&argc, argv); 00101 glutInitDisplayMode(GLUT_DEPTH | GLUT_ACCUM | GLUT_RGBA | GLUT_DOUBLE); 00102 glutInitWindowSize(1024,768); 00103 glutInitWindowPosition(0, 0); 00104 win = glutCreateWindow(PACKAGE " " VERSION); 00105 glutDisplayFunc(display_draw); 00106 glutFullScreen(); 00107 glutReshapeFunc(display_reshape); 00108 glutKeyboardFunc(display_inputKey); 00109 glutMouseFunc(display_inputMouse); 00110 display_init(); 00111 atexit(display_quit); 00112 glutMainLoop(); 00113 00114 return 0; 00115 }

 1.5.4