page-flipping

Triple Page Flip Buffer - Is It Possible?


I have just discovered what a double buffer is and I completely understand how they work and why they are used (thank god for Wikipedia!)

I also understand that a triple buffer is used for smooth animation of graphics.

But, page flipping (also apparently known as Ping Pong Buffering) is also apparently faster and eliminates tearing of the graphics.

So my questions are thus:

  1. Is it possible to make the best of both worlds and have a triple page flip buffer? So then the animation is not only smooth but tear-free.
  2. Would it be worth going to the hassle of creating this triple page flip buffer? For example, would it make the animation faster or just put unnecessary strain on the device?

Thank you in advance!


Solution

  • Most hardware that I know of uses what Wikipedia calls "the page-flip method"—i.e. displaying a new frame of an animation by switching which buffer is considered the front buffer, without any copy operation. This method is completely compatible with triple-buffering—if you can change which buffer of two you consider the front buffer, you can generally do the same with three.

    Using three buffers in the first place is a trade-off: you don't waste time not having a buffer to draw into (if drawing is faster than the refresh rate), but it uses more memory and can potentially add extra latency.