Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 3 of 3

Thread: Problem with FPS counting

  1. #1
    Guest

    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

  2. #2
    Advanced Member Frequent Contributor marcus256's Avatar
    Join Date
    Aug 2001
    Location
    Sweden
    Posts
    853

    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.

  3. #3
    Advanced Member Frequent Contributor
    Join Date
    Sep 2000
    Location
    SWEDEN
    Posts
    718

    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
  •