From 5a42a612878339bf3ff765428d668ef207627f91 Mon Sep 17 00:00:00 2001 From: assiduous Date: Wed, 28 Oct 2020 12:17:06 -0700 Subject: Set default swap chain buffer count to 3 on Android and iOS --- Graphics/GraphicsEngine/interface/GraphicsTypes.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'Graphics/GraphicsEngine') diff --git a/Graphics/GraphicsEngine/interface/GraphicsTypes.h b/Graphics/GraphicsEngine/interface/GraphicsTypes.h index b05519c5..e77c3830 100644 --- a/Graphics/GraphicsEngine/interface/GraphicsTypes.h +++ b/Graphics/GraphicsEngine/interface/GraphicsTypes.h @@ -1343,7 +1343,13 @@ struct SwapChainDesc bool IsPrimary DEFAULT_INITIALIZER(true); #if DILIGENT_CPP_INTERFACE - SwapChainDesc()noexcept{} + SwapChainDesc() noexcept + { +#if PLATFORM_ANDROID || PLATFORM_IOS + // Use 3 buffers by default on mobile platforms + BufferCount = 3; +#endif + } /// Constructor intializes the structure members with default values SwapChainDesc(Uint32 _Width, @@ -1362,7 +1368,8 @@ struct SwapChainDesc DefaultDepthValue {_DefaultDepthValue }, DefaultStencilValue {_DefaultStencilValue}, IsPrimary {_IsPrimary } - {} + { + } #endif }; typedef struct SwapChainDesc SwapChainDesc; -- cgit v1.2.3