|
Bubba-3D
0.9.0
Awesome game engine!
|
Public Member Functions | |
| Window (int width, int height, std::string title) | |
| void | initGL () |
| void | resize (unsigned int width, unsigned int height) |
| void | setResizeMethod (void(*resize)(int, int)) |
| void | start (unsigned int maxFPS) |
| sf::Window * | getWindow () |
| void | setIdleMethod (void(*idle)(float sinceStart, float sinceLastMethodCall)) |
| void | setDisplayMethod (void(*display)(float sinceStart, float sinceLastMethodCall)) |
| void Window::setDisplayMethod | ( | void(*)(float sinceStart, float sinceLastMethodCall) | display | ) |
The display function is called when a frame should render. Both parameters are time specified in seconds. The first parameter is the total time since the call to Renderer::start(int maxFPS). The second parameter is the time elapsed since the idle method call for the previous frame.
In this function Renderer::drawScene() should be called.
Definition at line 122 of file Window.cpp.
| void Window::setIdleMethod | ( | void(*)(float sinceStart, float sinceLastMethodCall) | idle | ) |
The idle function is called between each frame. Both parameters are time specified in seconds. The first parameter is the total time since the call to Renderer::start(int maxFPS). The second parameter is the time elapsed since the last idle method call.
This function should contain all the game logic.
Definition at line 126 of file Window.cpp.
1.8.11