Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Sets the rotation of the back buffers for the swap chain.
Syntax
HRESULT SetRotation(
[in] DXGI_MODE_ROTATION Rotation
);
Parameters
[in] Rotation
A DXGI_MODE_ROTATION-typed value that specifies how to set the rotation of the back buffers for the swap chain.
Return value
SetRotation returns:
- S_OK if it successfully set the rotation.
- DXGI_ERROR_INVALID_CALL if the swap chain is bit-block transfer (bitblt) model. The swap chain must be flip model to successfully call SetRotation.
- Possibly other error codes that are described in the DXGI_ERROR topic.
Platform Update for Windows 7: On Windows 7 or Windows Server 2008 R2 with the Platform Update for Windows 7 installed, SetRotation fails with DXGI_ERROR_INVALID_CALL. For more info about the Platform Update for Windows 7, see Platform Update for Windows 7.
Remarks
You can only use SetRotation to rotate the back buffers for flip-model swap chains that you present in windowed mode.
SetRotation isn't supported for rotating the back buffers for flip-model swap chains that you present in full-screen mode. In this situation, SetRotation doesn't fail, but you must ensure that you specify no rotation (DXGI_MODE_ROTATION_IDENTITY) for the swap chain. Otherwise, when you call IDXGISwapChain1::Present1 or IDXGISwapChain::Present to present a frame, the presentation fails.
Requirements
Requirement | Value |
---|---|
Minimum supported client | Windows 8 and Platform Update for Windows 7 [desktop apps | UWP apps] |
Minimum supported server | Windows Server 2012 and Platform Update for Windows Server 2008 R2 [desktop apps | UWP apps] |
Target Platform | Windows |
Header | dxgi1_2.h |
Library | Dxgi.lib |