Question on the FPS

Hello

I was asking myself a question for sometime but couldn’t find the answer. My maximum repaint speed is around 60 fps so if I can’t go higher than that, why many demos that show the fps tells me I get like 300 fps or something like that? My monitor is at 60 Hz I think so there is no way I could get to 300 fps. ???

When, they calculate the fps does they calculate the time between 2 repaint or the time that it takes to draw all the graphics and image???

The FPS is (usually) how fast the game spits out frames to the graphics card.
How often the screen updates is a separate metric (usually called “refresh rate”?). You can synchronize these two by applying a technique called “vsynch”, which basically waits for a vertical synch signal from the monitor before sending new image data to the graphics card.

If the fps is higher than the refresh rate, the screen will update part way through a screen refresh. This is usually referred to as “tearing”.
If the fps is lower than the refresh rate, and vsynch is enabled, you will lower the fps to at most refresh rate/2.

…except when you use more than 2 buffers.

Nope.

[edit:]
Except it does. See below.

???
Say, you have 3 buffers and you need 21ms to render each, but you’re vsync’ed to 20ms.
The 1st buffer is displayed after 40ms, the 2nd 20ms later, the 3rd 20ms later again.
That’s 3 frames in 80ms instead of 3 frames in 120ms.

My understanding is that with triple buffering, you don’t always have to wait for each vsync to write a buffer.
So where’s my misunderstanding?

You are right. Also it smoothes out variable rendering times. So in best case, you will get a constant frame rate even when some frames rendering takes more time to complete than others.

Ack, sorry, I read that as “when you use two buffers”!

Thx for the answer