IDXGISwapChain2::SetSourceSize method

Sets the source region to be used for the swap chain.

Use SetSourceSize to specify the portion of the swap chain from which the operating system presents. This allows an effective resize without calling the more-expensive IDXGISwapChain::ResizeBuffers method. Prior to Windows 8.1, calling IDXGISwapChain::ResizeBuffers was the only way to resize the swap chain. The source rectangle is always defined by the region [0, 0, Width, Height].

Syntax


HRESULT SetSourceSize(
  [in]  UINT Width,
  [in]  UINT Height
);

Parameters

Width [in]

Source width to use for the swap chain. This value must be greater than zero, and must be less than or equal to the overall width of the swap chain.

Height [in]

Source height to use for the swap chain. This value must be greater than zero, and must be less than or equal to the overall height of the swap chain.

Return value

This method can return:

  • E_INVALIDARG if one or more parameters exceed the size of the back buffer.
  • Possibly other error codes that are described in the DXGI_ERROR topic.

Requirements

Minimum supported client

Windows 8.1 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 R2 [desktop apps | Windows Store apps]

Header

Dxgi1_3.h

Library

Dxgi.lib

See also

GetSourceSize
IDXGISwapChain2

 

 

Community Additions

ADD
Show:
© 2014 Microsoft