summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngine
diff options
context:
space:
mode:
authorassiduous <assiduous@diligentgraphics.com>2020-04-26 02:29:32 +0000
committerassiduous <assiduous@diligentgraphics.com>2020-04-26 02:29:32 +0000
commit2f855f30a741900396aa08e8eff9726bc20afba6 (patch)
treefe36c7585d4c969edfeebac08203def2e8462db5 /Graphics/GraphicsEngine
parentVulkan swap chain: improved swap chain destruction (diff)
downloadDiligentCore-2f855f30a741900396aa08e8eff9726bc20afba6.tar.gz
DiligentCore-2f855f30a741900396aa08e8eff9726bc20afba6.zip
Improved surface orientation change detection in Vulkan swap chain
Diffstat (limited to 'Graphics/GraphicsEngine')
-rw-r--r--Graphics/GraphicsEngine/interface/SwapChain.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/Graphics/GraphicsEngine/interface/SwapChain.h b/Graphics/GraphicsEngine/interface/SwapChain.h
index bda7c9f5..5a9bc956 100644
--- a/Graphics/GraphicsEngine/interface/SwapChain.h
+++ b/Graphics/GraphicsEngine/interface/SwapChain.h
@@ -62,14 +62,21 @@ DILIGENT_BEGIN_INTERFACE(ISwapChain, IObject)
/// Returns the swap chain desctription
VIRTUAL const SwapChainDesc REF METHOD(GetDesc)(THIS) CONST PURE;
- /// Changes the swap chain's back buffer size
+ /// Changes the swap chain size
- /// \param [in] NewWidth - New swap chain width, in pixels.
- /// \param [in] NewHeight - New swap chain height, in pixels.
+ /// \param [in] NewWidth - New swap chain width (not accounting for pre-transform), in pixels.
+ /// \param [in] NewHeight - New swap chain height (not accounting for pre-transform), in pixels.
/// \param [in] NewTransform - New surface transform, see Diligent::SURFACE_TRANSFORM.
///
/// \note When resizing non-primary swap chains, the engine unbinds the
/// swap chain buffers from the output.
+ ///
+ /// New width and height should not account for surface pre-transform. For example,
+ /// if the window size is 1920 x 1080, but the surface is rotated by 90 degrees,
+ /// NewWidth should still be 1920, and NewHeight should still be 1080. It is highly
+ /// preferable to always use SURFACE_TRANSFORM_OPTIMAL, however SURFACE_TRANSFORM_ROTATE_90
+ /// will also work in this scenario. After the swap chain has been resized, its width
+ /// will be 1080, height will be 1920, and PreTransform will be SURFACE_TRANSFORM_ROTATE_90.
VIRTUAL void METHOD(Resize)(THIS_
Uint32 NewWidth,
Uint32 NewHeight,