From cafa3848e2315d851a338c9821fb4cb47db511be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Morten=20Johan=20S=C3=B8rvig?= Date: Wed, 23 Apr 2014 14:29:03 +0200 Subject: QOpenGLFunctions: Compile on Mac OS 10.6 The 10.6 OpenGL headers have "GLenum" as the type for the 3rd argument. The OpenGL standard has "Glint", which is also what Qt expects. Work around this by casting the pointer type. Task-id: QTBUG-38406 Change-Id: I6d820f41e0d14cbc2d50d91997b6c40b626b159f Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglfunctions.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gui/opengl/qopenglfunctions.cpp b/src/gui/opengl/qopenglfunctions.cpp index af536fa927..85b893e434 100644 --- a/src/gui/opengl/qopenglfunctions.cpp +++ b/src/gui/opengl/qopenglfunctions.cpp @@ -3282,7 +3282,11 @@ QOpenGLFunctionsPrivate::QOpenGLFunctionsPrivate(QOpenGLContext *) StencilFunc = ::glStencilFunc; StencilMask = ::glStencilMask; StencilOp = ::glStencilOp; - TexImage2D = ::glTexImage2D; +#if defined(Q_OS_OSX) && MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7 + TexImage2D = reinterpret_cast(glTexImage2D); +#else + TexImage2D = glTexImage2D; +#endif TexParameterf = ::glTexParameterf; TexParameterfv = ::glTexParameterfv; TexParameteri = ::glTexParameteri; -- cgit v1.2.3