summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2016-10-27 11:38:57 +0200
committerLaszlo Agocs <laszlo.agocs@qt.io>2016-11-10 12:16:20 +0000
commite8364f9a4b481207ba6822827e143fb31eccfe51 (patch)
tree9521b1d762627ab3fc274703a5620b75d5391af5 /config.tests
parent5fcda458721c85f7b4209f418b416ffa5c93936e (diff)
Enable GL prototypes with recent Khronos headers
Recent Khronos headers decided to break the world by guarding all function prototypes with GL_GLEXT_PROTOTYPES which has traditionally been used for extension headers only. Until this gets corrected - see https://lists.freedesktop.org/archives/mesa-dev/2016-September/128654.html - add the define to the config tests and qopengl.h. While 5.7 already has some of the qopengl.h fixes due to an upgraded ANGLE shipping with newer headers, this is a cross-platform issue that will surface everywhere eventually. Therefore we target the full set of fixes to 5.6. This time we also make sure the forced define of GL_GLEXT_PROTOTYPES is removed before including the ext header, thus apps get the ext protos only if they actually requested them. Task-number: QTBUG-56764 Change-Id: Ib2c6d2e7b71b8fb8683424f43e6289e64e4ee46c Reviewed-by: Oliver Wolff <oliver.wolff@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/unix/opengldesktop/opengldesktop.cpp1
-rw-r--r--config.tests/unix/opengles2/opengles2.cpp1
-rw-r--r--config.tests/unix/opengles3/opengles3.cpp1
3 files changed, 3 insertions, 0 deletions
diff --git a/config.tests/unix/opengldesktop/opengldesktop.cpp b/config.tests/unix/opengldesktop/opengldesktop.cpp
index 13e3059364..7ca8764a09 100644
--- a/config.tests/unix/opengldesktop/opengldesktop.cpp
+++ b/config.tests/unix/opengldesktop/opengldesktop.cpp
@@ -34,6 +34,7 @@
#ifdef __APPLE__
#include <OpenGL/gl.h>
#else
+#define GL_GLEXT_PROTOTYPES
#include <GL/gl.h>
#endif
diff --git a/config.tests/unix/opengles2/opengles2.cpp b/config.tests/unix/opengles2/opengles2.cpp
index b3b9be6d49..81926f3ee4 100644
--- a/config.tests/unix/opengles2/opengles2.cpp
+++ b/config.tests/unix/opengles2/opengles2.cpp
@@ -34,6 +34,7 @@
#ifdef BUILD_ON_MAC
#include <OpenGLES/ES2/gl.h>
#else
+ #define GL_GLEXT_PROTOTYPES
#include <GLES2/gl2.h>
#endif
diff --git a/config.tests/unix/opengles3/opengles3.cpp b/config.tests/unix/opengles3/opengles3.cpp
index 506ac8b19c..80b2323465 100644
--- a/config.tests/unix/opengles3/opengles3.cpp
+++ b/config.tests/unix/opengles3/opengles3.cpp
@@ -34,6 +34,7 @@
#ifdef BUILD_ON_MAC
#include <OpenGLES/ES3/gl.h>
#else
+ #define GL_GLEXT_PROTOTYPES
#include <GLES3/gl3.h>
#endif