Functions | |
void | glutInit (int *argcp, char **argv) |
Initialize the ps2glut library, also the ps2gl library and gs memory if not already initialized by the app. | |
void | glutDisplayFunc (void(*func)(void)) |
Set the display function callback. | |
void | glutReshapeFunc (void(*func)(int width, int height)) |
Set the reshape function callback. | |
void | glutKeyboardFunc (void(*func)(unsigned char key, int x, int y)) |
Set the keyboard function callback. | |
void | glutVisibilityFunc (void(*func)(int state)) |
Set the visibility function callback. | |
void | glutIdleFunc (void(*func)(void)) |
Set the idle function callback. | |
void | glutSpecialFunc (void(*func)(int key, int x, int y)) |
Set the special function callback. | |
void | glutMainLoop (void) |
Enter the main loop. |
In general it does three things: initializes the ps2gl library, provides minimal pad support through the "keyboard" and "special" callback functions, and does a simple double-buffered display loop.
ps2glut was written to help test ps2gl against the many existing glut samples/demos, but might be helpful in writing quick prototypes. Please note that it is not intended for game development.
ps2glut will also do some rough timing of the callback functions (using timer0). Press the 'start' button to display the timings on stdout.
|
Set the display function callback. The callback will be called once per frame. Definition at line 125 of file ps2glut.cpp. |
|
Set the idle function callback. The callback will be called once per frame, after the display callback. Definition at line 164 of file ps2glut.cpp. |
|
Initialize the ps2glut library, also the ps2gl library and gs memory if not already initialized by the app.
Definition at line 84 of file ps2glut.cpp. |
|
Set the keyboard function callback. The square, triangle, circle, and x buttons are mapped to the numbers 4, 8, 6, and 2, respectively. The callback is called once per frame while for each button that is held down. Definition at line 145 of file ps2glut.cpp. |
|
Enter the main loop. Since this is the ps2 and not a pc, this function will not return. Definition at line 183 of file ps2glut.cpp. |
|
Set the reshape function callback. This will be called once before entering the main loop. (At the moment ps2glut is fixed to set up a full-screen display -- 640x448, interlaced.) Definition at line 135 of file ps2glut.cpp. |
|
Set the special function callback. The left dpad buttons will be mapped to the arrow keys (GLUT_KEY_UP/DOWN/LEFT/RIGHT) and called intermittently, similar to a pc keyboard. Definition at line 174 of file ps2glut.cpp. |
|
Set the visibility function callback. The callback will be called once before the main loop with the argument 'GLUT_VISIBLE.' For compatibility. Definition at line 155 of file ps2glut.cpp. |