-
Problem with FPS counting
Hi,
I have Pentium 4 and Geforce2 Ti, but all the demos (even spining cube without texture) show no more than 100 FPS (in fullscreen mode even less), while Quake 3 sometimes show > 130 FPS.
In my counters I use GetTickCount(). Maybe problem is here?
Thanks in advance
-
Advanced Member
Frequent Contributor
Re: Problem with FPS counting
GetTickCount is your problem! It only has 10 ms resolution (on all computers I have tested). 1 / 10 ms = 100 Hz
You should use QueryPerformanceCounter or RDTSC instead. For a complete, abstract implementation of a timer, see the timer in GLFW (source distribution, lib\win32\time.c). Of course, using the GLFW timer (glfwGetTime) is the simplest solution. It takes care of things like portability etc.
-
Advanced Member
Frequent Contributor
Re: Problem with FPS counting
You also have to disable vsync if you haven't already.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules