Functions | |
void | XY_start_frame (int fps) |
Mark the start of a frame. | |
int | XY_end_frame (XY_bool throttle) |
Mark the end of a frame. |
void XY_start_frame | ( | int | fps | ) |
Mark the start of a frame.
Screen backbuffer is wiped to the background color and/or bitmap. Also setting of preferred FPS.
fps | The requested FPS, if XY_end_frame()'s throttle option is used. |
int XY_end_frame | ( | XY_bool | throttle | ) |
Mark the end of a frame.
Screen backbuffer is made visible. Optionally, pause until (1000/fps) milliseconds have passed since XY_start_frame() was called. (If 'throttle' is set to XY_TRUE.)
throttle | causes XY_end_frame() to pause the application (by calling SDL_Delay()) so that the amount of time between the last XY_start_frame() call and now is approximately 1000/fps milliseconds, if set to XY_TRUE. Otherwise, pauses only 1ms, to relinquish control to the OS. |