NewFrameStarted

static float NewFrameStarted();

Tells OpenLayer that a new game frame has started.

You should call this function in the beginning of the game loop if you wish to use the speed regulation. This function now returns the delta time just like GetDeltaTime.

Examples

while( gameRunning ) {
  // Tell OpenLayer that a new game frame has started. //
  FpsCounter::NewFrameStarted();
  
  // Other game loop code //
}


Other functions of the class FpsCounter
Start
Starts the FPS counter
NewFrameStarted
Tells OpenLayer that a new game frame has started
GetDeltaTime
Get the elapsed game time between this and the previous frame
GetFps
Returns the frames per second the program runs at
Pause
Pauses the FPS counter
Resume
Resumes the paused FPS counter


Questions about NewFrameStarted? Click here.