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
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
 
Source source () const
 
Type type () const
 
Severity severity () const
 
GLuint id () const
 
QString message () const
 
bool operator== (const QOpenGLDebugMessage &debugMessage) const
 
bool operator!= (const QOpenGLDebugMessage &debugMessage) const
 

Static Public Member Functions

static QOpenGLDebugMessage createApplicationMessage (const QString &text, GLuint id=0, Severity severity=NotificationSeverity, Type type=OtherType)
 
static QOpenGLDebugMessage createThirdPartyMessage (const QString &text, GLuint id=0, Severity severity=NotificationSeverity, Type type=OtherType)
 

Friends

class QOpenGLDebugLogger
 
class QOpenGLDebugLoggerPrivate
 

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

◆ ~QOpenGLDebugMessage()

QOpenGLDebugMessage::~QOpenGLDebugMessage ( )

Destroys this debug message.

Definition at line 828 of file qopengldebug.cpp.

Member Function Documentation

◆ createApplicationMessage()

static QOpenGLDebugMessage QOpenGLDebugMessage::createApplicationMessage ( const QString & text,
GLuint id = 0,
Severity severity = NotificationSeverity,
Type type = OtherType )
static

◆ createThirdPartyMessage()

static QOpenGLDebugMessage QOpenGLDebugMessage::createThirdPartyMessage ( const QString & text,
GLuint id = 0,
Severity severity = NotificationSeverity,
Type type = OtherType )
static

◆ id()

GLuint QOpenGLDebugMessage::id ( ) const

◆ message()

QString QOpenGLDebugMessage::message ( ) const

◆ operator!=()

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

Definition at line 97 of file qopengldebug.h.

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

◆ operator==()

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

◆ severity()

Severity QOpenGLDebugMessage::severity ( ) const

◆ source()

Source QOpenGLDebugMessage::source ( ) const

◆ swap()

void QOpenGLDebugMessage::swap ( QOpenGLDebugMessage & other)
inlinenoexcept

Definition at line 79 of file qopengldebug.h.

◆ type()

Type QOpenGLDebugMessage::type ( ) const

Friends And Related Symbol Documentation

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