Skip to content

Latest commit

 

History

History
172 lines (136 loc) · 8.29 KB

ns-dxgi1_2-dxgi_swap_chain_desc1.md

File metadata and controls

172 lines (136 loc) · 8.29 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NS:dxgi1_2.DXGI_SWAP_CHAIN_DESC1
DXGI_SWAP_CHAIN_DESC1 (dxgi1_2.h)
Describes a swap chain. (DXGI_SWAP_CHAIN_DESC1)
DXGI_SWAP_CHAIN_DESC1
DXGI_SWAP_CHAIN_DESC1 structure [DXGI]
direct3ddxgi.dxgi_swap_chain_desc1
dxgi1_2/DXGI_SWAP_CHAIN_DESC1
direct3ddxgi\dxgi_swap_chain_desc1.htm
direct3ddxgi
38B302DF-5617-4195-8E4A-619D75188AD5
12/05/2018
DXGI_SWAP_CHAIN_DESC1, DXGI_SWAP_CHAIN_DESC1 structure [DXGI], direct3ddxgi.dxgi_swap_chain_desc1, dxgi1_2/DXGI_SWAP_CHAIN_DESC1
dxgi1_2.h
Windows
Windows 8 and Platform Update for Windows 7 [desktop apps \| UWP apps]
Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps \| UWP apps]
Windows
DXGI_SWAP_CHAIN_DESC1
19H1
DXGI_SWAP_CHAIN_DESC1
dxgi1_2/DXGI_SWAP_CHAIN_DESC1
c++
APIRef
kbSyntax
HeaderDef
DXGI1_2.h
DXGI_SWAP_CHAIN_DESC1

DXGI_SWAP_CHAIN_DESC1 structure

-description

Describes a swap chain.

-struct-fields

-field 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.

-field 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.

-field Format

A DXGI_FORMAT structure that describes the display format.

-field 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).

-field SampleDesc

A DXGI_SAMPLE_DESC structure that describes multi-sampling parameters. This member is valid only with bit-block transfer (bitblt) model swap chains.

-field 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.

-field 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.

-field Scaling

A DXGI_SCALING-typed value that identifies resize behavior if the size of the back buffer is not equal to the target output.

-field 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.

-field AlphaMode

A DXGI_ALPHA_MODE-typed value that identifies the transparency behavior of the swap-chain back buffer.

-field 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.

Note  You cannot cast a DXGI_SWAP_CHAIN_DESC1 to a DXGI_SWAP_CHAIN_DESC and vice versa. An application must explicitly use the IDXGISwapChain1::GetDesc1 method to retrieve the newer version of the swap-chain description structure.
 
In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.

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.

-see-also

DXGI Structures

IDXGISwapChain1::GetDesc1