Fix compilation on Harmattan
authorSimon Hausmann <simon.hausmann@nokia.com>
Thu, 13 Sep 2012 10:52:49 +0000 (12:52 +0200)
committerQt by Nokia <qt-info@nokia.com>
Fri, 14 Sep 2012 09:15:01 +0000 (11:15 +0200)
The GLES2 libraries on Harmattan do not provide a typedef for GLChar.  Work
around it here by adding it. The Kkronos headers specify GLChar as a typedef to
char, so if an implementation already provides it, then this doesn't do any
harm.

Change-Id: I0848b72b81fcc602dc8d9eecefdacb5436163040
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
src/gui/opengl/qopengl.h

index 809b821..f5c2f5d 100644 (file)
@@ -54,6 +54,15 @@ QT_BEGIN_HEADER
 # else
 #  include <GLES2/gl2.h>
 # endif
+
+/*
+   Some GLES2 implementations (like the one on Harmattan) are missing the
+   typedef for GLchar. Work around it here by adding it. The Kkronos headers
+   specify GLChar as a typedef to char, so if an implementation already
+   provides it, then this doesn't do any harm.
+*/
+typedef char GLchar;
+
 # include "qopengles2ext.h"
 # ifndef GL_DOUBLE
 #  define GL_DOUBLE GL_FLOAT