From d7a1a353393bbe1e7465afd91af9cb74a9d63581 Mon Sep 17 00:00:00 2001 From: cutealien Date: Thu, 16 Jul 2020 17:24:18 +0000 Subject: [PATCH] Fix MacOS 10.15 only rendering to quarter of window. Thanks @bridgeco for the patch: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=7&t=52644 git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@6132 dfc29bdd-3216-0410-991c-e03cc46cb475 --- source/Irrlicht/CIrrDeviceOSX.mm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/Irrlicht/CIrrDeviceOSX.mm b/source/Irrlicht/CIrrDeviceOSX.mm index d11a47e1..937fe21d 100644 --- a/source/Irrlicht/CIrrDeviceOSX.mm +++ b/source/Irrlicht/CIrrDeviceOSX.mm @@ -862,10 +862,16 @@ void CIrrDeviceMacOSX::createDriver() os::Printer::log("Could not create OpenGL driver.", ELL_ERROR); } - if (Window) - [(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:[Window contentView]]; - else - [(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:(NSView*)CreationParams.WindowId]; + if (Window) + { + [[Window contentView] setWantsBestResolutionOpenGLSurface:NO]; + [(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:[Window contentView]]; + } + else + { + [(NSView*)CreationParams.WindowId setWantsBestResolutionOpenGLSurface:NO]; + [(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context setView:(NSView*)CreationParams.WindowId]; + } #ifndef __MAC_10_6 CGLContextObj CGLContext = (CGLContextObj)[(NSOpenGLContext*)ContextManager->getContext().OpenGLOSX.Context CGLContextObj];