The frame buffer now becomes the front buffer
To create the device for Fig 2.12 we specify a BackBufferCount of 2. The result is two frame buffers and a front buffer. Assume that all three are initially blank. Next we render a triangle. The device will automatically render to the active frame buffer, which is initially the first of the two frame buffers created. When the image is complete, we call the Present function and the pointers are flipped (or copied in windowed mode). The frame buffer now becomes the front buffer, the front buffer becomes the second frame buffer, and the second buffer becomes the active frame buffer.
Figure 2.13
| www.gameinstitute.com Graphics Programming with DX9 | Page 35 of 85 |
|---|
TeamLRN
Note: D3DSWAPEFFECT_COPY can only be used for devices with one frame buffer (BackBufferCount = 0 or 1). Device creation will fail if you try to create it using D3DSWAPEFFECT_COPY and more than one frame buffer.
D3DSWAPEFFECT_DISCARD
| Page 36 of 85 |
|---|


