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
QOpenGLDebugMessage Class Reference

The QOpenGLDebugMessage class wraps an OpenGL debug message. More...

#include <qopengldebug.h>

+ Collaboration diagram for QOpenGLDebugMessage:

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.
 
QOpenGLDebugMessageoperator= (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.
 

Detailed Description

The QOpenGLDebugMessage class wraps an OpenGL debug message.

\inmodule QtOpenGL \reentrant

Since
5.1

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.

See also
QOpenGLDebugLogger

Definition at line 29 of file qopengldebug.h.

Member Enumeration Documentation

◆ Severity

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.

◆ Source

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.

◆ Type

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.

Constructor & Destructor Documentation

◆ QOpenGLDebugMessage() [1/2]

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.

Note
This constructor should not be used to create a debug message; instead, use the createApplicationMessage() or the createThirdPartyMessage() static functions.
See also
createApplicationMessage(), createThirdPartyMessage()

Definition at line 812 of file qopengldebug.cpp.

◆ QOpenGLDebugMessage() [2/2]

QOpenGLDebugMessage::QOpenGLDebugMessage ( const QOpenGLDebugMessage & debugMessage)

Constructs a debug message as a copy of debugMessage.

See also
operator=()

Definition at line 822 of file qopengldebug.cpp.

◆ ~QOpenGLDebugMessage()

QOpenGLDebugMessage::~QOpenGLDebugMessage ( )

Destroys this debug message.

Definition at line 830 of file qopengldebug.cpp.

Member Function Documentation

◆ createApplicationMessage()

QOpenGLDebugMessage QOpenGLDebugMessage::createApplicationMessage ( const QString & text,
GLuint id = 0,
Severity severity = NotificationSeverity,
Type type = OtherType )
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.

See also
QOpenGLDebugLogger::logMessage(), createThirdPartyMessage()

Definition at line 904 of file qopengldebug.cpp.

References ApplicationSource, id(), QOpenGLDebugMessagePrivate::message, severity(), text, and type().

Referenced by src_gui_opengl_qopengldebug::SnippetWrapper::wrapper1().

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

◆ createThirdPartyMessage()

QOpenGLDebugMessage QOpenGLDebugMessage::createThirdPartyMessage ( const QString & text,
GLuint id = 0,
Severity severity = NotificationSeverity,
Type type = OtherType )
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.

See also
QOpenGLDebugLogger::logMessage(), createApplicationMessage()

Definition at line 925 of file qopengldebug.cpp.

References id(), QOpenGLDebugMessagePrivate::message, severity(), text, ThirdPartySource, and type().

+ Here is the call graph for this function:

◆ id()

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(), and createThirdPartyMessage().

+ Here is the caller graph for this function:

◆ message()

QString QOpenGLDebugMessage::message ( ) const

Returns the textual message contained by this debug message.

Definition at line 892 of file qopengldebug.cpp.

References QOpenGLDebugMessagePrivate::message.

◆ operator!=()

bool QOpenGLDebugMessage::operator!= ( const QOpenGLDebugMessage & debugMessage) const
inline

Returns true if this message is different from debugMessage, or false otherwise.

See also
operator==()

Definition at line 97 of file qopengldebug.h.

References operator==().

+ Here is the call graph for this function:

◆ 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.

◆ operator==()

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.

See also
operator!=()

Definition at line 946 of file qopengldebug.cpp.

References QOpenGLDebugMessagePrivate::id, QOpenGLDebugMessagePrivate::message, QOpenGLDebugMessagePrivate::severity, QOpenGLDebugMessagePrivate::source, and QOpenGLDebugMessagePrivate::type.

◆ severity()

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(), and createThirdPartyMessage().

+ Here is the caller graph for this function:

◆ source()

QOpenGLDebugMessage::Source QOpenGLDebugMessage::source ( ) const

Returns the source of the debug message.

Definition at line 860 of file qopengldebug.cpp.

References QOpenGLDebugMessagePrivate::source.

◆ swap()

void QOpenGLDebugMessage::swap ( QOpenGLDebugMessage & debugMessage)
inlinenoexcept

Swaps the message debugMessage with this message.

This operation is very fast and never fails.

Definition at line 79 of file qopengldebug.h.

References d, and other().

+ Here is the call graph for this function:

◆ type()

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(), and createThirdPartyMessage().

+ Here is the caller graph for this function:

Friends And Related Symbol Documentation

◆ operator<<() [1/4]

QDebug operator<< ( QDebug debug,
const QOpenGLDebugMessage & message )
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().

+ Here is the call graph for this function:

◆ operator<<() [2/4]

QDebug operator<< ( QDebug debug,
QOpenGLDebugMessage::Severity severity )
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().

+ Here is the call graph for this function:

◆ operator<<() [3/4]

QDebug operator<< ( QDebug debug,
QOpenGLDebugMessage::Source source )
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().

+ Here is the call graph for this function:

◆ operator<<() [4/4]

QDebug operator<< ( QDebug debug,
QOpenGLDebugMessage::Type type )
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().

+ Here is the call graph for this function:

◆ QOpenGLDebugLogger

friend class QOpenGLDebugLogger
friend

Definition at line 100 of file qopengldebug.h.

◆ QOpenGLDebugLoggerPrivate

friend class QOpenGLDebugLoggerPrivate
friend

Definition at line 101 of file qopengldebug.h.


The documentation for this class was generated from the following files: