Update qopenglext.h and qopengles2ext.h

The current one is from 2012 and is based on the obsolete spec files.
Replace it with the new one generated from the XML specs.

At the same time fix the callback function signature for QOpenGLDebugLogger
since it would not build otherwise. The user parameter is const GLvoid *
according to the specification.

Task-number: QTBUG-39773
Change-Id: If2153198373eeebc587c41b2dbf6bed5bcb26761
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
This commit is contained in:
Laszlo Agocs 2014-06-20 14:50:17 +02:00 committed by Giuseppe D'Angelo
parent d06c060de4
commit d147535322
4 changed files with 11283 additions and 12759 deletions

View File

@ -265,7 +265,7 @@ struct _cl_event;
#endif
#ifndef GL_ARB_debug_output
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
#endif
#ifndef GL_AMD_debug_output
@ -273,7 +273,7 @@ typedef void (APIENTRY *GLDEBUGPROCAMD)(GLuint id,GLenum category,GLenum severit
#endif
#ifndef GL_KHR_debug
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
#endif
#ifndef GL_NV_vdpau_interop

View File

@ -460,6 +460,17 @@ QT_BEGIN_NAMESPACE
connecting to the messageLogged() signal.
*/
// When using OpenGL ES 2.0, all the necessary GL_KHR_debug constants are
// provided in qopengles2ext.h. Unfortunately, newer versions of that file
// suffix everything with _KHR which causes extra headache when the goal is
// to have a single piece of code that builds in all our target
// environments. Therefore, try to detect this and use our custom defines
// instead, which we anyway need for OS X.
#if defined(GL_KHR_debug) && defined(GL_DEBUG_SOURCE_API_KHR)
#define USE_MANUAL_DEFS
#endif
// Under OSX (at least up to 10.8) we cannot include our copy of glext.h,
// but we use the system-wide one, which unfortunately lacks all the needed
// defines/typedefs. In order to make the code compile, we just add here
@ -467,6 +478,10 @@ QT_BEGIN_NAMESPACE
#ifndef GL_KHR_debug
#define GL_KHR_debug 1
#define USE_MANUAL_DEFS
#endif
#ifdef USE_MANUAL_DEFS
#ifndef GL_DEBUG_OUTPUT_SYNCHRONOUS
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
@ -589,9 +604,9 @@ QT_BEGIN_NAMESPACE
#define GL_STACK_UNDERFLOW 0x0504
#endif
typedef void (QOPENGLF_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,GLvoid *userParam);
typedef void (QOPENGLF_APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const GLvoid *userParam);
#endif /* GL_KHR_debug */
#endif /* USE_MANUAL_DEFS */
/*!
@ -1276,9 +1291,9 @@ static void QOPENGLF_APIENTRY qt_opengl_debug_callback(GLenum source,
GLenum severity,
GLsizei length,
const GLchar *rawMessage,
GLvoid *userParam)
const GLvoid *userParam)
{
QOpenGLDebugLoggerPrivate *loggerPrivate = static_cast<QOpenGLDebugLoggerPrivate *>(userParam);
QOpenGLDebugLoggerPrivate *loggerPrivate = static_cast<QOpenGLDebugLoggerPrivate *>(const_cast<GLvoid *>(userParam));
loggerPrivate->handleMessage(source, type, id, severity, length, rawMessage);
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff