Double buffering

Double buffering (English double buffering ) describes a concept in computer graphics, in which the frame buffer ( memory image ) is divided of video RAM for graphics cards into two areas. Aim of the process is to ensure a continuous frame rate without flickering.

Before double buffering was introduced undivided one framebuffer. Image computing and monitor output found so instead of parallel. Thus, the frame rate fluctuated depending on the scene complexity and the image flickered. This arises when written during the edition still in the same frame buffer.

  • 3.1 Microsoft Windows

Operation

The frame buffer of the graphics card memory is divided into front and back buffer. While is read by the RAMDAC the front buffer and displayed on the screen, the GPU calculates BackBuffer the next following image. After completion of this computation is the execution of the swap command - this is the permutation of the memory addresses of the front and back buffer ( Flip Page ) - depending on VSync.

  • When VSync is disabled, the exchange is performed immediately, regardless of how far is the RAMDAC with the image representation from the front buffer. However, the cathode ray that generates the screen image begins, is not restarted. This continues to the point where he left off before the buffer swap. The result is that an image displayed on the monitor is composed in part of a plurality of consecutive sub-images. This effect is called tearing.
  • VSync activated at waiting with the reversed until the RAMDAC finishes the display of the current image from the front buffer. This is indicated by the VSync signal. In the meantime, there can be no new image calculation, because the results can be stored in any free buffer. Thus, the performance of the graphics card is artificially reduced. This problem is compensated by introduction of an additional back buffer at triple buffering (triple buffering ).

After execution of the swap command ( the exchange of front and back buffer ), the whole cycle starts all over again.

Advantages and disadvantages of double buffering

Benefits

  • Liquid and stutter- screen layout
  • Lower latency than three or Vierfachpufferung

Disadvantages

  • VSync disabled leads to tearing, especially if the monitor refresh rate is low, but the graphics card reaches a high frame rate
  • Activated VSync sometimes leads to high performance loss
  • Double frame buffer size over simple buffering

Areas of application

Microsoft Windows

When the Windows Aero Skin was selected in Microsoft Windows, the Desktop Window Manager uses default double buffering to prevent tearing.

Switch buffer technique

In other areas (especially in real-time applications ), the double buffering is called a switch buffer technique. A change buffer corresponds to a ring buffer with two places ( producer-consumer problem).

Pictures of Double buffering

96013
de