From f53ac2636334a954670bec0ce2402245a728dbfb Mon Sep 17 00:00:00 2001 From: assiduous Date: Mon, 27 Apr 2020 18:33:48 -0700 Subject: Fixed SwapChainGL on iOS --- Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'Graphics/GraphicsEngineOpenGL') diff --git a/Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm b/Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm index fe5b9eaa..f8e22283 100644 --- a/Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm +++ b/Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm @@ -43,6 +43,16 @@ SwapChainGLIOS::SwapChainGLIOS(IReferenceCounters* pRefCounters, m_DepthRenderBuffer(false), m_DefaultFBO(false) { + if (m_DesiredPreTransform != SURFACE_TRANSFORM_OPTIMAL && + m_DesiredPreTransform != SURFACE_TRANSFORM_IDENTITY) + { + LOG_WARNING_MESSAGE(GetSurfaceTransformString(m_DesiredPreTransform), + " is not an allowed pretransform because OpenGL swap chains only support identity transform. " + "Use SURFACE_TRANSFORM_OPTIMAL (recommended) or SURFACE_TRANSFORM_IDENTITY."); + } + m_DesiredPreTransform = SURFACE_TRANSFORM_OPTIMAL; + m_SwapChainDesc.PreTransform = SURFACE_TRANSFORM_IDENTITY; + m_CALayer = InitAttribs.Window.pCALayer; InitRenderBuffers(true, m_SwapChainDesc.Width, m_SwapChainDesc.Height); CreateDummyBuffers(m_pRenderDevice.RawPtr()); -- cgit v1.2.3