QOpenGLDebugMessage — PyQt Documentation v6.9.0 (original) (raw)
PyQt6.QtOpenGL.QOpenGLDebugMessage
Description¶
The QOpenGLDebugMessage class wraps an OpenGL debug 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() or the createThirdPartyMessage() static functions.
Enums¶
Severity
The Severity enum defines the severity of the debug message.
Member | Value | Description |
---|---|---|
AnySeverity | 0xffffffff | This value corresponds to a mask of all possible message severities. |
HighSeverity | 0x00000001 | The message has a high severity. |
InvalidSeverity | 0x00000000 | The severity of the message is invalid; this is the severity of a default-constructed QOpenGLDebugMessage object. |
LowSeverity | 0x00000004 | The message has a low severity. |
MediumSeverity | 0x00000002 | The message has a medium severity. |
NotificationSeverity | 0x00000008 | The message is a notification. |
Source
The Source enum defines the source of the debug message.
Member | Value | Description |
---|---|---|
AnySource | 0xffffffff | This value corresponds to a mask of all possible message sources. |
APISource | 0x00000001 | The message was generated in response to OpenGL API calls. |
ApplicationSource | 0x00000010 | The message was generated by the application itself. |
InvalidSource | 0x00000000 | The source of the message is invalid; this is the source of a default-constructed QOpenGLDebugMessage object. |
OtherSource | 0x00000020 | The message was generated by a source not included in this enumeration. |
ShaderCompilerSource | 0x00000004 | The message was generated by the shader compiler. |
ThirdPartySource | 0x00000008 | The message was generated by a third party, for instance an OpenGL framework a or debugging toolkit. |
WindowSystemSource | 0x00000002 | The message was generated by the window system. |
Type
The Type enum defines the type of the debug message.
Member | Value | Description |
---|---|---|
AnyType | 0xffffffff | This value corresponds to a mask of all possible message types. |
DeprecatedBehaviorType | 0x00000002 | The message represents an usage of deprecated behavior. |
ErrorType | 0x00000001 | The message represents an error. |
GroupPopType | 0x00000100 | The message represents a debug group pop operation. |
GroupPushType | 0x00000080 | The message represents a debug group push operation. |
InvalidType | 0x00000000 | The type of the message is invalid; this is the type of a default-constructed QOpenGLDebugMessage object. |
MarkerType | 0x00000040 | The message represents a marker in the debug log. |
OtherType | 0x00000020 | The message represents a type not included in this enumeration. |
PerformanceType | 0x00000010 | The message represents a performance issue. |
PortabilityType | 0x00000008 | The message represents an usage of vendor-specific behavior, that might pose portability concerns. |
UndefinedBehaviorType | 0x00000004 | The message represents an usage of undefined behavior. |
Methods¶
__init__()
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.
__init__(QOpenGLDebugMessage)
Constructs a debug message as a copy of debugMessage.
@staticmethod
createApplicationMessage(Optional[str], id: int = 0, severity: Severity = NotificationSeverity, type: Type = OtherType) → QOpenGLDebugMessage
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.
@staticmethod
createThirdPartyMessage(Optional[str], id: int = 0, severity: Severity = NotificationSeverity, type: Type = OtherType) → QOpenGLDebugMessage
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.
__eq__(QOpenGLDebugMessage) → bool
TODO
id() → int
Returns the id of the debug message. Ids are generally vendor-specific.
message() → str
Returns the textual message contained by this debug message.
__ne__(QOpenGLDebugMessage) → bool
TODO
severity() → Severity
Returns the severity of the debug message.
source() → Source
Returns the source of the debug message.
swap(QOpenGLDebugMessage)
Swaps this message] with other. This operation is very fast and never fails.
type() → Type
Returns the type of the debug message.