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 <laszlo.agocs@digia.com>
bb10
Morten Johan Sørvig 2014-04-23 14:29:03 +02:00 committed by The Qt Project
parent 2b88e9973b
commit cafa3848e2
1 changed files with 5 additions and 1 deletions

View File

@ -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<void (*)(GLenum, GLint, GLint, GLsizei, GLsizei, GLint, GLenum, GLenum, const GLvoid *)>(glTexImage2D);
#else
TexImage2D = glTexImage2D;
#endif
TexParameterf = ::glTexParameterf;
TexParameterfv = ::glTexParameterfv;
TexParameteri = ::glTexParameteri;