diff options
| author | assiduous <assiduous@diligentgraphics.com> | 2020-04-28 01:33:48 +0000 |
|---|---|---|
| committer | assiduous <assiduous@diligentgraphics.com> | 2020-04-28 01:33:48 +0000 |
| commit | f53ac2636334a954670bec0ce2402245a728dbfb (patch) | |
| tree | 3c5e8866f7f0c1f8ad7705e856615099ba7f39fb /Graphics/GraphicsEngineOpenGL | |
| parent | Vulkan swap chain: auto-detecting surface rotation on Android (diff) | |
| download | DiligentCore-f53ac2636334a954670bec0ce2402245a728dbfb.tar.gz DiligentCore-f53ac2636334a954670bec0ce2402245a728dbfb.zip | |
Fixed SwapChainGL on iOS
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
| -rw-r--r-- | Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm | 10 |
1 files changed, 10 insertions, 0 deletions
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<RenderDeviceGLImpl>()); |
