From 379886d24b9b0a88930dc479db2217c15381814f Mon Sep 17 00:00:00 2001 From: Sean Harmer Date: Thu, 14 Mar 2013 17:11:52 +0000 Subject: Fix calling convention in ANGLE builds on Windows Desktop OpenGL builds on windows correctly define APIENTRY whereas at present the ES2 (ANGLE) builds do not. This leads to QOPENGLF_APIENTRY having the wrong calling convention. This fix is required for https://codereview.qt-project.org/#change,48660 but may also fix any random crashes that people may be seeing with other Qt-wrapped OpenGL functions in ANGLE builds. Change-Id: I8068c181d41be949d29168bd5ca1a181cc2245c7 Reviewed-by: Giuseppe D'Angelo Reviewed-by: Friedemann Kleint --- src/gui/opengl/qopengl.h | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/gui') diff --git a/src/gui/opengl/qopengl.h b/src/gui/opengl/qopengl.h index 0613527333..c5bff90d2a 100644 --- a/src/gui/opengl/qopengl.h +++ b/src/gui/opengl/qopengl.h @@ -46,6 +46,11 @@ #include +// Windows always needs this to ensure that APIENTRY gets defined +#if defined(Q_OS_WIN) +# include +#endif + // Note: Mac OSX is a "controlled platform" for OpenGL ABI so we // use the system provided headers there. Controlled means that the // headers always match the actual driver implementation so there @@ -101,9 +106,6 @@ typedef GLfloat GLdouble; # endif # include # else -# if defined(Q_OS_WIN) -# include -# endif # define GL_GLEXT_LEGACY // Prevents GL/gl.h form #including system glext.h # include # include -- cgit v1.2.3