OpenToonz - An open-source full-featured 2D animation creation software
C
Force Qt to use desktop OpenGL
kusano52db9569b3c7
diff --git a/toonz/sources/toonz/main.cpp b/toonz/sources/toonz/main.cppindex 14ae56e97..e34742b72 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 debugBOOL 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.