Original Post
I calculated my fps like this: Then I printed the printedFrames. But for some weird reason, I got the same framerate (60) when I drew my whole map, and when I drew nothing at all? Thanks.
static Timer t;
static float framesPerSecond = 0.0f;
static float lastTime = 0.0f;
static float currentTime = t.getTime();
static float printedFrames = 0.0f;
// Increase the frame counter
++framesPerSecond;
if( currentTime - lastTime > 1.0f )
{
// Here we set the lastTime to the currentTime.
//This will be used as the starting point for the next second.
lastTime = currentTime;
// Reset the frames per second
printedFrames = framesPerSecond;
framesPerSecond = 0;
}