aboutsummaryrefslogtreecommitdiffstats
path: root/gui/application.cc
diff options
context:
space:
mode:
authorAdrian Jeakins <jeakinsadrian@gmail.com>2018-12-05 22:27:04 +0000
committerAdrian Jeakins <jeakinsadrian@gmail.com>2018-12-05 22:27:04 +0000
commit38f80b10486bb7f10873d327564bfe075cabe54d (patch)
treec0723511dfb1041a2ccb8fbcb4231b54e8f94d31 /gui/application.cc
parenta6315833d3ca7eac414b8496d8ff12a7f30a4145 (diff)
downloadnextpnr-38f80b10486bb7f10873d327564bfe075cabe54d.tar.gz
nextpnr-38f80b10486bb7f10873d327564bfe075cabe54d.tar.bz2
nextpnr-38f80b10486bb7f10873d327564bfe075cabe54d.zip
Fix device view not showing anything on macOS.
* Fix line shader when running under the core profile and make version match those elsewhere. * Make surface format version match the openGL functions we are using.
Diffstat (limited to 'gui/application.cc')
-rw-r--r--gui/application.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/gui/application.cc b/gui/application.cc
index 7751e6f1..3cf8081d 100644
--- a/gui/application.cc
+++ b/gui/application.cc
@@ -42,6 +42,10 @@ Application::Application(int &argc, char **argv) : QApplication(argc, argv)
QSurfaceFormat fmt;
fmt.setSamples(10);
fmt.setProfile(QSurfaceFormat::CoreProfile);
+ // macOS is very picky about this version matching
+ // the version of openGL used in ImGuiRenderer
+ fmt.setMajorVersion(3);
+ fmt.setMinorVersion(2);
QSurfaceFormat::setDefaultFormat(fmt);
#ifdef _WIN32
SetConsoleCtrlHandler((PHANDLER_ROUTINE)WinHandler, TRUE);