From b74bc3fb800d91958269542570fc63e081d6b009 Mon Sep 17 00:00:00 2001 From: roentgen Date: Mar 24 2016 17:39:21 +0000 Subject: Merge pull request #27 from opentoonz/fix-gl-issue Force Qt to use desktop OpenGL --- diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cpp index 14ae56e..e34742b 100644 --- a/toonz/sources/toonz/main.cpp +++ b/toonz/sources/toonz/main.cpp @@ -339,7 +339,7 @@ void initToonzEnv() int main(int argc, char *argv[]) { -#ifdef WIN32 +#ifdef Q_OS_WIN // Enable standard input/output on Windows Platform for debug BOOL consoleAttached = ::AttachConsole(ATTACH_PARENT_PROCESS); if (consoleAttached) { @@ -364,6 +364,12 @@ int main(int argc, char *argv[]) QApplication a(argc, argv); +#ifdef Q_OS_WIN + // Since currently OpenToonz does not work with OpenGL of software or angle, + // force Qt to use desktop OpenGL + a.setAttribute(Qt::AA_UseDesktopOpenGL, true); +#endif + // Some Qt objects are destroyed badly withouth a living qApp. So, we must enforce a way to either // postpone the application destruction until the very end, OR ensure that sensible objects are // destroyed before.