]> git.sesse.net Git - nageru/blobdiff - main.cpp
Add a CORS policy to the channel endpoints, so that external applications can query...
[nageru] / main.cpp
index e156c5964722755872d218696686d7cb81a7bec9..d0427d1489a353ffb720462051d537d08f8822a4 100644 (file)
--- a/main.cpp
+++ b/main.cpp
@@ -13,6 +13,7 @@ extern "C" {
 #include <QSurfaceFormat>
 #include <string>
 
+#include "basic_stats.h"
 #include "context.h"
 #include "flags.h"
 #include "image_input.h"
@@ -21,7 +22,7 @@ extern "C" {
 
 int main(int argc, char *argv[])
 {
-       parse_flags(argc, argv);
+       parse_flags(PROGRAM_NAGERU, argc, argv);
 
        if (global_flags.va_display.empty() ||
            global_flags.va_display[0] != '/') {
@@ -52,6 +53,10 @@ int main(int argc, char *argv[])
        QGLFormat::setDefaultFormat(QGLFormat::fromSurfaceFormat(fmt));
 
        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");
+               exit(1);
+       }
 
        MainWindow mainWindow;
        mainWindow.resize(QSize(1500, 850));