why triple buffer?

2562953b4e8e2602a8bfc24b1123a341
0
EvilSmile 101 Oct 20, 2003 at 04:16

Hey folks,

I know why we have double buffering. The other day, I was talking to one of my pals and we couldn’t come to a conclusion about why we need triple buffers.

Could someone shed some light on this…

Thanks

S_ES

3 Replies

Please log in or register to post a reply.

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Oct 20, 2003 at 08:32

if you have vsync enabled, doublebuffering stalls when you do the swap, taking away cpu and gpu cycles to wait till you can swap the image to screen.

you don’t have this with trible buffering (well, you still have, but only for a minimal time).

so you’re not limited to 60fps or similar like before when using vsync. the screen will still display only 60fps. but that way, you can get 100% cpu power back again. wich can be important.

2562953b4e8e2602a8bfc24b1123a341
0
EvilSmile 101 Oct 20, 2003 at 12:16

@davepermen

if you have vsync enabled, doublebuffering stalls when you do the swap, taking away cpu and gpu cycles to wait till you can swap the image to screen.

you don’t have this with trible buffering (well, you still have, but only for a minimal time).

so you’re not limited to 60fps or similar like before when using vsync. the screen will still display only 60fps. but that way, you can get 100% cpu power back again. wich can be important.

Could you elaborate upon that.
i.e, is it constantly drawing by alternating between the two backbuffers or is it drawing in the two backbuffers and waitign for the drawing to finish to start drawing again….
(or is it something completely different?)

6ad5f8c742f1e8ec61000e2b0900fc76
0
davepermen 101 Oct 20, 2003 at 13:41

on swapbuffers it normally waits for vsync (if enabled). now it doesn’t, and at vsync it copies to a third buffer, wich is the primary buffer..

that way you don’t get the stall