<< Chunky vs. Planar
>> Monitors

What is doublebuffering?

Don't be ashamed if you haven't a clue as to what this is. It's rather simple, really. Imagine you wanted to animate something by drawing out each frame. Now imagine you had only one piece of paper. Even if you drew pretty fast, it would be difficult to see what the animation looks like because you'd have to erase the frame you just drew, in order to draw the next one!

What if you had two pieces of paper? Why, then, you could see the difference between two adjacent frames. First you'd draw your first frame on the first piece of paper, then you'd draw the second frame on the other piece. Then you'd erase the picture on the first piece of paper, and draw in the third frame. Then you'd erase the picture on the second piece of paper, and draw in the fourth frame, and so forth.

This is the principle of doublebuffering. The computer shows you the picture it just drew, then turns around and draws the next one. It then swaps the picture in front of you with the one it just drew, and repeats the process. The result is a smooth animation, because you never need to see the computer draw; all you see is each finished product.

(Joseph Luk, jluc@eis.calstate.edu)

<< Chunky vs. Planar >> Monitors