QOpenGLDebugMessage 类

QOpenGLDebugMessage 类包裹 OpenGL 调试消息。 更多...

头: #include <QOpenGLDebugMessage>
CMake: find_package(Qt6 REQUIRED COMPONENTS OpenGL)
target_link_libraries(mytarget PRIVATE Qt6::OpenGL)
qmake: QT += opengl

注意: 此类的所有函数 可重入 .

公共类型

flags Severities
enum Severity { InvalidSeverity, HighSeverity, MediumSeverity, LowSeverity, NotificationSeverity, AnySeverity }
enum { InvalidSource, APISource, WindowSystemSource, ShaderCompilerSource, ThirdPartySource, …, AnySource }
flags
enum Type { InvalidType, ErrorType, DeprecatedBehaviorType, UndefinedBehaviorType, PortabilityType, …, AnyType }
flags 类型

公共函数

QOpenGLDebugMessage ()
QOpenGLDebugMessage (const QOpenGLDebugMessage & debugMessage )
~QOpenGLDebugMessage ()
GLuint id () const
QString message () const
QOpenGLDebugMessage::Severity severity () const
QOpenGLDebugMessage::Source source () const
void swap (QOpenGLDebugMessage & debugMessage )
QOpenGLDebugMessage::Type type () const
bool operator!= (const QOpenGLDebugMessage & debugMessage ) const
QOpenGLDebugMessage & operator= (const QOpenGLDebugMessage & debugMessage )
QOpenGLDebugMessage & operator= (QOpenGLDebugMessage && debugMessage )
bool operator== (const QOpenGLDebugMessage & debugMessage ) const

静态公共成员

QOpenGLDebugMessage createApplicationMessage (const QString & text , GLuint id = 0, QOpenGLDebugMessage::Severity severity = NotificationSeverity, QOpenGLDebugMessage::Type type = OtherType)
QOpenGLDebugMessage createThirdPartyMessage (const QString & text , GLuint id = 0, QOpenGLDebugMessage::Severity severity = NotificationSeverity, QOpenGLDebugMessage::Type type = OtherType)
QDebug operator<< (QDebug debug , QOpenGLDebugMessage::Source source )
QDebug operator<< (QDebug debug , QOpenGLDebugMessage::Type type )
QDebug operator<< (QDebug debug , QOpenGLDebugMessage::Severity severity )
QDebug operator<< (QDebug debug , const QOpenGLDebugMessage & message )

详细描述

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 () 或 createThirdPartyMessage () static functions.

另请参阅 QOpenGLDebugLogger .

成员类型文档编制

enum QOpenGLDebugMessage:: Severity
flags QOpenGLDebugMessage:: Severities

The Severity enum defines the severity of the debug message.

常量 描述
QOpenGLDebugMessage::InvalidSeverity 0x00000000 The severity of the message is invalid; this is the severity of a default-constructed QOpenGLDebugMessage 对象。
QOpenGLDebugMessage::HighSeverity 0x00000001 The message has a high severity.
QOpenGLDebugMessage::MediumSeverity 0x00000002 The message has a medium severity.
QOpenGLDebugMessage::LowSeverity 0x00000004 The message has a low severity.
QOpenGLDebugMessage::NotificationSeverity 0x00000008 The message is a notification.
QOpenGLDebugMessage::AnySeverity 0xffffffff This value corresponds to a mask of all possible message severities.

The Severities type is a typedef for QFlags <Severity>. It stores an OR combination of Severity values.

enum QOpenGLDebugMessage::
flags QOpenGLDebugMessage::

The Source enum defines the source of the debug message.

常量 描述
QOpenGLDebugMessage::InvalidSource 0x00000000 The source of the message is invalid; this is the source of a default-constructed QOpenGLDebugMessage 对象。
QOpenGLDebugMessage::APISource 0x00000001 The message was generated in response to OpenGL API calls.
QOpenGLDebugMessage::WindowSystemSource 0x00000002 The message was generated by the window system.
QOpenGLDebugMessage::ShaderCompilerSource 0x00000004 The message was generated by the shader compiler.
QOpenGLDebugMessage::ThirdPartySource 0x00000008 The message was generated by a third party, for instance an OpenGL framework a or debugging toolkit.
QOpenGLDebugMessage::ApplicationSource 0x00000010 The message was generated by the application itself.
QOpenGLDebugMessage::OtherSource 0x00000020 The message was generated by a source not included in this enumeration.
QOpenGLDebugMessage::AnySource 0xffffffff This value corresponds to a mask of all possible message sources.

