From c90ce7d50758e15338606bcbc9bca115283d50e8 Mon Sep 17 00:00:00 2001 From: April Wade Date: Fri, 22 Nov 2019 03:17:50 -0600 Subject: [PATCH] Fix 3D rendering on macOS --- src/Editor/main.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Editor/main.cpp b/src/Editor/main.cpp index cc466847..7a167cef 100644 --- a/src/Editor/main.cpp +++ b/src/Editor/main.cpp @@ -81,6 +81,12 @@ public: /** Main function */ int Main(int argc, char *argv[]) { + // Default OpenGL format + QSurfaceFormat glFormat; + glFormat.setVersion(3, 3); + glFormat.setProfile(QSurfaceFormat::CoreProfile); + QSurfaceFormat::setDefaultFormat(glFormat); + // Create application #if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); @@ -107,12 +113,6 @@ public: qApp->installNativeEventFilter(gpMouseDragCocoaEventFilter); #endif - // Default OpenGL format - QSurfaceFormat glFormat; - glFormat.setVersion(3, 3); - glFormat.setProfile(QSurfaceFormat::CoreProfile); - QSurfaceFormat::setDefaultFormat(glFormat); - // Init log bool Initialized = NLog::InitLog(LocateLogPath()); if (!Initialized) UICommon::ErrorMsg(0, "Couldn't open log file. Logging will not work for this session.");