Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qopengldebug.cpp File Reference

(df9d882d41b741fef7c5beeddb0abe9d904443d8)

#include <QtCore/private/qobject_p.h>
#include <QtCore/qglobal.h>
#include <QtCore/qvarlengtharray.h>
#include <QtGui/qopengl.h>
#include <QtGui/qopenglfunctions.h>
#include <QtGui/qoffscreensurface.h>
#include "qopengldebug.h"
#include "moc_qopengldebug.cpp"
+ Include dependency graph for qopengldebug.cpp:

Go to the source code of this file.

Classes

class  QOpenGLDebugMessagePrivate
 
class  QOpenGLDebugLoggerPrivate
 

Macros

#define GL_KHR_debug   1
 
#define USE_MANUAL_DEFS
 
#define GL_DEBUG_OUTPUT_SYNCHRONOUS   0x8242
 
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH   0x8243
 
#define GL_DEBUG_CALLBACK_FUNCTION   0x8244
 
#define GL_DEBUG_CALLBACK_USER_PARAM   0x8245
 
#define GL_DEBUG_SOURCE_API   0x8246
 
#define GL_DEBUG_SOURCE_WINDOW_SYSTEM   0x8247
 
#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248
 
#define GL_DEBUG_SOURCE_THIRD_PARTY   0x8249
 
#define GL_DEBUG_SOURCE_APPLICATION   0x824A
 
#define GL_DEBUG_SOURCE_OTHER   0x824B
 
#define GL_DEBUG_TYPE_ERROR   0x824C
 
#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR   0x824D
 
#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR   0x824E
 
#define GL_DEBUG_TYPE_PORTABILITY   0x824F
 
#define GL_DEBUG_TYPE_PERFORMANCE   0x8250
 
#define GL_DEBUG_TYPE_OTHER   0x8251
 
#define GL_DEBUG_TYPE_MARKER   0x8268
 
#define GL_DEBUG_TYPE_PUSH_GROUP   0x8269
 
#define GL_DEBUG_TYPE_POP_GROUP   0x826A
 
#define GL_DEBUG_SEVERITY_NOTIFICATION   0x826B
 
#define GL_MAX_DEBUG_GROUP_STACK_DEPTH   0x826C
 
#define GL_DEBUG_GROUP_STACK_DEPTH   0x826D
 
#define GL_BUFFER   0x82E0
 
#define GL_SHADER   0x82E1
 
#define GL_PROGRAM   0x82E2
 
#define GL_QUERY   0x82E3
 
#define GL_PROGRAM_PIPELINE   0x82E4
 
#define GL_SAMPLER   0x82E6
 
#define GL_DISPLAY_LIST   0x82E7
 
#define GL_MAX_LABEL_LENGTH   0x82E8
 
#define GL_MAX_DEBUG_MESSAGE_LENGTH   0x9143
 
#define GL_MAX_DEBUG_LOGGED_MESSAGES   0x9144
 
#define GL_DEBUG_LOGGED_MESSAGES   0x9145
 
#define GL_DEBUG_SEVERITY_HIGH   0x9146
 
#define GL_DEBUG_SEVERITY_MEDIUM   0x9147
 
#define GL_DEBUG_SEVERITY_LOW   0x9148
 
#define GL_DEBUG_OUTPUT   0x92E0
 
#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002
 
#define GL_STACK_OVERFLOW   0x0503
 
#define GL_STACK_UNDERFLOW   0x0504
 
#define CONVERT_TO_GL_DEBUG_MESSAGE_CONTROL_PARAMETERS(type, source, target)
 
#define GET_DEBUG_PROC_ADDRESS(procName)
 

Typedefs

typedef void(QOPENGLF_APIENTRYGLDEBUGPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam)
 
typedef GLenum type
 
typedef GLenum GLenum severity
 
typedef GLenum GLenum GLsizei count
 
typedef GLenum GLenum GLsizei const GLuintids
 
typedef GLenum GLenum GLsizei const GLuint GLboolean enabled
 
typedef GLenum GLuint id
 
typedef GLenum GLuint GLenum GLsizei length
 
typedef GLenum GLuint GLenum GLsizei const GLcharbuf
 
typedef const voiduserParam
 
typedef GLsizei bufsize
 
typedef GLsizei GLenumsources
 
typedef GLsizei GLenum GLenumtypes
 
