The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Options for swap-chain behavior.


typedef enum DXGI_SWAP_CHAIN_FLAG { 
  DXGI_SWAP_CHAIN_FLAG_NONPREROTATED                    = 1,
  DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE                   = 4,
  DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY                     = 32,



Set this flag to turn off automatic image rotation; that is, do not perform a rotation when transferring the contents of the front buffer to the monitor. Use this flag to avoid a bandwidth penalty when an application expects to handle rotation. This option is valid only during full-screen mode.


Set this flag to enable an application to switch modes by calling IDXGISwapChain::ResizeTarget. When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window.


Set this flag to enable an application to render using GDI on a swap chain or a surface. This will allow the application to call IDXGISurface1::GetDC on the 0th back buffer or a surface.


Set this flag to indicate that the swap chain might contain protected content; therefore, the operating system supports the creation of the swap chain only when driver and hardware protection is used. If the driver and hardware do not support content protection, the call to create a resource for the swap chain fails.

Direct3D 11:  This enumeration value is supported starting with Windows 8.


Set this flag to indicate that shared resources that are created within the swap chain must be protected by using the driver’s mechanism for restricting access to shared surfaces.

Direct3D 11:  This enumeration value is supported starting with Windows 8.


Set this flag to restrict presented content to the local displays. Therefore, the presented content is not accessible via remote accessing or through the desktop duplication APIs.

This flag supports the window content protection features of Windows. Applications can use this flag to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and APIs.

If you use this flag with windowed (HWND or IWindow) swap chains where another process created the HWND, the owner of the HWND must use the SetWindowDisplayAffinity function appropriately in order to allow calls to IDXGISwapChain::Present or IDXGISwapChain1::Present1 to succeed.

Direct3D 11:  This enumeration value is supported starting with Windows 8.


Set this flag to create a waitable object you can use to ensure rendering does not begin while a frame is still being presented. When this flag is used, the swapchain's latency must be set with the IDXGISwapChain2::SetMaximumFrameLatency API instead of IDXGIDevice1::SetMaximumFrameLatency.

Note  This enumeration value is supported starting with Windows 8.1.


Set this flag to create a swap chain in the foreground layer for multi-plane rendering. This flag can only be used with CoreWindow swap chains, which are created with CreateSwapChainForCoreWindow. Apps should not create foreground swap chains if IDXGIOutput2::SupportsOverlays indicates that hardware support for overlays is not available.

Note that IDXGISwapChain::ResizeBuffers cannot be used to add or remove this flag.

Note  This enumeration value is supported starting with Windows 8.1.


This enumeration is used by the DXGI_SWAP_CHAIN_DESC structure and the IDXGISwapChain::ResizeTarget method.

This enumeration is also used by the DXGI_SWAP_CHAIN_DESC1 structure.

You don't need to set DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY for swap chains that you create in full-screen mode with the IDXGIFactory::CreateSwapChain method because those swap chains already behave as if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is set. That is, presented content is not accessible by remote access or through the desktop duplication APIs.

Swap chains that you create with the IDXGIFactory2::CreateSwapChainForHwnd, IDXGIFactory2::CreateSwapChainForCoreWindow, and IDXGIFactory2::CreateSwapChainForComposition methods are not protected if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is not set and are protected if DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY is set. When swap chains are protected, screen scraping is prevented and, in full-screen mode, presented content is not accessible through the desktop duplication APIs.

When you call IDXGISwapChain::ResizeBuffers to change the swap chain's back buffer, you can reset or change all DXGI_SWAP_CHAIN_FLAG flags.




See also

DXGI Enumerations



Community Additions

© 2014 Microsoft