Force Qt to use desktop OpenGL

since currently OpenToonz does not work with OpenGL of software or angle.
This commit is contained in:
kusano 2016-03-25 02:37:28 +09:00
parent 56cbe06581
commit 52db9569b3

View file

@ -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.