DXGI_SWAP_CHAIN_DESC1 structure (dxgi1_2.h)
Describes a swap chain.
Syntax
typedef struct DXGI_SWAP_CHAIN_DESC1 {
UINT Width;
UINT Height;
DXGI_FORMAT Format;
BOOL Stereo;
DXGI_SAMPLE_DESC SampleDesc;
DXGI_USAGE BufferUsage;
UINT BufferCount;
DXGI_SCALING Scaling;
DXGI_SWAP_EFFECT SwapEffect;
DXGI_ALPHA_MODE AlphaMode;
UINT Flags;
} DXGI_SWAP_CHAIN_DESC1;
Members
Width
A value that describes the resolution width. If you specify the width as zero when you call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the IDXGISwapChain1::GetDesc1 method to retrieve the assigned width value. You cannot specify the width as zero when you call the IDXGIFactory2::CreateSwapChainForComposition method.
Height
A value that describes the resolution height. If you specify the height as zero when you call the IDXGIFactory2::CreateSwapChainForHwnd method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the IDXGISwapChain1::GetDesc1 method to retrieve the assigned height value. You cannot specify the height as zero when you call the IDXGIFactory2::CreateSwapChainForComposition method.
Format
A DXGI_FORMAT structure that describes the display format.
Stereo
Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. TRUE if stereo; otherwise, FALSE. If you specify stereo, you must also specify a flip-model swap chain (that is, a swap chain that has the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set in the SwapEffect member).
SampleDesc
A DXGI_SAMPLE_DESC structure that describes multi-sampling parameters. This member is valid only with bit-block transfer (bitblt) model swap chains.
BufferUsage
A DXGI_USAGE-typed value that describes the surface usage and CPU access options for the back buffer. The back buffer can be used for shader input or render-target output.
BufferCount
A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.
Scaling
A DXGI_SCALING-typed value that identifies resize behavior if the size of the back buffer is not equal to the target output.
SwapEffect
A DXGI_SWAP_EFFECT-typed value that describes the presentation model that is used by the swap chain and options for handling the contents of the presentation buffer after presenting a surface. You must specify the DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value when you call the IDXGIFactory2::CreateSwapChainForComposition method because this method supports only flip presentation model.
AlphaMode
A DXGI_ALPHA_MODE-typed value that identifies the transparency behavior of the swap-chain back buffer.
Flags
A combination of DXGI_SWAP_CHAIN_FLAG-typed values that are combined by using a bitwise OR operation. The resulting value specifies options for swap-chain behavior.
Remarks
This structure is used by the CreateSwapChainForHwnd, CreateSwapChainForCoreWindow, CreateSwapChainForComposition, CreateSwapChainForCompositionSurfaceHandle, and GetDesc1 methods.
For a flip-model swap chain (that is, a swap chain that has the DXGI_SWAP_EFFECT_FLIP_DISCARD or DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL value set in the SwapEffect member), you must set the Format member to DXGI_FORMAT_R16G16B16A16_FLOAT, DXGI_FORMAT_B8G8R8A8_UNORM, DXGI_FORMAT_R8G8B8A8_UNORM, or DXGI_FORMAT_R10G10B10A10_UNORM; you must set the Count member of the DXGI_SAMPLE_DESC structure that the SampleDesc member specifies to one and the Quality member of DXGI_SAMPLE_DESC to zero because multiple sample antialiasing (MSAA) is not supported; you must set the BufferCount member to from two to sixteen. For more info about flip-model swap chain, see DXGI Flip Model.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Header | dxgi1_2.h |