typedef GLsizei GLenum GLenum GLuint GLenumseverities
 
typedef GLsizei GLenum GLenum GLuint GLenum GLsizeilengths
 
typedef GLsizei GLenum GLenum GLuint GLenum GLsizei GLcharmessageLog
 
typedef GLuint GLsizei const GLcharmessage
 
typedef GLvoid ** params
 

Functions

static QOpenGLDebugMessage::Source qt_messageSourceFromGL (GLenum source)
 
static GLenum qt_messageSourceToGL (QOpenGLDebugMessage::Source source)
 
static QString qt_messageSourceToString (QOpenGLDebugMessage::Source source)
 
static QOpenGLDebugMessage::Type qt_messageTypeFromGL (GLenum type)
 
static GLenum qt_messageTypeToGL (QOpenGLDebugMessage::Type type)
 
static QString qt_messageTypeToString (QOpenGLDebugMessage::Type type)
 
static QOpenGLDebugMessage::Severity qt_messageSeverityFromGL (GLenum severity)
 
static GLenum qt_messageSeverityToGL (QOpenGLDebugMessage::Severity severity)
 
static QString qt_messageSeverityToString (QOpenGLDebugMessage::Severity severity)
 
typedef void (QOPENGLF_APIENTRYP qt_glDebugMessageControl_t)(GLenum source
 
typedef GLuint (QOPENGLF_APIENTRYP qt_glGetDebugMessageLog_t)(GLuint count
 
static void QOPENGLF_APIENTRY qt_opengl_debug_callback (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *rawMessage, const GLvoid *userParam)
 

Macro Definition Documentation

◆ CONVERT_TO_GL_DEBUG_MESSAGE_CONTROL_PARAMETERS

#define CONVERT_TO_GL_DEBUG_MESSAGE_CONTROL_PARAMETERS ( type,
source,
target )
Value:
if (source == QOpenGLDebugMessage::Any ## type) { \
target << GL_DONT_CARE; \
} else { \
for (uint i = 1; i <= QOpenGLDebugMessage::Last ## type; i = i << 1) \
if (source.testFlag(QOpenGLDebugMessage:: type (i))) \
}
Type type() const
Returns the type of the debug message.
static Q_NEVER_INLINE void qt_message(QtMsgType msgType, const QMessageLogContext &context, const char *msg, va_list ap)
Definition qlogging.cpp:374
GLenum type
GLenum type
GLenum target
GLsizei GLsizei GLchar * source
unsigned int uint
Definition qtypes.h:34

◆ GET_DEBUG_PROC_ADDRESS

#define GET_DEBUG_PROC_ADDRESS ( procName)
Value:
d->procName = reinterpret_cast< qt_ ## procName ## _t >( \
d->context->getProcAddress(d->context->isOpenGLES() ? (#procName "KHR") : (#procName)) \
);

◆ GL_BUFFER

#define GL_BUFFER   0x82E0

Definition at line 471 of file qopengldebug.cpp.

◆ GL_CONTEXT_FLAG_DEBUG_BIT

#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002

Definition at line 516 of file qopengldebug.cpp.

◆ GL_DEBUG_CALLBACK_FUNCTION

#define GL_DEBUG_CALLBACK_FUNCTION   0x8244

Definition at line 411 of file qopengldebug.cpp.

◆ GL_DEBUG_CALLBACK_USER_PARAM

#define GL_DEBUG_CALLBACK_USER_PARAM   0x8245

Definition at line 414 of file qopengldebug.cpp.

◆ GL_DEBUG_GROUP_STACK_DEPTH

#define GL_DEBUG_GROUP_STACK_DEPTH   0x826D

Definition at line 468 of file qopengldebug.cpp.

◆ GL_DEBUG_LOGGED_MESSAGES

#define GL_DEBUG_LOGGED_MESSAGES   0x9145

Definition at line 501 of file qopengldebug.cpp.

◆ GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH

#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH   0x8243

Definition at line 408 of file qopengldebug.cpp.

◆ GL_DEBUG_OUTPUT

#define GL_DEBUG_OUTPUT   0x92E0

Definition at line 513 of file qopengldebug.cpp.

◆ GL_DEBUG_OUTPUT_SYNCHRONOUS

#define GL_DEBUG_OUTPUT_SYNCHRONOUS   0x8242

Definition at line 405 of file qopengldebug.cpp.

◆ GL_DEBUG_SEVERITY_HIGH

#define GL_DEBUG_SEVERITY_HIGH   0x9146

Definition at line 504 of file qopengldebug.cpp.

Referenced by qt_messageSeverityFromGL(), and qt_messageSeverityToGL().

◆ GL_DEBUG_SEVERITY_LOW

#define GL_DEBUG_SEVERITY_LOW   0x9148

Definition at line 510 of file qopengldebug.cpp.

Referenced by qt_messageSeverityFromGL(), and qt_messageSeverityToGL().

◆ GL_DEBUG_SEVERITY_MEDIUM

#define GL_DEBUG_SEVERITY_MEDIUM   0x9147

Definition at line 507 of file qopengldebug.cpp.

Referenced by qt_messageSeverityFromGL(), and qt_messageSeverityToGL().

◆ GL_DEBUG_SEVERITY_NOTIFICATION

#define GL_DEBUG_SEVERITY_NOTIFICATION   0x826B

Definition at line 462 of file qopengldebug.cpp.

Referenced by qt_messageSeverityFromGL(), and qt_messageSeverityToGL().

◆ GL_DEBUG_SOURCE_API

#define GL_DEBUG_SOURCE_API   0x8246

Definition at line 417 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_SOURCE_APPLICATION

#define GL_DEBUG_SOURCE_APPLICATION   0x824A

Definition at line 429 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_SOURCE_OTHER

#define GL_DEBUG_SOURCE_OTHER   0x824B

Definition at line 432 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_SOURCE_SHADER_COMPILER

#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248

Definition at line 423 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_SOURCE_THIRD_PARTY

#define GL_DEBUG_SOURCE_THIRD_PARTY   0x8249

Definition at line 426 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_SOURCE_WINDOW_SYSTEM

#define GL_DEBUG_SOURCE_WINDOW_SYSTEM   0x8247

Definition at line 420 of file qopengldebug.cpp.

Referenced by qt_messageSourceFromGL(), and qt_messageSourceToGL().

◆ GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR

#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR   0x824D

Definition at line 438 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_ERROR

#define GL_DEBUG_TYPE_ERROR   0x824C

Definition at line 435 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_MARKER

#define GL_DEBUG_TYPE_MARKER   0x8268

Definition at line 453 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_OTHER

#define GL_DEBUG_TYPE_OTHER   0x8251

Definition at line 450 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_PERFORMANCE

#define GL_DEBUG_TYPE_PERFORMANCE   0x8250

Definition at line 447 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_POP_GROUP

#define GL_DEBUG_TYPE_POP_GROUP   0x826A

Definition at line 459 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_PORTABILITY

#define GL_DEBUG_TYPE_PORTABILITY   0x824F

Definition at line 444 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_PUSH_GROUP

#define GL_DEBUG_TYPE_PUSH_GROUP   0x8269

Definition at line 456 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR

#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR   0x824E

Definition at line 441 of file qopengldebug.cpp.

Referenced by qt_messageTypeFromGL(), and qt_messageTypeToGL().

◆ GL_DISPLAY_LIST

#define GL_DISPLAY_LIST   0x82E7

Definition at line 489 of file qopengldebug.cpp.

◆ GL_KHR_debug

#define GL_KHR_debug   1

Definition at line 398 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_GROUP_STACK_DEPTH

#define GL_MAX_DEBUG_GROUP_STACK_DEPTH   0x826C

Definition at line 465 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_LOGGED_MESSAGES

#define GL_MAX_DEBUG_LOGGED_MESSAGES   0x9144

Definition at line 498 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_MESSAGE_LENGTH

#define GL_MAX_DEBUG_MESSAGE_LENGTH   0x9143

Definition at line 495 of file qopengldebug.cpp.

◆ GL_MAX_LABEL_LENGTH

#define GL_MAX_LABEL_LENGTH   0x82E8

Definition at line 492 of file qopengldebug.cpp.

◆ GL_PROGRAM

#define GL_PROGRAM   0x82E2

Definition at line 477 of file qopengldebug.cpp.

◆ GL_PROGRAM_PIPELINE

#define GL_PROGRAM_PIPELINE   0x82E4

Definition at line 483 of file qopengldebug.cpp.

◆ GL_QUERY

#define GL_QUERY   0x82E3

Definition at line 480 of file qopengldebug.cpp.

◆ GL_SAMPLER

#define GL_SAMPLER   0x82E6

Definition at line 486 of file qopengldebug.cpp.

◆ GL_SHADER

#define GL_SHADER   0x82E1

Definition at line 474 of file qopengldebug.cpp.

◆ GL_STACK_OVERFLOW

#define GL_STACK_OVERFLOW   0x0503

Definition at line 519 of file qopengldebug.cpp.

◆ GL_STACK_UNDERFLOW

#define GL_STACK_UNDERFLOW   0x0504

Definition at line 522 of file qopengldebug.cpp.

◆ USE_MANUAL_DEFS

#define USE_MANUAL_DEFS

Definition at line 399 of file qopengldebug.cpp.

Typedef Documentation

◆ buf

Definition at line 1032 of file qopengldebug.cpp.

◆ bufsize

typedef GLsizei bufsize

Definition at line 1034 of file qopengldebug.cpp.

◆ count

Definition at line 1031 of file qopengldebug.cpp.

◆ enabled

Definition at line 1031 of file qopengldebug.cpp.

◆ GLDEBUGPROC

typedef void(QOPENGLF_APIENTRY * GLDEBUGPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam)

Definition at line 525 of file qopengldebug.cpp.

◆ id

typedef GLuint id

Definition at line 1032 of file qopengldebug.cpp.

◆ ids

Definition at line 1031 of file qopengldebug.cpp.

◆ length

Definition at line 1032 of file qopengldebug.cpp.

◆ lengths

Definition at line 1034 of file qopengldebug.cpp.

◆ message

typedef GLuint GLsizei const GLchar* message

Definition at line 1035 of file qopengldebug.cpp.

◆ messageLog

◆ params

typedef GLvoid** params

Definition at line 1037 of file qopengldebug.cpp.

◆ severities

Definition at line 1034 of file qopengldebug.cpp.

◆ severity

Definition at line 1031 of file qopengldebug.cpp.

◆ sources

Definition at line 1034 of file qopengldebug.cpp.

◆ type

typedef GLenum type

Definition at line 1031 of file qopengldebug.cpp.

◆ types

Definition at line 1034 of file qopengldebug.cpp.

◆ userParam

typedef const void* userParam

Definition at line 1033 of file qopengldebug.cpp.

Function Documentation

◆ GLuint()

typedef GLuint ( QOPENGLF_APIENTRYP qt_glGetDebugMessageLog_t)

◆ qt_messageSeverityFromGL()

static QOpenGLDebugMessage::Severity qt_messageSeverityFromGL ( GLenum severity)
static

◆ qt_messageSeverityToGL()

static GLenum qt_messageSeverityToGL ( QOpenGLDebugMessage::Severity severity)
static

◆ qt_messageSeverityToString()

static QString qt_messageSeverityToString ( QOpenGLDebugMessage::Severity severity)
static

Definition at line 755 of file qopengldebug.cpp.

References QOpenGLDebugMessage::AnySeverity, QOpenGLDebugMessage::HighSeverity, QOpenGLDebugMessage::InvalidSeverity, QOpenGLDebugMessage::LowSeverity, QOpenGLDebugMessage::MediumSeverity, QOpenGLDebugMessage::NotificationSeverity, Q_ASSERT_X, Q_FUNC_INFO, and QStringLiteral.

Referenced by QOpenGLDebugMessage::operator<<(), and QOpenGLDebugMessage::operator<<().

+ Here is the caller graph for this function:

◆ qt_messageSourceFromGL()

◆ qt_messageSourceToGL()

◆ qt_messageSourceToString()

◆ qt_messageTypeFromGL()

◆ qt_messageTypeToGL()

◆ qt_messageTypeToString()

◆ qt_opengl_debug_callback()

static void QOPENGLF_APIENTRY qt_opengl_debug_callback ( GLenum source,
GLenum type,
GLuint id,
GLenum severity,
GLsizei length,
const GLchar * rawMessage,
const GLvoid * userParam )
static

Definition at line 1246 of file qopengldebug.cpp.

References QOpenGLDebugLoggerPrivate::handleMessage().

Referenced by QOpenGLDebugLogger::startLogging().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ void()

typedef void ( QOPENGLF_APIENTRYP qt_glDebugMessageControl_t)