Skip to content

Graphics: Double buffering, triple buffering and vsync

October 28, 2012

As my first post, I am going to explain the differences between double buffering and triple buffering.

An application that it uses double buffering, is where we have two screen buffers (the currently displayed “Front Buffer”, and the other, in which the next frame will be painted “Back Buffer”), in which both buffers will swap. Double buffering appeared by the need to solve the problem in which, when we use a single screen buffer and the next frames are generated, continuous flashes are observed.

An application that it uses triple buffering, is where we have three screen buffers (the currently displayed “Front Buffer”, and two others, in which the next frames will be painted “Back Buffer”), in which two buffers will swap while the next frame is being painted in the other buffer. The triple buffering is more faster than the double buffering because in the moment that two buffers is being swapped, the next frame is being painted in the other buffer. Triple buffeting requires more memory but it has a better performance.

Double Buffering

If the time in which the next frame is painted is less than the time in which the image is refreshed by the monitor, it is possible that an effect known as “Screen Tearing” is produced. This effect consists in that, out buffers are repeatly painted, and when the screen is refreshed, there are various pieces of frames. This problem is solved with vsync that it is used to synchronize the front buffer painted with the screen refresh rate.

From → Graphics

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: