Content deleted Content added
No edit summary |
GreenC bot (talk | contribs) Rescued 1 archive link. Wayback Medic 2.5 per WP:URLREQ#anandtech.com |
||
(34 intermediate revisions by 24 users not shown) | |||
Line 1:
{{short description|Series of virtual framebuffers used by computer graphics systems}}
In [[computer graphics (computer science)|computer graphics]], a '''swap chain''' (also '''swapchain''') is a series of virtual [[framebuffer]]s
==Function==
[[File:swap chain depiction.svg|thumb|alt=Swap Chain|A graphical depiction of a triple-buffered swap chain.]]
In every swap chain there are at least two buffers. The first framebuffer, the screenbuffer, is the buffer that is [[Rendering (computer graphics)|rendered]] to the
[[Microsoft]] [[Direct3D]] implements a
{{cite web | title = SwapChain Class | publisher = Microsoft | url = http://msdn.microsoft.com/en-us/library/microsoft.windowsmobile.directx.direct3d.swapchain.aspx | accessdate = 30 October 2009 }}</ref> The API provides three methods of swapping: | title = Swap Chains▼
| publisher = neXe▼
| url = http://nexe.gamedev.net/directKnowledge/default.asp?p=Swap%20Chains▼
}}</ref>
==Comparison with triple buffering==
Outside the context of Direct3D, [[triple buffering]] refers to the technique of allowing an application to draw to whichever back buffer was least recently updated. This allows the application to always proceed with rendering, regardless of the pace at which frames are being drawn by the application or the pace at which frames are being sent to the display. Triple Buffering may result in a frame being discarded without being displayed if two or more newer frames are completely rendered in the time it takes for one frame to be sent to the display. By contrast, Direct3D swap chains are a strict [[Queue (abstract data type)|first-in, first-out queue]], so every frame that is drawn by the application will be displayed even if newer frames are available. Direct3D does not implement a most-recent buffer swapping strategy, and Microsoft's documentation calls a Direct3D swap chain of three buffers "triple buffering". Triple Buffering as described above is superior for interactive purposes such as gaming, but Direct3D swap chains of more than three buffers can be better for tasks such as presenting frames of a video where the time taken to [[Data compression#Video|decode]] each frame may be highly variable.<ref name="anandtech 0">
<references/>▼
| title = Triple Buffering: Why We Love It
| url = http://www.anandtech.com/show/2794/4
| archive-url = https://web.archive.org/web/20100407062123/http://www.anandtech.com/show/2794/4
| url-status = dead
| archive-date = April 7, 2010
}}</ref>
==References==
▲<references/>
▲*{{Cite web
▲| publisher = Microsoft
▲| accessdate = 30 October 2009}}
▲*{{Cite web
▲| title = Swap Chains
▲| publisher = neXe
▲| url = http://nexe.gamedev.net/directKnowledge/default.asp?p=Swap%20Chains
▲| accessdate = 30 October 2009}}
[[Category:Computer graphics
|