OpenGL: Add missing WINAPI calling convention for QGL functions
authorSean Harmer <sean.harmer@kdab.com>
Thu, 11 Oct 2012 13:08:45 +0000 (14:08 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Sat, 13 Oct 2012 03:51:19 +0000 (05:51 +0200)
This is the QGL equivalent of commit

602cab9bb2072c5564bbb43c4125e04f98266043

Without this QGLExtensionMatcher causes stack corruption when using
a core profile GL context due to the call to glGetStringi() with
an incorrect calling convention.

Change-Id: Ibd86645e04df8c650c182fecfc8c481dae8a75b2
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
src/opengl/qglfunctions.h

index 3989063..4318f53 100644 (file)
@@ -61,6 +61,9 @@ QT_BEGIN_NAMESPACE
 typedef ptrdiff_t qgl_GLintptr;
 typedef ptrdiff_t qgl_GLsizeiptr;
 
+#if defined(APIENTRY) && !defined(QGLF_APIENTRY)
+#   define QGLF_APIENTRY APIENTRY
+#endif
 
 # ifndef QGLF_APIENTRYP
 #   ifdef QGLF_APIENTRY