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_p.h | |
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_p.h')
-rw-r--r-- | src/opengl/qgl_p.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/opengl/qgl_p.h b/src/opengl/qgl_p.h index 1f28b08..ee580a6 100644 --- a/src/opengl/qgl_p.h +++ b/src/opengl/qgl_p.h @@ -64,7 +64,7 @@ #include "qcache.h" #include "qglpaintdevice_p.h" -#if defined(QT_OPENGL_ES) || defined(QT_OPENGL_ES_2) +#ifndef QT_NO_EGL #include <QtGui/private/qegl_p.h> #endif @@ -96,7 +96,7 @@ class QMacWindowChangeEvent; class QWSGLWindowSurface; #endif -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL class QEglContext; #endif @@ -164,7 +164,7 @@ public: #ifdef Q_WS_QWS , wsurf(0) #endif -#if defined(Q_WS_X11) && defined(QT_OPENGL_ES) +#if defined(Q_WS_X11) && !defined(QT_NO_EGL) , eglSurfaceWindowId(0) #endif { @@ -194,7 +194,7 @@ public: QGLContext *olcx; #elif defined(Q_WS_X11) QGLOverlayWidget *olw; -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL void recreateEglSurface(bool force); WId eglSurfaceWindowId; #endif @@ -344,7 +344,7 @@ public: HBITMAP hbitmap; HDC hbitmap_hdc; #endif -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL bool ownsEglContext; QEglContext *eglContext; EGLSurface eglSurface; |