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>
bb10
Jason Barron 2012-10-15 13:28:29 +02:00 committed by The Qt Project
parent 3e095fcbf5
commit c967c9ec7f
2 changed files with 4 additions and 0 deletions

View File

@ -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

View File

@ -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