summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDaniel Schürmann <daschuer@mixxx.org>2015-12-15 00:28:23 +0100
committerDaniel Schürmann <daschuer@mixxx.org>2015-12-15 00:28:23 +0100
commit05e0a90ff0f7e57c024ebe6b7a700aceba04dc24 (patch)
treefc4ea4dcbc736bab712072252b6bea14dfaab1d3 /src
parentebd8dbc8d4dc0765c820ce6d79c1aa404ba69227 (diff)
Try to fix compiling wit EGL2
Diffstat (limited to 'src')
-rw-r--r--src/waveform/vsyncthread.cpp5
-rw-r--r--src/waveform/vsyncthread.h20
2 files changed, 11 insertions, 14 deletions
diff --git a/src/waveform/vsyncthread.cpp b/src/waveform/vsyncthread.cpp
index 26bfcc06f5..35e3603a12 100644
--- a/src/waveform/vsyncthread.cpp
+++ b/src/waveform/vsyncthread.cpp
@@ -1,5 +1,4 @@
#include <QThread>
-#include <QGLWidget>
#include <QGLFormat>
#include <QTime>
#include <QtDebug>
@@ -132,8 +131,12 @@ void VSyncThread::swapGl(QGLWidget* glw, int index) {
glw->swapBuffers();
#else
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+#ifdef QT_OPENGL_ES_2
+ glw->swapBuffers();
+#else
const QX11Info *xinfo = qt_x11Info(glw);
glXSwapBuffers(xinfo->display(), glw->winId());
+#endif
#else
glw->swapBuffers();
#endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
diff --git a/src/waveform/vsyncthread.h b/src/waveform/vsyncthread.h
index ecc597fe60..1016d96dcd 100644
--- a/src/waveform/vsyncthread.h
+++ b/src/waveform/vsyncthread.h
@@ -5,6 +5,7 @@
#include <QThread>
#include <QSemaphore>
#include <QPair>
+#include <QGLWidget>
#if defined(__APPLE__)
@@ -12,26 +13,19 @@
#else
#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
+#ifndef QT_OPENGL_ES_2
#include <qx11info_x11.h>
-#endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
-#endif
-
-#include "util/performancetimer.h"
-
-
-#if defined(__APPLE__)
-
-#elif defined(__WINDOWS__)
-
-#else
#include <GL/glx.h>
- #include "GL/glxext.h"
+ //#include "GL/glxext.h"
// clean up after Xlib.h, which #defines values that conflict with QT.
#undef Bool
#undef Unsorted
+#endif // QT_OPENGL_ES_2
+#endif // QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
#endif
-class QGLWidget;
+#include "util/performancetimer.h"
+
class GuiTick;
class MixxxMainWindow;