Advertisement

How can i program in my engine how many fps i run??

Started by January 29, 2000 07:25 AM
0 comments, last by SigwarthSoft 24 years, 8 months ago
The goal is: i want to see how many fps my engine can get on my pc...... Sig than in advance
Well, this really isn''t that hard at all. Basically, there are two ways of doing it.

You can either use a timer to keep up with each second and use a counter to keep track of each frame rendered in each second, or you can keep track of the amount of time that it takes to render each frame and just calculate how many frames per second that would be.

Now you just output it however you wish. Personlly, I just set a flag to toggle the display on or off.

If you need some more info on timers and your in Windows, use QueryPerformanceCounter() and QueryPerformanceFrequency(). You should look this up in the docs. (credit here goes to _dot_) You can also find some more information in the post "windows timers and other cheese."

This topic is closed to new replies.

Advertisement