1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-25 17:28:50 -05:00

QGLFormat is removed from Qt6

This commit is contained in:
Jon Beniston 2023-09-23 22:14:01 +01:00
parent dc40fac021
commit 9fadf291a1

View File

@ -24,7 +24,9 @@
#include <QSysInfo> #include <QSysInfo>
#include <QSettings> #include <QSettings>
#ifdef __APPLE__ #ifdef __APPLE__
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
#include <QGLFormat> #include <QGLFormat>
#endif
#include <QSurfaceFormat> #include <QSurfaceFormat>
#endif #endif
#ifdef ANDROID #ifdef ANDROID
@ -212,10 +214,12 @@ int main(int argc, char* argv[])
// will not work. Because of this, we have two versions of the shaders: // will not work. Because of this, we have two versions of the shaders:
// OpenGL 2 versions for compatiblity with older drivers and OpenGL 3.3 // OpenGL 2 versions for compatiblity with older drivers and OpenGL 3.3
// versions for newer drivers // versions for newer drivers
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
QGLFormat fmt; QGLFormat fmt;
fmt.setVersion(3, 3); fmt.setVersion(3, 3);
fmt.setProfile(QGLFormat::CoreProfile); fmt.setProfile(QGLFormat::CoreProfile);
QGLFormat::setDefaultFormat(fmt); QGLFormat::setDefaultFormat(fmt);
#endif
QSurfaceFormat sfc; QSurfaceFormat sfc;
sfc.setVersion(3, 3); sfc.setVersion(3, 3);
sfc.setProfile(QSurfaceFormat::CoreProfile); sfc.setProfile(QSurfaceFormat::CoreProfile);