The Sources type is a typedef for QFlags <Source>. It stores an OR combination of Source values.

enum QOpenGLDebugMessage:: Type
flags QOpenGLDebugMessage:: 类型

The Type enum defines the type of the debug message.

常量 描述
QOpenGLDebugMessage::InvalidType 0x00000000 The type of the message is invalid; this is the type of a default-constructed QOpenGLDebugMessage 对象。
QOpenGLDebugMessage::ErrorType 0x00000001 The message represents an error.
QOpenGLDebugMessage::DeprecatedBehaviorType 0x00000002 The message represents an usage of deprecated behavior.
QOpenGLDebugMessage::UndefinedBehaviorType 0x00000004 The message represents an usage of undefined behavior.
QOpenGLDebugMessage::PortabilityType 0x00000008 The message represents an usage of vendor-specific behavior, that might pose portability concerns.
QOpenGLDebugMessage::PerformanceType 0x00000010 The message represents a performance issue.
QOpenGLDebugMessage::OtherType 0x00000020 The message represents a type not included in this enumeration.
QOpenGLDebugMessage::MarkerType 0x00000040 The message represents a marker in the debug log.
QOpenGLDebugMessage::GroupPushType 0x00000080 The message represents a debug group push operation.
QOpenGLDebugMessage::GroupPopType 0x00000100 The message represents a debug group pop operation.
QOpenGLDebugMessage::AnyType 0xffffffff This value corresponds to a mask of all possible message types.

The Types type is a typedef for QFlags <Type>. It stores an OR combination of Type values.

成员函数文档编制

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 .

注意: This constructor should not be used to create a debug message; instead, use the createApplicationMessage () 或 createThirdPartyMessage () static functions.

另请参阅 createApplicationMessage () 和 createThirdPartyMessage ().

QOpenGLDebugMessage:: QOpenGLDebugMessage (const QOpenGLDebugMessage & debugMessage )

构造调试消息作为副本为 debugMessage .

另请参阅 operator= ().

QOpenGLDebugMessage:: ~QOpenGLDebugMessage ()

销毁此调试消息。

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

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 .

另请参阅 QOpenGLDebugLogger::logMessage () 和 createThirdPartyMessage ().

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

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 .

另请参阅 QOpenGLDebugLogger::logMessage () 和 createApplicationMessage ().

GLuint QOpenGLDebugMessage:: id () const

Returns the id of the debug message. Ids are generally vendor-specific.

QString QOpenGLDebugMessage:: message () const

Returns the textual message contained by this debug message.

QOpenGLDebugMessage::Severity QOpenGLDebugMessage:: severity () const

Returns the severity of the debug message.

QOpenGLDebugMessage::Source QOpenGLDebugMessage:: source () const

Returns the source of the debug message.

void QOpenGLDebugMessage:: swap ( QOpenGLDebugMessage & debugMessage )

Swaps the message debugMessage with this message. This operation is very fast and never fails.

QOpenGLDebugMessage::Type QOpenGLDebugMessage:: type () const

Returns the type of the debug message.

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

返回 true if this message is different from debugMessage ,或 false 否则。

另请参阅 operator== ().

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

Assigns the message debugMessage to this object, and returns a reference to the copy.

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

移动赋值 debugMessage 到此对象。

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

返回 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.

另请参阅 operator!= ().

相关非成员

QDebug operator<< ( QDebug debug , QOpenGLDebugMessage::Source source )

Writes the source source 到 debug 对象 debug 为调试目的。

QDebug operator<< ( QDebug debug , QOpenGLDebugMessage::Type type )

Writes the type type 到 debug 对象 debug 为调试目的。

QDebug operator<< ( QDebug debug , QOpenGLDebugMessage::Severity severity )

Writes the severity severity 到 debug 对象 debug 为调试目的。

QDebug operator<< ( QDebug debug , const QOpenGLDebugMessage & message )

Writes the message message 到 debug 对象 debug 为调试目的。