void CalculateFrameRate()
{
static float framesPerSecond = 0.0f; // This will store our fps
static float lastTime = 0.0f; // This will hold
If you have any kind of synchronization routine I suggest you place the call just after that, ie prior the big calculations. Otherwise the timing calculations can be shaky and give different values each loop...and a note, it's better to have a steady FPS than a fluctuating FPS just to maximize it. The fluctuation even so subtle makes the viewer/player aware that it's all a game and the immersion is lost.