IDXGISwapChain1 Interface
The IDXGISwapChain1 interface extends the functionality of the
IDXGISwapChain interface to support multisampling and improved
display properties for swap chains.
Interface
This interface is inherited from IDXGISwapChain.
interface IDXGISwapChain1 : IDXGISwapChain
Methods
The IDXGISwapChain1 interface inherits the following methods from
IDXGISwapChain and also includes the following new methods:
HRESULT Present1(UINT SyncInterval, UINT Flags, DXGI_PRESENT_PARAMETERS *pPresentParameters);
Presents the next buffer in the sequence. This is the extended version that enables more control over presentation behavior.
Parameters
| Parameter | Type | Description |
|---|---|---|
SyncInterval |
UINT |
The interval for V-sync.
|
Flags |
UINT |
Flags that specify presentation options. See DXGI_PRESENT_FLAGS. |
pPresentParameters |
DXGI_PRESENT_PARAMETERS* |
A pointer to a
DXGI_PRESENT_PARAMETERS structure.
This parameter is optional.
|
Return Value
Returns S_OK if successful; otherwise, returns one of the
DXGI error codes.
HRESULT GetSourceSize(UINT *pWidth, UINT *pHeight);
Retrieves the source rectangle for the swap chain.
Parameters
| Parameter | Type | Description |
|---|---|---|
pWidth |
UINT* |
A pointer to a variable that receives the width of the swap chain's source rectangle. |
pHeight |
UINT* |
A pointer to a variable that receives the height of the swap chain's source rectangle. |
Return Value
Returns S_OK if successful; otherwise, returns one of the
DXGI error codes.
HRESULT GetMatrixTransform(DXGI_MATRIX_3X2_F *pMatrix);
Retrieves the matrix transform for the swap chain.
Parameters
| Parameter | Type | Description |
|---|---|---|
pMatrix |
DXGI_MATRIX_3X2_F* |
A pointer to a variable that receives the
DXGI_MATRIX_3X2_F structure that represents the
matrix transform.
|
Return Value
Returns S_OK if successful; otherwise, returns one of the
DXGI error codes.
Remarks
IDXGISwapChain1 is used for advanced swap chain management, particularly for scenarios involving multisampling, stereo 3D rendering, and more granular control over presentation. The Present1 method offers enhanced control over synchronization and presentation parameters compared to the base Present method.
Requirements
Header: Include dxgi.h
Library: Link with dxgi.lib