The GameLoop controls the overall program flow.
The Singleton GameLoop provides events for the running application, including the main loop for scene updates and rendering as well as time- and framebased events for registered handlers. Furthermore it supports pausing and unpausing of the simulation.
start(TeetairApplication* application)
lock()
unlock()
pause()
unpause()
registerForTimedEvents(std::function<void()>& eventHandler, double stepsize)
eventHandler
: The event handler.stepsize
: The stepsize in seconds.unregisterFromTimedEvents(std::function<void()>& eventHandler, double stepsize)
eventHandler
: The event handler that was previously registered.stepsize
: The stepsize in seconds with which the handler was previously registered.registerForFrameEvents(std::function<void()>& eventHandler)
eventHandler
: The event handler.unregisterFromFrameEvents(std::functionvoid()>& eventHandler)
eventHandler
: The event handler that was previously registered.getFrameStamp()