Unit content
Framebuffers, refresh and double buffering
A renderer ultimately writes image data into one or more framebuffer attachments. A color attachment stores the image to display; other attachments can store depth, stencil values or intermediate results.
A display refreshes repeatedly, while rendering a new frame takes time. If the display reads from the same buffer while the renderer is still changing it, different parts of the screen can come from different moments and produce visible tearing or partial updates.
Double buffering separates these roles. The renderer writes into a back buffer while the front buffer is being presented. When the new frame is complete, the buffers are exchanged or the completed image is queued for presentation.
Synchronizing presentation to display refresh can avoid tearing, but may add waiting or latency when rendering and refresh rates differ.
The framebuffer is therefore not merely “the screen”. It is a set of render targets whose lifetime and presentation policy connect image generation to the physical display.