Problem with FPS counting


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

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 ime.c). Of course, using the GLFW timer (glfwGetTime) is the simplest solution. It takes care of things like portability etc.

You also have to disable vsync if you haven’t already.