Revert "Move the glxfbconfig configtest to qpa and rename it to glx"

This reverts commit a2d3b7c991. That
commit broke -opengl es2 builds on Linux desktops (when GLX is
available).

/usr/include/GL/gl.h:162:17: error: conflicting declaration ‘typedef double GLdouble’
qopengl.h:97:17: error: ‘GLdouble’ has a previous declaration as ‘typedef GLfloat GLdouble’

Change-Id: Id5f48c05803be1a8c03eeffca139b80e9a85a0eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
This commit is contained in:
Thiago Macieira 2013-12-07 08:49:34 +01:00 committed by The Qt Project
parent 105d10dea9
commit 8be546d107
4 changed files with 26 additions and 38 deletions

View File

@ -44,7 +44,6 @@
int main(int, char **) int main(int, char **)
{ {
//We require glxfbconfig, ie. glx 1.3
GLXFBConfig config; GLXFBConfig config;
config = 0; config = 0;

View File

@ -1,4 +1,4 @@
SOURCES = glx.cpp SOURCES = glxfbconfig.cpp
CONFIG += x11 CONFIG += x11
INCLUDEPATH += $$QMAKE_INCDIR_OPENGL INCLUDEPATH += $$QMAKE_INCDIR_OPENGL

59
configure vendored
View File

@ -611,7 +611,6 @@ CFG_OPENVG_LC_INCLUDES=no
CFG_OPENVG_SHIVA=auto CFG_OPENVG_SHIVA=auto
CFG_OPENVG_ON_OPENGL=auto CFG_OPENVG_ON_OPENGL=auto
CFG_EGL=auto CFG_EGL=auto
CFG_GLX=auto
CFG_SSE=auto CFG_SSE=auto
CFG_FONTCONFIG=auto CFG_FONTCONFIG=auto
CFG_FREETYPE=auto CFG_FREETYPE=auto
@ -1482,13 +1481,6 @@ while [ "$#" -gt 0 ]; do
UNKNOWN_OPT=yes UNKNOWN_OPT=yes
fi fi
;; ;;
glx)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_GLX="$VAL"
else
UNKNOWN_OPT=yes
fi
;;
pch) pch)
if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then if [ "$VAL" = "yes" ] || [ "$VAL" = "no" ]; then
CFG_PRECOMPILE="$VAL" CFG_PRECOMPILE="$VAL"
@ -4911,6 +4903,19 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
fi fi
CFG_OPENGL=no CFG_OPENGL=no
fi fi
case "$PLATFORM" in
hpux*)
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
if [ "$CFG_OPENGL" = "desktop" ]; then
compileTest x11/glxfbconfig "OpenGL"
if [ $? != "0" ]; then
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
fi
fi
;;
*)
;;
esac
elif [ "$CFG_OPENGL" = "es2" ]; then elif [ "$CFG_OPENGL" = "es2" ]; then
#OpenGL ES 2.x #OpenGL ES 2.x
compileTest unix/opengles2 "OpenGL ES 2.x" compileTest unix/opengles2 "OpenGL ES 2.x"
@ -4931,6 +4936,17 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
echo " ${XQMAKESPEC}." echo " ${XQMAKESPEC}."
exit 1 exit 1
fi fi
case "$PLATFORM" in
hpux*)
# HP-UX have buggy glx headers; check if we really need to define the GLXFBConfig struct.
compileTest x11/glxfbconfig "OpenGL"
if [ $? != "0" ]; then
QMakeVar add DEFINES QT_DEFINE_GLXFBCONFIG_STRUCT
fi
;;
*)
;;
esac
fi fi
fi # X11/MINGW OpenGL fi # X11/MINGW OpenGL
@ -5289,24 +5305,6 @@ if [ "$CFG_EGL" != "no" ]; then
fi fi
fi fi
# GLX Support
if [ "$CFG_GLX" != "no" ]; then
if [ "$CFG_GLX" = "yes" ] && [ "$CFG_OPENGL" = "no" ]; then
echo "GLX support was requested but OpenGL support is disabled."
echo "Either disable GLX support or enable OpenGL support."
exit 101
fi
if compileTest qpa/glx "GLX"; then
CFG_GLX=yes
elif [ "$CFG_GLX" = "yes" ]; then
echo " The GLX functionality test failed; GLX is required by the xcb plugin to manage contexts & surfaces."
exit 1
else
CFG_GLX=no
fi
fi
if [ "$CFG_EGLFS" != "no" ]; then if [ "$CFG_EGLFS" != "no" ]; then
if [ "$XPLATFORM_QNX" = "no" ]; then if [ "$XPLATFORM_QNX" = "no" ]; then
CFG_EGLFS="$CFG_EGL" CFG_EGLFS="$CFG_EGL"
@ -5677,13 +5675,6 @@ else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL" QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_EGL"
fi fi
# enable glx
if [ "$CFG_GLX" = "yes" ]; then
QT_CONFIG="$QT_CONFIG glx"
else
QCONFIG_FLAGS="$QCONFIG_FLAGS QT_NO_GLX"
fi
# enable eglfs # enable eglfs
if [ "$CFG_EGLFS" = "yes" ]; then if [ "$CFG_EGLFS" = "yes" ]; then
QT_CONFIG="$QT_CONFIG eglfs" QT_CONFIG="$QT_CONFIG eglfs"
@ -6719,8 +6710,6 @@ else
report_support " pkg-config ............. no" report_support " pkg-config ............. no"
fi fi
report_support " PulseAudio ............." "$CFG_PULSEAUDIO" report_support " PulseAudio ............." "$CFG_PULSEAUDIO"
report_support " EGL ...................." "$CFG_EGL"
report_support " GLX ...................." "$CFG_GLX"
report_support " QPA backends:" report_support " QPA backends:"
report_support " DirectFB ............." "$CFG_DIRECTFB" report_support " DirectFB ............." "$CFG_DIRECTFB"
report_support " EGLFS ................" "$CFG_EGLFS" report_support " EGLFS ................" "$CFG_EGLFS"

View File

@ -81,7 +81,7 @@ contains(QT_CONFIG, xcb-sm) {
} }
contains(QT_CONFIG, opengl) { contains(QT_CONFIG, opengl) {
contains(QT_CONFIG, xcb-xlib):contains(QT_CONFIG, glx) { contains(QT_CONFIG, xcb-xlib):!contains(QT_CONFIG, opengles2) {
DEFINES += XCB_USE_GLX DEFINES += XCB_USE_GLX
HEADERS += qglxintegration.h HEADERS += qglxintegration.h
SOURCES += qglxintegration.cpp SOURCES += qglxintegration.cpp