Game Development Reference
In-Depth Information
building a desktop application, we would have a larger selection, and our final choice
would depend on our performance and hardware requirements.
Now you may be wondering what DXGI is, and why we have been using it during
the swap chain creation. Beginning with Windows Vista and Direct3D 10.0, the Dir-
ectX Graphics Infrastructure ( DXGI ) exists to act as an intermediary between the
Direct3D API and the graphics driver. It manages the adapters and common graph-
ics resources, as well as the Desktop Window Manager, which handles compositing
multiple Direct3D applications together to allow multiple windows to share the same
screen. DXGI manages the screen, and therefore manages the swap chain as well.
That is why we have an ID3D11Device and an IDXGISwapChain object.
Once we're done, we need to use this structure to create the swap chain. You may
remember, the graphics device creates resources, and that includes the swap chain.
The swap chain, however, is a DXGI resource and not a Direct3D resource, so we
first need to extract the DXGI device from the Direct3D device before we can contin-
ue. Thankfully, the Direct3D device is layered on top of the DXGI device, so we just
Search WWH ::




Custom Search