diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-13 12:51:51 (GMT) |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-14 12:51:50 (GMT) |
commit | b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40 (patch) | |
tree | 84937c7c4908cfc444fe6645a9373248c69fc946 /src/opengl/qgl.cpp | |
parent | 9ad274406a0f893f9a595aac7031deac2b25afbd (diff) | |
download | Qt-b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40.zip Qt-b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40.tar.gz Qt-b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40.tar.bz2 |
Support building with desktop OpenGL managed via EGL
This mostly replaces lots of QT_OPENGL_ES defines with QT_NO_EGL
instead. It also switches off EGL auto-detection by default. This is
to make sure we default to using GLX on systems with both EGL and
desktop OpenGL. If -opengl es1|es2 or -openvg is specified, then
EGL auto-detection is switched back on (as a requirement. If
configure auto-detects OpenGL ES it also switches on EGL
auto-detection, but failue then just disables both EGL & OpenGL.
As a side effect, this patch also fixes building Qt when both EGL
and glx are avaliable, as they are in Mesa >= 7.8.0.
Reviewed-by: Trond
Task-number: QTBUG-9691
Diffstat (limited to 'src/opengl/qgl.cpp')
-rw-r--r-- | src/opengl/qgl.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 5595e02..4e1a63c 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -49,7 +49,7 @@ #include "private/qpixmap_x11_p.h" #define INT32 dummy_INT32 #define INT8 dummy_INT8 -#if !defined(QT_OPENGL_ES) +#ifdef QT_NO_EGL # include <GL/glx.h> #endif #undef INT32 @@ -1582,7 +1582,7 @@ void QGLContextPrivate::init(QPaintDevice *dev, const QGLFormat &format) # endif vi = 0; #endif -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL ownsEglContext = false; eglContext = 0; eglSurface = EGL_NO_SURFACE; @@ -3950,7 +3950,7 @@ bool QGLWidget::event(QEvent *e) } } -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL // A re-parent is likely to destroy the X11 window and re-create it. It is important // that we free the EGL surface _before_ the winID changes - otherwise we can leak. if (e->type() == QEvent::ParentAboutToChange) @@ -4909,7 +4909,7 @@ void QGLWidget::drawTexture(const QPointF &point, QMacCompatGLuint textureId, QM } #endif -#if !defined(QT_OPENGL_ES_1) +#ifndef QT_OPENGL_ES_1 Q_GLOBAL_STATIC(QGL2PaintEngineEx, qt_gl_2_engine) #endif |