Sign in to follow this  
Outtey

Frames per Second display

Recommended Posts

I'm new to DirectX so please bear with me. I'm working on a simple program and I need to display the FPS. What's the easiest way to do this? Does DirectX have a built-in timer?

Share this post


Link to post
Share on other sites
Unfortunately, DirectX doesn't have a built-in timer. You'll have to calculate fps yourself. There are a lot of discussions about just how to do that here on gamedev. Search for "frames per second" in the search box in the upper right-hand corner of this gamedev screen and take a look at the discussions.

Share this post


Link to post
Share on other sites
I really do not recommend using WINAPI stil...

Is really easy to make your own timer, just get the actual tima minus the last time, that's your time differential between (dt) frames, as Buckeye says, there is
a lot of way to do it, you can add your dt every frame until you pass one second, then you can count how many frames your application can render on one second.

Is cheaper than use FRAPS (wich will slow down your app about 2-3 fps).

Share this post


Link to post
Share on other sites

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