![]() |
Qt 6.x
The Qt SDK
|
The QOpenGLDebugMessage class wraps an OpenGL debug message. More...
#include <qopengldebug.h>
Public Types | |
enum | Source { InvalidSource = 0x00000000 , APISource = 0x00000001 , WindowSystemSource = 0x00000002 , ShaderCompilerSource = 0x00000004 , ThirdPartySource = 0x00000008 , ApplicationSource = 0x00000010 , OtherSource = 0x00000020 , LastSource = OtherSource , AnySource = 0xffffffff } |
The Source enum defines the source of the debug message. More... | |
enum | Type { InvalidType = 0x00000000 , ErrorType = 0x00000001 , DeprecatedBehaviorType = 0x00000002 , UndefinedBehaviorType = 0x00000004 , PortabilityType = 0x00000008 , PerformanceType = 0x00000010 , OtherType = 0x00000020 , MarkerType = 0x00000040 , GroupPushType = 0x00000080 , GroupPopType = 0x00000100 , LastType = GroupPopType , AnyType = 0xffffffff } |
The Type enum defines the type of the debug message. More... | |
enum | Severity { InvalidSeverity = 0x00000000 , HighSeverity = 0x00000001 , MediumSeverity = 0x00000002 , LowSeverity = 0x00000004 , NotificationSeverity = 0x00000008 , LastSeverity = NotificationSeverity , AnySeverity = 0xffffffff } |
The Severity enum defines the severity of the debug message. More... | |
Public Member Functions | |
QOpenGLDebugMessage () | |
Constructs a debug message with an empty message string, id set to 0, source set to InvalidSource, type set to InvalidType, and severity set to InvalidSeverity. | |
QOpenGLDebugMessage (const QOpenGLDebugMessage &debugMessage) | |
Constructs a debug message as a copy of debugMessage. | |
QOpenGLDebugMessage & | operator= (const QOpenGLDebugMessage &debugMessage) |
Assigns the message debugMessage to this object, and returns a reference to the copy. | |
~QOpenGLDebugMessage () | |
Destroys this debug message. | |
void | swap (QOpenGLDebugMessage &other) noexcept |
Swaps the message debugMessage with this message. | |
Source | source () const |
Returns the source of the debug message. | |
Type | type () const |
Returns the type of the debug message. | |
Severity | severity () const |
Returns the severity of the debug message. | |
GLuint | id () const |
Returns the id of the debug message. | |
QString | message () const |
Returns the textual message contained by this debug message. | |
bool | operator== (const QOpenGLDebugMessage &debugMessage) const |
Returns true if this debug message is equal to debugMessage, or false otherwise. | |
bool | operator!= (const QOpenGLDebugMessage &debugMessage) const |
Returns true if this message is different from debugMessage, or false otherwise. | |
Static Public Member Functions | |
static QOpenGLDebugMessage | createApplicationMessage (const QString &text, GLuint id=0, Severity severity=NotificationSeverity, Type type=OtherType) |
Constructs and returns a debug message with text as its text, id as id, severity as severity, and type as type. | |
static QOpenGLDebugMessage | createThirdPartyMessage (const QString &text, GLuint id=0, Severity severity=NotificationSeverity, Type type=OtherType) |
Constructs and returns a debug message with text as its text, id as id, severity as severity, and type as type. | |
Friends | |
class | QOpenGLDebugLogger |
class | QOpenGLDebugLoggerPrivate |
Related Symbols | |
(Note that these are not member symbols.) | |
QDebug | operator<< (QDebug debug, QOpenGLDebugMessage::Source source) |
Writes the source source into the debug object debug for debugging purposes. | |
QDebug | operator<< (QDebug debug, QOpenGLDebugMessage::Type type) |
Writes the type type into the debug object debug for debugging purposes. | |
QDebug | operator<< (QDebug debug, QOpenGLDebugMessage::Severity severity) |
Writes the severity severity into the debug object debug for debugging purposes. | |
QDebug | operator<< (QDebug debug, const QOpenGLDebugMessage &message) |
Writes the message message into the debug object debug for debugging purposes. | |
The QOpenGLDebugMessage class wraps an OpenGL debug message.
\inmodule QtOpenGL \reentrant
Debug messages are usually created by the OpenGL server and then read by OpenGL clients (either from the OpenGL internal debug log, or logged in real-time). A debug message has a textual representation, a vendor-specific numeric id, a source, a type and a severity.
It's also possible for applications or third-party libraries and toolkits to create and insert messages in the debug log. In order to do so, you can use the createApplicationMessage() or the createThirdPartyMessage() static functions.
Definition at line 29 of file qopengldebug.h.
The Severity enum defines the severity of the debug message.
\value InvalidSeverity The severity of the message is invalid; this is the severity of a default-constructed QOpenGLDebugMessage object.
\value HighSeverity The message has a high severity.
\value MediumSeverity The message has a medium severity.
\value LowSeverity The message has a low severity.
\value NotificationSeverity The message is a notification.
\omitvalue LastSeverity
\value AnySeverity This value corresponds to a mask of all possible message severities.
Enumerator | |
---|---|
InvalidSeverity | |
HighSeverity | |
MediumSeverity | |
LowSeverity | |
NotificationSeverity | |
LastSeverity | |
AnySeverity |
Definition at line 61 of file qopengldebug.h.
The Source enum defines the source of the debug message.
\value InvalidSource The source of the message is invalid; this is the source of a default-constructed QOpenGLDebugMessage object.
\value APISource The message was generated in response to OpenGL API calls.
\value WindowSystemSource The message was generated by the window system.
\value ShaderCompilerSource The message was generated by the shader compiler.
\value ThirdPartySource The message was generated by a third party, for instance an OpenGL framework a or debugging toolkit.
\value ApplicationSource The message was generated by the application itself.
\value OtherSource The message was generated by a source not included in this enumeration.
\omitvalue LastSource
\value AnySource This value corresponds to a mask of all possible message sources.
Enumerator | |
---|---|
InvalidSource | |
APISource | |
WindowSystemSource | |
ShaderCompilerSource | |
ThirdPartySource | |
ApplicationSource | |
OtherSource | |
LastSource | |
AnySource |
Definition at line 32 of file qopengldebug.h.
The Type enum defines the type of the debug message.
\value InvalidType The type of the message is invalid; this is the type of a default-constructed QOpenGLDebugMessage object.
\value ErrorType The message represents an error.
\value DeprecatedBehaviorType The message represents an usage of deprecated behavior.
\value UndefinedBehaviorType The message represents an usage of undefined behavior.
\value PortabilityType The message represents an usage of vendor-specific behavior, that might pose portability concerns.
\value PerformanceType The message represents a performance issue.
\value OtherType The message represents a type not included in this enumeration.
\value MarkerType The message represents a marker in the debug log.
\value GroupPushType The message represents a debug group push operation.
\value GroupPopType The message represents a debug group pop operation.
\omitvalue LastType
\value AnyType This value corresponds to a mask of all possible message types.
Enumerator | |
---|---|
InvalidType | |
ErrorType | |
DeprecatedBehaviorType | |
UndefinedBehaviorType | |
PortabilityType | |
PerformanceType | |
OtherType | |
MarkerType | |
GroupPushType | |
GroupPopType | |
LastType | |
AnyType |
Definition at line 45 of file qopengldebug.h.
QOpenGLDebugMessage::QOpenGLDebugMessage | ( | ) |
Constructs a debug message with an empty message string, id set to 0, source set to InvalidSource, type set to InvalidType, and severity set to InvalidSeverity.
Definition at line 812 of file qopengldebug.cpp.
QOpenGLDebugMessage::QOpenGLDebugMessage | ( | const QOpenGLDebugMessage & | debugMessage | ) |
Constructs a debug message as a copy of debugMessage.
Definition at line 822 of file qopengldebug.cpp.
QOpenGLDebugMessage::~QOpenGLDebugMessage | ( | ) |
Destroys this debug message.
Definition at line 830 of file qopengldebug.cpp.
|
static |
Constructs and returns a debug message with text as its text, id as id, severity as severity, and type as type.
The message source will be set to ApplicationSource.
Definition at line 904 of file qopengldebug.cpp.
References ApplicationSource, id(), severity(), text, and type().
Referenced by src_gui_opengl_qopengldebug::SnippetWrapper::wrapper1().
|
static |
Constructs and returns a debug message with text as its text, id as id, severity as severity, and type as type.
The message source will be set to ThirdPartySource.
Definition at line 925 of file qopengldebug.cpp.
References id(), severity(), text, ThirdPartySource, and type().
GLuint QOpenGLDebugMessage::id | ( | ) | const |
Returns the id of the debug message.
Ids are generally vendor-specific.
Definition at line 884 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::id.
Referenced by createApplicationMessage(), createThirdPartyMessage(), and QOpenGLDebugLogger::logMessage().
QString QOpenGLDebugMessage::message | ( | ) | const |
Returns the textual message contained by this debug message.
Definition at line 892 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::message.
Referenced by QOpenGLDebugLogger::logMessage().
|
inline |
Returns true
if this message is different from debugMessage, or false otherwise.
Definition at line 97 of file qopengldebug.h.
References operator==().
QOpenGLDebugMessage & QOpenGLDebugMessage::operator= | ( | const QOpenGLDebugMessage & | debugMessage | ) |
Assigns the message debugMessage to this object, and returns a reference to the copy.
Move-assigns debugMessage to this object.
Definition at line 838 of file qopengldebug.cpp.
bool QOpenGLDebugMessage::operator== | ( | const QOpenGLDebugMessage & | debugMessage | ) | const |
Returns true
if this debug message is equal to debugMessage, or false otherwise.
Two debugging messages are equal if they have the same textual message, the same id, the same source, the same type and the same severity.
Definition at line 946 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::id, QOpenGLDebugMessagePrivate::message, QOpenGLDebugMessagePrivate::severity, QOpenGLDebugMessagePrivate::source, and QOpenGLDebugMessagePrivate::type.
QOpenGLDebugMessage::Severity QOpenGLDebugMessage::severity | ( | ) | const |
Returns the severity of the debug message.
Definition at line 876 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::severity.
Referenced by createApplicationMessage(), createThirdPartyMessage(), and QOpenGLDebugLogger::logMessage().
QOpenGLDebugMessage::Source QOpenGLDebugMessage::source | ( | ) | const |
Returns the source of the debug message.
Definition at line 860 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::source.
Referenced by QOpenGLDebugLogger::logMessage().
|
inlinenoexcept |
Swaps the message debugMessage with this message.
This operation is very fast and never fails.
Definition at line 79 of file qopengldebug.h.
QOpenGLDebugMessage::Type QOpenGLDebugMessage::type | ( | ) | const |
Returns the type of the debug message.
Definition at line 868 of file qopengldebug.cpp.
References QOpenGLDebugMessagePrivate::type.
Referenced by createApplicationMessage(), createThirdPartyMessage(), and QOpenGLDebugLogger::logMessage().
|
related |
Writes the message message into the debug object debug for debugging purposes.
Definition at line 1017 of file qopengldebug.cpp.
References debug, qt_messageSeverityToString(), qt_messageSourceToString(), and qt_messageTypeToString().
|
related |
Writes the severity severity into the debug object debug for debugging purposes.
Definition at line 1002 of file qopengldebug.cpp.
References debug, and qt_messageSeverityToString().
|
related |
Writes the source source into the debug object debug for debugging purposes.
Definition at line 972 of file qopengldebug.cpp.
References debug, and qt_messageSourceToString().
|
related |
Writes the type type into the debug object debug for debugging purposes.
Definition at line 987 of file qopengldebug.cpp.
References debug, and qt_messageTypeToString().
|
friend |
Definition at line 100 of file qopengldebug.h.
|
friend |
Definition at line 101 of file qopengldebug.h.