View Full Version : FPS Counting
Hey everyone, i am a total begginer in OpenGL. http://www.opengl.org/discussion_boards/ubb/smile.gif Is there a way i can view the fps? can someone tell me some basic code?
static unsigned long start_time = 0;
static unsigned long end_taken = 0;
static int FPS = 0;
start_time = GetTickCount();
// do your fancy code here
end_time = GetTickCount();
FPS = 1000/(end_time - start_time);
GetTickCount() works with resolution of 1/1000th second under win32. I think GetTickCount() is accurate to < 10ms on most win OS's.
[This message has been edited by dans (edited 05-03-2001).]
05-03-2001, 01:10 PM
Often you only need to search: three identical questions in 2 days!!
Here they are:
Powered by vBulletin® Version 4.2.2 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.