yet another fps question

Started by
3 comments, last by taliesin8 22 years, 2 months ago
I dont understand this. I juste made a timer class (somewhat based on the DXUtil_Timer function in dxutil.cpp file). It uses QueryPerformanceFrequency if it''s available, timeGetTime() if not. Anyway, I tested my timer function on my blank opengl framework (it does nothing but a color clear each frame). I got 71.9fps@640x480:16. (I tested it on nehe lesson1, and got the exact same result). Then, I ran multiple DXSDK samples (vertex shader, lighting, clipmirror, etc). With all of them, when I resized the window to 640x480, I got a fps count of over 160(with as much as 210fps). And I also realized that I used the same method to get the fps count as they did. So what the deal with that? D3D seems a least two times faster. Is there something I''m missing?
Advertisement
And youre sure you arent waiting for the screen to refresh before counting it as a frame? (It would give you 70 fps if you screen refreshed in 70hz)
;-)
In the OpenGL settings for your video drivers, there will be an option to enable or disable vsynch by default. Disable it.

You can also disable vsynch programmatically using the WGL_EXT_swap_control extension.
wow, thank you
I get over 350 fps now.

I disabled the vertical sync (I put it "off by default")

But let me ask this.
The main message loop is now updated 350 times per second, but is the monitor really updated 350 times per second as well?

I think it''s not. I dont think if it relevant, but my monitor can go as high as 72 HZ while using a 1600x1200 desktop (my current desktop resolution).
so, if I understand correctly, even if my application displays 350 fps, my window is only updated 72 times per second.

Also, with the vertical syns, what made the application wait?
Is it the SwapBuffer? It''s the only thing I can think of.

In real games, what fps count is really used? the with vsync one, or the without vsync ?

thank you for your time
You''re correct, SwapBuffers is where the driver waits for the vertical retrace.

And you''re correct again, with VSync off your application is refreshing 300+ times, but you''re not seeing most of those refreshes, your monitor is only showing you 70, or whatever the current refresh rate is.

------------
- outRider -

This topic is closed to new replies.

Advertisement