diff options
author | Jason Barron <jason.barron@digia.com> | 2012-10-15 13:28:29 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-16 02:47:46 +0200 |
commit | c967c9ec7fee7270496bb2ee7c945e0b1f62f2f8 (patch) | |
tree | c140378d1ab792cdf4a6c5925d99037438a963f9 /src | |
parent | 3e095fcbf5534d868e39265e4bf87d2a2c258530 (diff) |
Ensure QOPENGLF_APIENTRY and QGLF_APIENTRY are set correctly.
gl2ext.h only defines GL_APIENTRY and not APIENTRY so we should use
this macro if it is available. Without it, code that uses
QOPENGLF_APIENTRY and QGLF_APIENTRY might experience compile errors
due to the differing signatures.
Task-number: QTBUG-27313
Change-Id: Id79d934825928d9913138edc6e8f1b00edc89a8d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/opengl/qopenglfunctions.h | 2 | ||||
-rw-r--r-- | src/opengl/qglfunctions.h | 2 |
2 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/opengl/qopenglfunctions.h b/src/gui/opengl/qopenglfunctions.h index 54633ff208..f035e26d81 100644 --- a/src/gui/opengl/qopenglfunctions.h +++ b/src/gui/opengl/qopenglfunctions.h @@ -83,6 +83,8 @@ typedef ptrdiff_t qopengl_GLsizeiptr; #if defined(APIENTRY) && !defined(QOPENGLF_APIENTRY) # define QOPENGLF_APIENTRY APIENTRY +#elif defined(GL_APIENTRY) && !defined(QOPENGLF_APIENTRY) +# define QOPENGLF_APIENTRY GL_APIENTRY #endif # ifndef QOPENGLF_APIENTRYP diff --git a/src/opengl/qglfunctions.h b/src/opengl/qglfunctions.h index 4318f538df..3d49b3ea3b 100644 --- a/src/opengl/qglfunctions.h +++ b/src/opengl/qglfunctions.h @@ -63,6 +63,8 @@ typedef ptrdiff_t qgl_GLsizeiptr; #if defined(APIENTRY) && !defined(QGLF_APIENTRY) # define QGLF_APIENTRY APIENTRY +#elif defined(GL_APIENTRY) && !defined(QGLF_APIENTRY) +# define QGLF_APIENTRY GL_APIENTRY #endif # ifndef QGLF_APIENTRYP |