[SDL] Re: Scaleing, SDL_DOUBLEBUF, SetVidMode, etc.....

Pierre Phaneuf pp at ludusdesign.com
Fri Apr 14 08:02:42 PDT 2000

"Randi J. Relander" wrote:

> On a related note, has anyone come across the need for triple buffering
> (SDL_TRIPLEBUF?) where you have frame(n-2) on the screen, frame(n-1) waiting
> for the vertical retrace, and frame(n) being created (based on the contents
> of frame(n-3) <ack>)? Some applications actually use quadruple buffering but
> I have not seen any benchmarks on quad versus triple buffering and have seen
> relatively little on the "real" advantages of going from double to triple
> buffering.

The advantage with triple buffering over double buffering is that you
can make use of asynchronous blitting. With async blits, usually you
cannot access the pixel data of the blitted surface until the blit is
finished. So that's where the second backbuffer comes in play, you can
start building it without waiting for the first one to be finished

Quadruple buffering (or N buffering) might be of some use if you
generate frames so quickly that you can build the second back buffer
before the first one is finished blitting. With triple buffering, you
have to wait for the first one to be ready before messing with it again.

I doubt this is really useful.

Pierre Phaneuf

More information about the SDL mailing list