Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qopengldebug.cpp File Reference

(ff94fa3050e16d4effc2db69cbf001feac7ea7af)

#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_APIENTRY * GLDEBUGPROC) (GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const GLchar *message, const GLvoid *userParam)
typedef GLenum type = "long"
typedef GLenum GLenum severity
typedef GLenum GLenum GLsizei count
typedef GLenum GLenum GLsizei const GLuint * ids
 [qttrid_noop]
typedef GLenum GLenum GLsizei const GLuint GLboolean enabled
typedef GLenum GLuint id
typedef GLenum GLuint GLenum GLsizei length
typedef GLenum GLuint GLenum GLsizei const GLchar * buf
typedef const void * userParam
typedef GLsizei bufsize
typedef GLsizei GLenum * sources
typedef GLsizei GLenum GLenum * types = createStaticTypeToIdMap()
typedef GLsizei GLenum GLenum GLuint GLenum * severities
typedef GLsizei GLenum GLenum GLuint GLenum GLsizei * lengths
typedef GLsizei GLenum GLenum GLuint GLenum GLsizei GLchar * messageLog
typedef GLuint GLsizei const GLchar * message = hello % el % "world"_L1 % QChar('!')
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:411
GLenum type
GLsizei GLsizei GLchar * source
EGLContext EGLenum target
unsigned int uint
Definition qtypes.h:40

◆ 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 470 of file qopengldebug.cpp.

◆ GL_CONTEXT_FLAG_DEBUG_BIT

#define GL_CONTEXT_FLAG_DEBUG_BIT   0x00000002

Definition at line 515 of file qopengldebug.cpp.

◆ GL_DEBUG_CALLBACK_FUNCTION

#define GL_DEBUG_CALLBACK_FUNCTION   0x8244

Definition at line 410 of file qopengldebug.cpp.

◆ GL_DEBUG_CALLBACK_USER_PARAM

#define GL_DEBUG_CALLBACK_USER_PARAM   0x8245

Definition at line 413 of file qopengldebug.cpp.

◆ GL_DEBUG_GROUP_STACK_DEPTH

#define GL_DEBUG_GROUP_STACK_DEPTH   0x826D

Definition at line 467 of file qopengldebug.cpp.

◆ GL_DEBUG_LOGGED_MESSAGES

#define GL_DEBUG_LOGGED_MESSAGES   0x9145

Definition at line 500 of file qopengldebug.cpp.

◆ GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH

#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH   0x8243

Definition at line 407 of file qopengldebug.cpp.

◆ GL_DEBUG_OUTPUT

#define GL_DEBUG_OUTPUT   0x92E0

Definition at line 512 of file qopengldebug.cpp.

◆ GL_DEBUG_OUTPUT_SYNCHRONOUS

#define GL_DEBUG_OUTPUT_SYNCHRONOUS   0x8242

Definition at line 404 of file qopengldebug.cpp.

◆ GL_DEBUG_SEVERITY_HIGH

#define GL_DEBUG_SEVERITY_HIGH   0x9146

Definition at line 503 of file qopengldebug.cpp.

◆ GL_DEBUG_SEVERITY_LOW

#define GL_DEBUG_SEVERITY_LOW   0x9148

Definition at line 509 of file qopengldebug.cpp.

◆ GL_DEBUG_SEVERITY_MEDIUM

#define GL_DEBUG_SEVERITY_MEDIUM   0x9147

Definition at line 506 of file qopengldebug.cpp.

◆ GL_DEBUG_SEVERITY_NOTIFICATION

#define GL_DEBUG_SEVERITY_NOTIFICATION   0x826B

Definition at line 461 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_API

#define GL_DEBUG_SOURCE_API   0x8246

Definition at line 416 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_APPLICATION

#define GL_DEBUG_SOURCE_APPLICATION   0x824A

Definition at line 428 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_OTHER

