From 0c85018bc5c468ad1b3775d69951e43f11baca19 Mon Sep 17 00:00:00 2001 From: "Steinar H. Gunderson" Date: Mon, 19 Feb 2018 09:39:35 +0100 Subject: [PATCH] Create QApplication after setting the OpenGL default format. Fixes a warning in newer Qt. --- main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.cpp b/main.cpp index d0427d1..afac03e 100644 --- a/main.cpp +++ b/main.cpp @@ -35,7 +35,6 @@ int main(int argc, char *argv[]) av_register_all(); QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts, true); - QApplication app(argc, argv); QSurfaceFormat fmt; fmt.setDepthBufferSize(0); @@ -52,6 +51,7 @@ int main(int argc, char *argv[]) QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt)); + QApplication app(argc, argv); global_share_widget = new QGLWidget(); if (!global_share_widget->isValid()) { fprintf(stderr, "Failed to initialize OpenGL. Nageru needs at least OpenGL 3.1 to function properly.\n"); -- 2.39.2