// 'tps' is set using 'QueryPerformanceFrequency(&tps);'
QueryPerformanceCounter(&ct);
fps = (float)tps.QuadPart / (float)(ct.QuadPart - lt.QuadPart);
QueryPerformanceCounter(& lt);
--Lasse Hassing
"...be a slave in heaven or a star in hell..."
Edited by - lazer_hassing on June 23, 2001 6:35:29 AM
Frames per Second
Just a small question:
Could I get the current FPS of my game by doing this in the main loop?
You might want to change it to
otherwise, yep.
QueryPerformanceCounter(&ct);fps = (float)tps.QuadPart / (float)(ct.QuadPart - lt.QuadPart);lt = ct;
otherwise, yep.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement