mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-12-01 07:01:16 +01:00
27 lines
665 B
C
27 lines
665 B
C
|
#include <QtGlobal>
|
||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) || defined(Q_OS_MAC)
|
||
|
#include <QGLWidget>
|
||
|
#include <QGLFormat>
|
||
|
#else
|
||
|
#include <QOpenGLWidget>
|
||
|
#include <QSurfaceFormat>
|
||
|
#endif
|
||
|
|
||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) || defined(Q_OS_MAC)
|
||
|
#define OPENGL_WIDGET QGLWidget
|
||
|
#else
|
||
|
#define OPENGL_WIDGET QOpenGLWidget
|
||
|
#endif
|
||
|
|
||
|
#if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) || defined(Q_OS_MAC)
|
||
|
#define OPENGL_SET_SAMPLES(samples) \
|
||
|
{QGLFormat fmt; \
|
||
|
fmt.setSamples(samples); \
|
||
|
QGLFormat::setDefaultFormat(fmt);}
|
||
|
#else
|
||
|
#define OPENGL_SET_SAMPLES(samples) \
|
||
|
{QSurfaceFormat fmt; \
|
||
|
fmt.setSamples(samples);\
|
||
|
QSurfaceFormat::setDefaultFormat(fmt);}
|
||
|
#endif
|