aboutsummaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/application.cc13
1 files changed, 13 insertions, 0 deletions
diff --git a/gui/application.cc b/gui/application.cc
index 3cf8081d..9229f1cd 100644
--- a/gui/application.cc
+++ b/gui/application.cc
@@ -20,6 +20,8 @@
*/
#include "application.h"
+#include "log.h"
+#include <QOpenGLContext>
#include <QMessageBox>
#include <QSurfaceFormat>
#include <QTextStream>
@@ -47,6 +49,17 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
fmt.setMajorVersion(3);
fmt.setMinorVersion(2);
QSurfaceFormat::setDefaultFormat(fmt);
+
+ QOpenGLContext glContext;
+ fmt = glContext.format();
+ if (fmt.majorVersion() < 3) {
+ printf("Could not get OpenGL 3.0 context. Aborting.\n");
+ log_abort();
+ }
+ if (fmt.minorVersion() < 2) {
+ printf("Could not get OpenGL 3.2 context - trying anyway...\n ");
+ }
+
#ifdef _WIN32
SetConsoleCtrlHandler((PHANDLER_ROUTINE)WinHandler, TRUE);
#endif