diff options
author | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-13 14:51:51 +0200 |
---|---|---|
committer | Tom Cooksey <thomas.cooksey@nokia.com> | 2010-04-14 14:51:50 +0200 |
commit | b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40 (patch) | |
tree | 84937c7c4908cfc444fe6645a9373248c69fc946 /src/opengl/qglpixelbuffer_p.h | |
parent | 9ad274406a0f893f9a595aac7031deac2b25afbd (diff) | |
download | qt4-tools-b331a74b8fd71ba803e2cf2a9e0c49e1d3538f40.tar.gz |
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/qglpixelbuffer_p.h')
-rw-r--r-- | src/opengl/qglpixelbuffer_p.h | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/opengl/qglpixelbuffer_p.h b/src/opengl/qglpixelbuffer_p.h index c85dc5a4cd..2a1f671aea 100644 --- a/src/opengl/qglpixelbuffer_p.h +++ b/src/opengl/qglpixelbuffer_p.h @@ -60,7 +60,7 @@ QT_BEGIN_INCLUDE_NAMESPACE #include <private/qgl_p.h> #include <private/qglpaintdevice_p.h> -#if defined(Q_WS_X11) && !defined(QT_OPENGL_ES) +#if defined(Q_WS_X11) && defined(QT_NO_EGL) #include <GL/glx.h> // The below is needed to for compilation on HPUX, due to broken GLX @@ -127,10 +127,8 @@ struct GLXFBConfig { #elif defined(Q_WS_WIN) DECLARE_HANDLE(HPBUFFERARB); -#elif defined(QT_OPENGL_ES_2) -#include <EGL/egl.h> -#elif defined(QT_OPENGL_ES) -#include <GLES/egl.h> +#elif !defined(QT_NO_EGL) +#include <QtGui/private/qegl_p.h> #endif QT_END_INCLUDE_NAMESPACE @@ -174,7 +172,7 @@ public: QPointer<QGLWidget> req_shareWidget; QSize req_size; -#if defined(Q_WS_X11) && !defined(QT_OPENGL_ES) +#if defined(Q_WS_X11) && defined(QT_NO_EGL) GLXPbuffer pbuf; GLXContext ctx; #elif defined(Q_WS_WIN) @@ -195,7 +193,7 @@ public: AGLContext share_ctx; # endif #endif -#if defined(QT_OPENGL_ES) +#ifndef QT_NO_EGL EGLSurface pbuf; QEglContext *ctx; int textureFormat; |