summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2011-01-05 08:04:37 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2011-01-05 16:17:46 (GMT)
commit1462a7ba51d25a7d022eab5533885cb1ed1c4c5c (patch)
tree496705a1e6d29cafc45d7392982f6fefa2aff823 /src/plugins/platforms
parent4c15dbb1eddb7bb3f3b72508be865feb97679d42 (diff)
downloadQt-1462a7ba51d25a7d022eab5533885cb1ed1c4c5c.zip
Qt-1462a7ba51d25a7d022eab5533885cb1ed1c4c5c.tar.gz
Qt-1462a7ba51d25a7d022eab5533885cb1ed1c4c5c.tar.bz2
Lighthouse: Make testlite compile on systems where QtOpenGL is ES2
compatible. Ie. it does not have glx. Haven't made the egl integration yet for testlite
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.cpp3
-rw-r--r--src/plugins/platforms/testlite/qglxintegration.h3
-rw-r--r--src/plugins/platforms/testlite/qtestliteintegration.cpp6
-rw-r--r--src/plugins/platforms/testlite/qtestlitewindow.cpp8
4 files changed, 14 insertions, 6 deletions
diff --git a/src/plugins/platforms/testlite/qglxintegration.cpp b/src/plugins/platforms/testlite/qglxintegration.cpp
index 1dffb3e..8023014 100644
--- a/src/plugins/platforms/testlite/qglxintegration.cpp
+++ b/src/plugins/platforms/testlite/qglxintegration.cpp
@@ -46,6 +46,7 @@
#include "qtestlitewindow.h"
#include "qtestlitescreen.h"
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
#include <X11/Xlib.h>
#include <X11/Xutil.h>
#include <GL/glx.h>
@@ -371,3 +372,5 @@ QPlatformWindowFormat QGLXContext::platformWindowFormat() const
}
QT_END_NAMESPACE
+
+#endif //!defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
diff --git a/src/plugins/platforms/testlite/qglxintegration.h b/src/plugins/platforms/testlite/qglxintegration.h
index 5ae0b2a..abece45 100644
--- a/src/plugins/platforms/testlite/qglxintegration.h
+++ b/src/plugins/platforms/testlite/qglxintegration.h
@@ -49,6 +49,7 @@
#include <QtCore/QMutex>
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
#include <GL/glx.h>
QT_BEGIN_NAMESPACE
@@ -88,4 +89,6 @@ private:
QT_END_NAMESPACE
+#endif //!defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
+
#endif
diff --git a/src/plugins/platforms/testlite/qtestliteintegration.cpp b/src/plugins/platforms/testlite/qtestliteintegration.cpp
index 537e22a..5dbe1e7 100644
--- a/src/plugins/platforms/testlite/qtestliteintegration.cpp
+++ b/src/plugins/platforms/testlite/qtestliteintegration.cpp
@@ -49,8 +49,10 @@
#include "qtestlitescreen.h"
#include "qtestliteclipboard.h"
-#ifndef QT_NO_OPENGL
+#if !defined(QT_NO_OPENGL)
+#if !defined(QT_OPENGL_ES_2)
#include <GL/glx.h>
+#endif //!defined(QT_OPENGL_ES_2)
#include <private/qwindowsurface_gl_p.h>
#include <private/qpixmapdata_gl_p.h>
#endif //QT_NO_OPENGL
@@ -128,7 +130,7 @@ QPlatformClipboard * QTestLiteIntegration::clipboard() const
bool QTestLiteIntegration::hasOpenGL() const
{
-#ifndef QT_NO_OPENGL
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
QTestLiteScreen *screen = static_cast<const QTestLiteScreen *>(mScreens.at(0));
return glXQueryExtension(screen->display(), 0, 0) != 0;
#endif
diff --git a/src/plugins/platforms/testlite/qtestlitewindow.cpp b/src/plugins/platforms/testlite/qtestlitewindow.cpp
index e8d40d7..18fab4a 100644
--- a/src/plugins/platforms/testlite/qtestlitewindow.cpp
+++ b/src/plugins/platforms/testlite/qtestlitewindow.cpp
@@ -54,7 +54,7 @@
#include <QtGui/private/qwindowsurface_p.h>
#include <QtGui/private/qapplication_p.h>
-#ifndef QT_NO_OPENGL
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
#include "qglxintegration.h"
#endif
@@ -74,7 +74,7 @@ QTestLiteWindow::QTestLiteWindow(QWidget *window)
if(window->platformWindowFormat().windowApi() == QPlatformWindowFormat::OpenGL
&& QApplicationPrivate::platformIntegration()->hasOpenGL() ) {
-#ifndef QT_NO_OPENGL
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
XVisualInfo *visualInfo = QGLXContext::findVisualInfo(mScreen,window->platformWindowFormat());
Colormap cmap = XCreateColormap(mScreen->display(),mScreen->rootWindow(),visualInfo->visual,AllocNone);
@@ -83,7 +83,7 @@ QTestLiteWindow::QTestLiteWindow(QWidget *window)
x_window = XCreateWindow(mScreen->display(), mScreen->rootWindow(),x, y, w, h,
0, visualInfo->depth, InputOutput, visualInfo->visual,
CWColormap, &a);
-#endif //QT_NO_OPENGL
+#endif //!defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
} else {
x_window = XCreateSimpleWindow(mScreen->display(), mScreen->rootWindow(),
x, y, w, h, 0 /*border_width*/,
@@ -548,7 +548,7 @@ QPlatformGLContext *QTestLiteWindow::glContext() const
return 0;
if (!mGLContext) {
QTestLiteWindow *that = const_cast<QTestLiteWindow *>(this);
-#ifndef QT_NO_OPENGL
+#if !defined(QT_NO_OPENGL) && !defined(QT_OPENGL_ES_2)
that->mGLContext = new QGLXContext(x_window, mScreen,widget()->platformWindowFormat());
#endif
}