File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,12 @@ int main(int argc, char *argv[])
6565 QSurfaceFormat fmt = QSurfaceFormat::defaultFormat ();
6666 fmt.setVersion (3 , 2 );
6767 QSurfaceFormat::setDefaultFormat (fmt);
68+ #elif defined(Q_OS_MACOS)
69+ // macOS requires 4.1 OpenGL Context
70+ QSurfaceFormat fmt = QSurfaceFormat::defaultFormat ();
71+ fmt.setProfile (QSurfaceFormat::OpenGLContextProfile::CoreProfile);
72+ fmt.setVersion (4 , 1 );
73+ QSurfaceFormat::setDefaultFormat (fmt);
6874#endif
6975
7076 QGuiApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
Original file line number Diff line number Diff line change @@ -69,6 +69,12 @@ int main(int argc, char *argv[])
6969 QSurfaceFormat fmt = QSurfaceFormat::defaultFormat ();
7070 fmt.setVersion (3 , 2 );
7171 QSurfaceFormat::setDefaultFormat (fmt);
72+ #elif defined(Q_OS_MACOS)
73+ // macOS requires 4.1 OpenGL Context
74+ QSurfaceFormat fmt = QSurfaceFormat::defaultFormat ();
75+ fmt.setProfile (QSurfaceFormat::OpenGLContextProfile::CoreProfile);
76+ fmt.setVersion (4 , 1 );
77+ QSurfaceFormat::setDefaultFormat (fmt);
7278#endif
7379
7480 QGuiApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
You can’t perform that action at this time.
0 commit comments