This topic is 4273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I calculated my fps like this:
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;
    }  

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.

Share this post


Link to post
Share on other sites

This topic is 4273 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this