#define GL_DEBUG_SOURCE_OTHER   0x824B

Definition at line 431 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_SHADER_COMPILER

#define GL_DEBUG_SOURCE_SHADER_COMPILER   0x8248

Definition at line 422 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_THIRD_PARTY

#define GL_DEBUG_SOURCE_THIRD_PARTY   0x8249

Definition at line 425 of file qopengldebug.cpp.

◆ GL_DEBUG_SOURCE_WINDOW_SYSTEM

#define GL_DEBUG_SOURCE_WINDOW_SYSTEM   0x8247

Definition at line 419 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR

#define GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR   0x824D

Definition at line 437 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_ERROR

#define GL_DEBUG_TYPE_ERROR   0x824C

Definition at line 434 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_MARKER

#define GL_DEBUG_TYPE_MARKER   0x8268

Definition at line 452 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_OTHER

#define GL_DEBUG_TYPE_OTHER   0x8251

Definition at line 449 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_PERFORMANCE

#define GL_DEBUG_TYPE_PERFORMANCE   0x8250

Definition at line 446 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_POP_GROUP

#define GL_DEBUG_TYPE_POP_GROUP   0x826A

Definition at line 458 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_PORTABILITY

#define GL_DEBUG_TYPE_PORTABILITY   0x824F

Definition at line 443 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_PUSH_GROUP

#define GL_DEBUG_TYPE_PUSH_GROUP   0x8269

Definition at line 455 of file qopengldebug.cpp.

◆ GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR

#define GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR   0x824E

Definition at line 440 of file qopengldebug.cpp.

◆ GL_DISPLAY_LIST

#define GL_DISPLAY_LIST   0x82E7

Definition at line 488 of file qopengldebug.cpp.

◆ GL_KHR_debug

#define GL_KHR_debug   1

Definition at line 397 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_GROUP_STACK_DEPTH

#define GL_MAX_DEBUG_GROUP_STACK_DEPTH   0x826C

Definition at line 464 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_LOGGED_MESSAGES

#define GL_MAX_DEBUG_LOGGED_MESSAGES   0x9144

Definition at line 497 of file qopengldebug.cpp.

◆ GL_MAX_DEBUG_MESSAGE_LENGTH

#define GL_MAX_DEBUG_MESSAGE_LENGTH   0x9143

Definition at line 494 of file qopengldebug.cpp.

◆ GL_MAX_LABEL_LENGTH

#define GL_MAX_LABEL_LENGTH   0x82E8

Definition at line 491 of file qopengldebug.cpp.

◆ GL_PROGRAM

#define GL_PROGRAM   0x82E2

Definition at line 476 of file qopengldebug.cpp.

◆ GL_PROGRAM_PIPELINE

#define GL_PROGRAM_PIPELINE   0x82E4

Definition at line 482 of file qopengldebug.cpp.

◆ GL_QUERY

#define GL_QUERY   0x82E3

Definition at line 479 of file qopengldebug.cpp.

◆ GL_SAMPLER

#define GL_SAMPLER   0x82E6

Definition at line 485 of file qopengldebug.cpp.

◆ GL_SHADER

#define GL_SHADER   0x82E1

Definition at line 473 of file qopengldebug.cpp.

◆ GL_STACK_OVERFLOW

#define GL_STACK_OVERFLOW   0x0503

Definition at line 518 of file qopengldebug.cpp.

◆ GL_STACK_UNDERFLOW

#define GL_STACK_UNDERFLOW   0x0504

Definition at line 521 of file qopengldebug.cpp.

◆ USE_MANUAL_DEFS

#define USE_MANUAL_DEFS

Definition at line 398 of file qopengldebug.cpp.

Typedef Documentation

◆ buf

typedef GLenum GLuint GLenum GLsizei const GLchar * buf

Definition at line 1029 of file qopengldebug.cpp.

◆ bufsize

typedef GLsizei bufsize

