Originally posted by TheGecko:
[b]And another thing.(And maybe I don’t understand this point)If you guys are telling me that the max frame rate I can get at 75Hz refresh rate is 75FPS when drawing NOTHING on screen in OGL,then what the hell did I spend $514 CAN on a GeForce2 for!?
And that brings me to another point.Howcome all the DX demo apps that come with the SDK run at reall high frame rates? (~200+fps)I’m going to go on a limb here and assume that the Microsoft counter code is correct [/b]
OK, I’ll try to explain this one…
Usually, how do we calculate our FPS ???
- We take current time t1.
- We render the scene.
- We call glFinish.
- We take current time t2.
- We call wglSwapBuffers.
- Go back to 1)
Then, one frame took t2-t1 to be drawn. So you can have 1/(t2-t1) frames per seconds (if t1 and t2 are in seconds of course ! Otherwise, simply convert them !).
Actually, you would probably average these rendering times over 10 frames rather than doing it for only 1 but that’s up to you…
Now, let’s try to explain why you can only reach 75FPS at 75Hz (or xxxFPS at xxxHz for that matter !).
If your VSYNC is ON (which means the wglSwapBuffers command will WAIT for the VBLANK signal to be issued before swapping the buffers !), your rendering will at least take ONE frame (over the 75 available if you run at 75Hz !). Another way to understand that is to say:
A) Say I am at stage 1) in my rendering and my monitor is on frame 1.
B) When I reach stage 5) (wglSwapBuffers), the monitor will go to frame 2 (because wglSwapBuffers will wait for that) ! Remember that this supposes that your rendering did not take you to frame 2 already !
C) When I arrive to stage 6) and go back to 1) for rendering again, I am, in the best case, on frame 2 !!!
What does it mean ??? One rendering loop=at least 1 frame for your monitor (cannot be less, but can be more !).
At 75Hz, you have 75 frames available so your max speed will be 75FPS !!!
Now, if VSYNC is OFF, wglSwapBuffers will NOT WAIT for the VBLANK signal so your app can reach 200FPS+ (like the DX8 demos you mention).
I hope this is clear… Don’t hesitate to “reply with quote” if some (all ? ) parts of this message are unclear…