summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@nokia.com>2010-07-19 12:32:08 (GMT)
committerPaul Olav Tvete <paul.tvete@nokia.com>2010-07-19 12:32:08 (GMT)
commit680e7b8fb3b675842a69fb65024942fe838a8dd2 (patch)
treed1b588e71a6e9dea60f006fb1110be66a69093e8 /src/opengl/qgl.cpp
parentdf6549d1b95af017305744af04a7bb3b10025660 (diff)
parente97e3616a33ed93283157514c6b208e071aca8be (diff)
downloadQt-680e7b8fb3b675842a69fb65024942fe838a8dd2.zip
Qt-680e7b8fb3b675842a69fb65024942fe838a8dd2.tar.gz
Qt-680e7b8fb3b675842a69fb65024942fe838a8dd2.tar.bz2
Merge remote branch 'remotes/lighthouse/4.7' into lighthouse-master
Conflicts: src/opengl/qgl_p.h
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r--src/opengl/qgl.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp
index c625c27..5c49543 100644
--- a/src/opengl/qgl.cpp
+++ b/src/opengl/qgl.cpp
@@ -98,7 +98,7 @@
QT_BEGIN_NAMESPACE
-#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
+#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
QGLExtensionFuncs QGLContextPrivate::qt_extensionFuncs;
#endif
@@ -1395,6 +1395,10 @@ QGLFormat::OpenGLVersionFlags QGLFormat::openGLVersionFlags()
}
}
+#ifdef Q_WS_QPA
+ hasOpenGL(); // ### I have no idea why this is needed here, but it makes things work for testlite
+#endif
+
QString versionString(QLatin1String(reinterpret_cast<const char*>(glGetString(GL_VERSION))));
OpenGLVersionFlags versionFlags = qOpenGLVersionFlagsFromString(versionString);
if (currentCtx) {
@@ -1667,7 +1671,10 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format)
# endif
vi = 0;
#endif
-#ifndef QT_NO_EGL
+#if defined(Q_WS_QPA)
+ platformContext = 0;
+#endif
+#if !defined(QT_NO_EGL)
ownsEglContext = false;
eglContext = 0;
eglSurface = EGL_NO_SURFACE;
@@ -2256,7 +2263,7 @@ static void convertToGLFormatHelper(QImage &dst, const QImage &img, GLenum textu
}
}
-#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
+#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
QGLExtensionFuncs& QGLContextPrivate::extensionFuncs(const QGLContext *)
{
return qt_extensionFuncs;
@@ -4070,7 +4077,7 @@ void QGLWidget::resizeOverlayGL(int, int)
/*! \fn bool QGLWidget::event(QEvent *e)
\reimp
*/
-#if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS)
+#if !defined(Q_OS_WINCE) && !defined(Q_WS_QWS) && !defined(Q_WS_QPA)
bool QGLWidget::event(QEvent *e)
{
Q_D(QGLWidget);
@@ -5273,7 +5280,7 @@ void QGLWidgetPrivate::initContext(QGLContext *context, const QGLWidget* shareWi
glcx = new QGLContext(QGLFormat::defaultFormat(), q);
}
-#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS)
+#if defined(Q_WS_X11) || defined(Q_WS_MAC) || defined(Q_WS_QWS) || defined(Q_WS_QPA)
Q_GLOBAL_STATIC(QString, qt_gl_lib_name)
Q_OPENGL_EXPORT void qt_set_gl_library_name(const QString& name)