Page Flipping and Back Buffering


Page flipping is key in multimedia, animation, and game software. It is similar to the way that animation is done with a pad of paper; that is, on each page, the artist changes the figure slightly, so that when you flip rapidly between sheets, the drawing appears to be animated.

Microsoft Direct3D implements page flipping functionality through a swap chain, which is a property of the device. Initially, you set up a series of Direct3D buffers that flip to the screen in the way that the artist's paper flips to the next page. The first buffer is referred to as the color front buffer. The buffers behind it are called back buffers. Your application writes to a back buffer and then flips the color front buffer so that the back buffer appears on screen. While the system displays the image, the software is again writing to a back buffer. The process continues as long as the animation, and enables you to animate images efficiently.

Direct3D makes it easy to set up page flipping schemes, from simple double-buffered schemes (that is, a color front buffer with one back buffer) to more sophisticated schemes with multiple back buffers.


Send comments about this topic to Microsoft. © Microsoft Corporation. All rights reserved.

Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center