DXGI_SWAP_CHAIN_DESC structure (dxgi.h)

Describes a swap chain.

Syntax

typedef struct DXGI_SWAP_CHAIN_DESC {
  DXGI_MODE_DESC   BufferDesc;
  DXGI_SAMPLE_DESC SampleDesc;
  DXGI_USAGE       BufferUsage;
  UINT             BufferCount;
  HWND             OutputWindow;
  BOOL             Windowed;
  DXGI_SWAP_EFFECT SwapEffect;
  UINT             Flags;
} DXGI_SWAP_CHAIN_DESC;

Members

BufferDesc

Type: DXGI_MODE_DESC

A DXGI_MODE_DESC structure that describes the backbuffer display mode.

SampleDesc

Type: DXGI_SAMPLE_DESC

A DXGI_SAMPLE_DESC structure that describes multi-sampling parameters.

BufferUsage

Type: DXGI_USAGE

A member of the DXGI_USAGE enumerated type 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

Type: UINT

A value that describes the number of buffers in the swap chain. When you call IDXGIFactory::CreateSwapChain to create a full-screen swap chain, you typically include the front buffer in this value. For more information about swap-chain buffers, see Remarks.

OutputWindow

Type: HWND

An HWND handle to the output window. This member must not be NULL.

Windowed

Type: BOOL

A Boolean value that specifies whether the output is in windowed mode. TRUE if the output is in windowed mode; otherwise, FALSE.

We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through IDXGISwapChain::SetFullscreenState; that is, do not set this member to FALSE to force the swap chain to be full screen. However, if you create the swap chain as full screen, also provide the end user with a list of supported display modes through the BufferDesc member because a swap chain that is created with an unsupported display mode might cause the display to go black and prevent the end user from seeing anything.

For more information about choosing windowed verses full screen, see IDXGIFactory::CreateSwapChain.

SwapEffect

Type: DXGI_SWAP_EFFECT

A member of the DXGI_SWAP_EFFECT enumerated type that describes options for handling the contents of the presentation buffer after presenting a surface.

Flags

Type: UINT

A member of the DXGI_SWAP_CHAIN_FLAG enumerated type that describes options for swap-chain behavior.

Remarks

This structure is used by the GetDesc and CreateSwapChain methods.

In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.

If you create a swap chain with one buffer, specifying DXGI_SWAP_EFFECT_SEQUENTIAL does not cause the contents of the single buffer to be swapped with the front buffer.

For performance information about flipping swap-chain buffers in full-screen application, see Full-Screen Application Performance Hints.

Requirements

Requirement Value
Header dxgi.h

See also

DXGI Structures

IDXGIFactory::CreateSwapChain

IDXGISwapChain