Definition at line 1031 of file qopengldebug.cpp.

◆ count

typedef GLint GLsizei count

Definition at line 1028 of file qopengldebug.cpp.

◆ enabled

constexpr bool enabled
constexpr

Definition at line 1028 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 524 of file qopengldebug.cpp.

◆ id

typedef GLuint id

Definition at line 1029 of file qopengldebug.cpp.

◆ ids

Initial value:
= {
QT_TRID_NOOP("qtn_1st_text"),
QT_TRID_NOOP("qtn_2nd_text"),
0
}
#define QT_TRID_NOOP(id)

[qttrid_noop]

Definition at line 1028 of file qopengldebug.cpp.

◆ length

Definition at line 1029 of file qopengldebug.cpp.

◆ lengths

Definition at line 1031 of file qopengldebug.cpp.

◆ message

QDebug message = hello % el % "world"_L1 % QChar('!')

Prints the string on stdout and appends a newline

Parameters
stringprintable string

Definition at line 1032 of file qopengldebug.cpp.

◆ messageLog

◆ params

typedef GLvoid ** params

Definition at line 1034 of file qopengldebug.cpp.

◆ severities

Definition at line 1031 of file qopengldebug.cpp.

◆ severity

Definition at line 1028 of file qopengldebug.cpp.

◆ sources

typedef GLsizei GLenum * sources

Definition at line 1031 of file qopengldebug.cpp.

◆ type

quint8 type = "long"

Definition at line 1028 of file qopengldebug.cpp.

◆ types

Returns
available types as a QStringList.

Definition at line 1031 of file qopengldebug.cpp.

◆ userParam

typedef const void * userParam

Definition at line 1030 of file qopengldebug.cpp.

Function Documentation

◆ GLuint()

typedef GLuint ( QOPENGLF_APIENTRYP qt_glGetDebugMessageLog_t)

Referenced by QOpenGLDebugLoggerPrivate::controlDebugMessages().

Here is the caller graph for this function:

◆ qt_messageSeverityFromGL()

QOpenGLDebugMessage::Severity qt_messageSeverityFromGL ( GLenum severity)
static

Definition at line 710 of file qopengldebug.cpp.

◆ qt_messageSeverityToGL()

GLenum qt_messageSeverityToGL ( QOpenGLDebugMessage::Severity severity)
static

Definition at line 730 of file qopengldebug.cpp.

◆ qt_messageSeverityToString()

QString qt_messageSeverityToString ( QOpenGLDebugMessage::Severity severity)
static

Definition at line 754 of file qopengldebug.cpp.

◆ qt_messageSourceFromGL()

QOpenGLDebugMessage::Source qt_messageSourceFromGL ( GLenum source)
static

Definition at line 532 of file qopengldebug.cpp.

◆ qt_messageSourceToGL()

GLenum qt_messageSourceToGL ( QOpenGLDebugMessage::Source source)
static

Definition at line 556 of file qopengldebug.cpp.

◆ qt_messageSourceToString()

QString qt_messageSourceToString ( QOpenGLDebugMessage::Source source)
static

Definition at line 584 of file qopengldebug.cpp.

◆ qt_messageTypeFromGL()

QOpenGLDebugMessage::Type qt_messageTypeFromGL ( GLenum type)
static

Definition at line 612 of file qopengldebug.cpp.

◆ qt_messageTypeToGL()

GLenum qt_messageTypeToGL ( QOpenGLDebugMessage::Type type)
static

Definition at line 642 of file qopengldebug.cpp.

◆ qt_messageTypeToString()

QString qt_messageTypeToString ( QOpenGLDebugMessage::Type type)
static

Definition at line 676 of file qopengldebug.cpp.

◆ qt_opengl_debug_callback()

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 1243 of file qopengldebug.cpp.

◆ void()

typedef void ( QOPENGLF_APIENTRYP qt_glDebugMessageControl_t)