// '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.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement