PDA

View Full Version : Can I measure th refresh rate?



04-28-2001, 06:07 AM
Can I measure th refresh rate?
I have to measure the refrash rate of my program for see the performance?
How can I do?

Humus
04-28-2001, 06:27 AM
Do you mean refreshrate or fps?
Refreshrate is easy to get from windows with EnumDisplaySettings, at least in Win2k.
Fps can be easily determined with the help of QueryPerformanceCounter & QueryPerformanceFrequency.

Tim Stirling
04-29-2001, 12:12 AM
An even simpler way to calculate FPS if it is for a quick personal reference is to add a counter say int frames and in your draw function increment it by one frames++ and print this number to the screen. Run your program using a stop watch and FPS = frames /time in seconds.

04-29-2001, 02:56 AM
Originally posted by Tim Stirling:
An even simpler way to calculate FPS if it is for a quick personal reference is to add a counter say int frames and in your draw function increment it by one frames++ and print this number to the screen. Run your program using a stop watch and FPS = frames /time in seconds.


There is a GLUT function that do this ?