PKGBUILDs/qt5-base/mingw-w64-angle/0005-Support-ANGLE-switches...

95 lines
3.6 KiB
Diff

From 443ebf3f1644a5111fae06cfa248c641d96e1ffb Mon Sep 17 00:00:00 2001
From: Martchus <martchus@gmx.net>
Date: Sun, 18 Sep 2016 13:36:53 +0200
Subject: [PATCH 05/25] Support ANGLE switches via configure shell script
Required when cross-compiling with mingw-w64 because in
this case executing configure.bat is not appropriate
---
configure | 26 ++++++++++++++++++++++++--
src/gui/opengl/qopenglfunctions.h | 2 --
2 files changed, 24 insertions(+), 4 deletions(-)
diff --git a/configure b/configure
index de2c3ec..cf879ff 100755
--- a/configure
+++ b/configure
@@ -1287,6 +1287,7 @@ while [ "$#" -gt 0 ]; do
;;
opengl)
if [ "$VAL" = "auto" ] || [ "$VAL" = "desktop" ] ||
+ [ "$VAL" = "angle" ] || [ "$VAL" = "dynamic" ] ||
[ "$VAL" = "yes" ] || [ "$VAL" = "no" ] ||
[ "$VAL" = "es2" ]; then
CFG_OPENGL="$VAL"
@@ -5312,7 +5313,7 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
fi
if [ "$CFG_OPENGL" = "auto" ] || [ "$CFG_OPENGL" = "yes" ]; then
if compileTest x11/opengl "OpenGL"; then
- CFG_OPENGL=desktop
+ CFG_OPENGL=angle
elif compileTest unix/opengles2 "OpenGL ES 2.0"; then
CFG_OPENGL=es2
else
@@ -5348,6 +5349,17 @@ if [ "$XPLATFORM_MINGW" = "yes" ]; then
echo " ${XQMAKESPEC}."
exit 1
fi
+ elif [ "$CFG_OPENGL" = "angle" ]; then
+ compileTest x11/opengl "OpenGL"
+ if [ $? != "0" ]; then
+ echo "The OpenGL functionality test failed!"
+ echo " You might need to modify the include and library search paths by editing"
+ echo " QMAKE_INCDIR_OPENGL, QMAKE_LIBDIR_OPENGL and QMAKE_LIBS_OPENGL in"
+ echo " ${XQMAKESPEC}."
+ exit 1
+ fi
+ elif [ "$CFG_OPENGL" = "dynamic" ]; then
+ true # FIXME: not sure whether/which test required
elif [ "$CFG_OPENGL" = "desktop" ]; then
# Desktop OpenGL support
compileTest x11/opengl "OpenGL"
@@ -6423,6 +6435,16 @@ if [ "$CFG_OPENGL" = "es2" ]; then
QT_CONFIG="$QT_CONFIG opengles2"
fi
+if [ "$CFG_OPENGL" = "angle" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_ES QT_OPENGL_ES_2"
+ QT_CONFIG="$QT_CONFIG opengles2 egl angle"
+fi
+
+if [ "$CFG_OPENGL" = "dynamic" ]; then
+ QCONFIG_FLAGS="$QCONFIG_FLAGS QT_OPENGL_DYNAMIC"
+ QT_CONFIG="$QT_CONFIG dynamicgl"
+fi
+
if [ "$CFG_SHARED" = "yes" ]; then
QT_CONFIG="$QT_CONFIG shared"
QTCONFIG_CONFIG="$QTCONFIG_CONFIG shared"
@@ -7474,7 +7496,7 @@ report_support " OpenSSL .............." "$CFG_OPENSSL" yes "loading librarie
report_support " NIS ...................." "$CFG_NIS"
report_support " OpenGL / OpenVG:"
report_support " EGL .................." "$CFG_EGL"
-report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+"
+report_support " OpenGL ..............." "$CFG_OPENGL" yes "Desktop OpenGL" es2 "OpenGL ES 2.0+" angle "ANGLE" dynamic "Dynamic OpenGL"
report_support " OpenVG ..............." "$CFG_OPENVG-$CFG_OPENVG_SHIVA" yes-yes "ShivaVG" yes-no "native"
report_support " PCRE ..................." "$CFG_PCRE" yes "system library" qt "bundled copy"
if [ -n "$PKG_CONFIG" ]; then
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h
index f6cd0e5..17214a0 100644
--- a/src/gui/opengl/qopenglfunctions.h
+++ b/src/gui/opengl/qopenglfunctions.h
@@ -56,9 +56,7 @@
//#define Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
-#ifdef QT_OPENGL_ES
typedef double GLdouble;
-#endif
#ifdef Q_ENABLE_OPENGL_FUNCTIONS_DEBUG
#include <stdio.h>
--
2.10.2