summaryrefslogtreecommitdiffstats
path: root/Graphics/GraphicsEngineOpenGL
diff options
context:
space:
mode:
Diffstat (limited to 'Graphics/GraphicsEngineOpenGL')
-rw-r--r--Graphics/GraphicsEngineOpenGL/src/SwapChainGLIOS.mm10
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>());