Skip to main content
GameDev.net gamedev.net
🔒 Locked

Page flipping and double buffering

Started by nickster01 Jan 9, 2006 at 6:26 AM 4 replies 1.6k views
Original Post
nickster01
nickster01
Can anyone explain these 2 things in easy terms? Also looking to know how the setup of a directX back buffer differs when using these 2 approaches? Any help muchly appreciated, Thanks
nickster01
nickster01
Got 2 easy explanations:

Double Buffering is the process of drawing an image in an off screen area and then copying It to the display surface.

Page Flipping – Roughly same idea as double buffering except that you draw to one of two potentially visible surfaces and then direct the hardware to make the other surface the active display surface. Basically removes the “copy” step as the hardware addressing system is used to point the video rasterizer to a different porion of memory. End result is an instantaneous page flip and update of the visual on the screen – hence the term page flipping

If anyone else is interested,

Does anyone know how the setup of DirectX back buffer differs between them?
jollyjeffers
jollyjeffers
hmm, think you might be getting muddled here [smile]

"Page Flipping" (aka "Page Swapping") is the process of redirecting the pointer between output buffers. What you described as page flipping sounds more like triple buffering [smile]

Double buffering alternates from front->back->front->back->front->back, where as Triple buffering is more of a "ring buffer" mechanism B0->B1->B2->B0->B1->B2->B0->B1->B2

Triple buffering can be more performance-efficient because you can effectively queue up an extra frame and you're less susceptable to presentation stalling (which is a bit of a moot point unless you're using VSYNC). However, it's less space-efficient as you need to store an extra frame buffer.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |
whoop1
whoop1
Quote:
Original post by nickster01


Does anyone know how the setup of DirectX back buffer differs between them?


does anyone know the answer to this question?
jollyjeffers
jollyjeffers
Quote:
Original post by whoop1
Quote:
Original post by nickster01


Does anyone know how the setup of DirectX back buffer differs between them?


does anyone know the answer to this question?

D3DPRESENT_PARAMETERS::BackBufferCount is all that you need to change to switch between double/triple buffering.

hth
Jack
<hr align="left" width="25%" />
Jack Hoxley <small>[</small><small> Forum FAQ | Revised FAQ |

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.