GLAPI/glDebugMessageControl: Difference between revisions
m Bot: Adding better formatting. |
m →Description: Fixing some unclear language. |
||
Line 28: | Line 28: | ||
'''glDebugMessageControl''' controls the reporting of debug messages generated by a debug context. The parameters {{param|source}}, {{param|type}} and {{param|severity}} form a filter to select messages from the pool of potential messages generated by the GL. | '''glDebugMessageControl''' controls the reporting of debug messages generated by a debug context. The parameters {{param|source}}, {{param|type}} and {{param|severity}} form a filter to select messages from the pool of potential messages generated by the GL. | ||
{{param|source}} may be {{enum|GL_DEBUG_SOURCE_API}}, {{enum|GL_DEBUG_SOURCE_WINDOW_SYSTEM}}, {{enum|GL_DEBUG_SOURCE_SHADER_COMPILER}}, {{enum|GL_DEBUG_SOURCE_THIRD_PARTY}}, {{enum|GL_DEBUG_SOURCE_APPLICATION}}, {{enum|GL_DEBUG_SOURCE_OTHER}} to select messages generated by usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application or by some other source, respectively. It may also take the value {{enum|GL_DONT_CARE}} | {{param|source}} may be {{enum|GL_DEBUG_SOURCE_API}}, {{enum|GL_DEBUG_SOURCE_WINDOW_SYSTEM}}, {{enum|GL_DEBUG_SOURCE_SHADER_COMPILER}}, {{enum|GL_DEBUG_SOURCE_THIRD_PARTY}}, {{enum|GL_DEBUG_SOURCE_APPLICATION}}, {{enum|GL_DEBUG_SOURCE_OTHER}} to select messages generated by usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application or by some other source, respectively. It may also take the value {{enum|GL_DONT_CARE}}, in which case messages from all sources are referenced. | ||
{{param|type}} may be one of {{enum|GL_DEBUG_TYPE_ERROR}}, {{enum|GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR}}, {{enum|GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR}}, {{enum|GL_DEBUG_TYPE_PORTABILITY}}, {{enum|GL_DEBUG_TYPE_PERFORMANCE}}, {{enum|GL_DEBUG_TYPE_OTHER}}, {{enum|GL_DEBUG_TYPE_MARKER}}, {{enum|GL_DEBUG_TYPE_PUSH_GROUP}}, or {{enum|GL_DEBUG_TYPE_POP_GROUP}} to indicate the type of messages describing GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications and other types of messages. It may also take the value {{enum|GL_DONT_CARE}} | {{param|type}} may be one of {{enum|GL_DEBUG_TYPE_ERROR}}, {{enum|GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR}}, {{enum|GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR}}, {{enum|GL_DEBUG_TYPE_PORTABILITY}}, {{enum|GL_DEBUG_TYPE_PERFORMANCE}}, {{enum|GL_DEBUG_TYPE_OTHER}}, {{enum|GL_DEBUG_TYPE_MARKER}}, {{enum|GL_DEBUG_TYPE_PUSH_GROUP}}, or {{enum|GL_DEBUG_TYPE_POP_GROUP}} to indicate the type of messages describing GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications and other types of messages. It may also take the value {{enum|GL_DONT_CARE}}, in which case messages of all types are referenced. | ||
{{param|severity}} may be one of {{enum|GL_DEBUG_SEVERITY_LOW}}, {{enum|GL_DEBUG_SEVERITY_MEDIUM}}, {{enum|GL_DEBUG_SEVERITY_HIGH}}, or {{enum|GL_DEBUG_SEVERITY_NOTIFICATION}} to select messages of low, medium or high severity messages. It may also take the value {{enum|GL_DONT_CARE}} | {{param|severity}} may be one of {{enum|GL_DEBUG_SEVERITY_LOW}}, {{enum|GL_DEBUG_SEVERITY_MEDIUM}}, {{enum|GL_DEBUG_SEVERITY_HIGH}}, or {{enum|GL_DEBUG_SEVERITY_NOTIFICATION}} to select messages of low, medium or high severity messages. It may also take the value {{enum|GL_DONT_CARE}}, in which case messages with all severities are referenced. | ||
{{param|ids}} contains a list of {{param|count}} message identifiers to select specific messages from the pool of available messages. If {{param|count}} is zero then the value of {{param|ids}} is ignored. Otherwise, only messages appearing in this list are selected. In this case, {{param|source}} and {{param|type}} may not be {{enum|GL_DONT_CARE}} | {{param|ids}} contains a list of {{param|count}} message identifiers to select specific messages from the pool of available messages. If {{param|count}} is zero then the value of {{param|ids}} is ignored. Otherwise, only messages appearing in this list are selected. In this case, {{param|source}} and {{param|type}} may not be {{enum|GL_DONT_CARE}}, but {{param|severity}} must be {{enum|GL_DONT_CARE}}. | ||
If {{param|enabled}} is {{enum|GL_TRUE}} then messages that match the filter formed by {{param|source}}, {{param|type}}, {{param|severity}} and {{param|ids}} are enabled. Otherwise, those messages are disabled. | If {{param|enabled}} is {{enum|GL_TRUE}} then messages that match the filter formed by {{param|source}}, {{param|type}}, {{param|severity}} and {{param|ids}} are enabled. Otherwise, those messages are disabled. |
Latest revision as of 06:26, 5 February 2015
Core in version | 4.6 | |
---|---|---|
Core since version | 4.3 | |
Core ARB extension | KHR_debug |
glDebugMessageControl: control the reporting of debug messages in a debug context
Function Definition
void glDebugMessageControl(GLenum source, GLenum type, GLenum severity, GLsizei count, const GLuint *ids, GLboolean enabled);
- source
- The source of debug messages to enable or disable.
- type
- The type of debug messages to enable or disable.
- severity
- The severity of debug messages to enable or disable.
- count
- The length of the array ids.
- ids
- The address of an array of unsigned integers contianing the ids of the messages to enable or disable.
- enabled
- A Boolean flag determining whether the selected messages should be enabled or disabled.
Description
glDebugMessageControl controls the reporting of debug messages generated by a debug context. The parameters source, type and severity form a filter to select messages from the pool of potential messages generated by the GL.
source may be GL_DEBUG_SOURCE_API, GL_DEBUG_SOURCE_WINDOW_SYSTEM, GL_DEBUG_SOURCE_SHADER_COMPILER, GL_DEBUG_SOURCE_THIRD_PARTY, GL_DEBUG_SOURCE_APPLICATION, GL_DEBUG_SOURCE_OTHER to select messages generated by usage of the GL API, the window system, the shader compiler, third party tools or libraries, explicitly by the application or by some other source, respectively. It may also take the value GL_DONT_CARE, in which case messages from all sources are referenced.
type may be one of GL_DEBUG_TYPE_ERROR, GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR, GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR, GL_DEBUG_TYPE_PORTABILITY, GL_DEBUG_TYPE_PERFORMANCE, GL_DEBUG_TYPE_OTHER, GL_DEBUG_TYPE_MARKER, GL_DEBUG_TYPE_PUSH_GROUP, or GL_DEBUG_TYPE_POP_GROUP to indicate the type of messages describing GL errors, attempted use of deprecated features, triggering of undefined behavior, portability issues, performance notifications and other types of messages. It may also take the value GL_DONT_CARE, in which case messages of all types are referenced.
severity may be one of GL_DEBUG_SEVERITY_LOW, GL_DEBUG_SEVERITY_MEDIUM, GL_DEBUG_SEVERITY_HIGH, or GL_DEBUG_SEVERITY_NOTIFICATION to select messages of low, medium or high severity messages. It may also take the value GL_DONT_CARE, in which case messages with all severities are referenced.
ids contains a list of count message identifiers to select specific messages from the pool of available messages. If count is zero then the value of ids is ignored. Otherwise, only messages appearing in this list are selected. In this case, source and type may not be GL_DONT_CARE, but severity must be GL_DONT_CARE.
If enabled is GL_TRUE then messages that match the filter formed by source, type, severity and ids are enabled. Otherwise, those messages are disabled.
Notes
Although debug messages may be enabled in a non-debug context, the quantity and detail of such messages may be substantially inferior to those in a debug context. In particular, a valid implementation of the debug message queue in a non-debug context may produce no messages at all.
GL_DEBUG_TYPE_MARKER, GL_DEBUG_TYPE_PUSH_GROUP, GL_DEBUG_TYPE_POP_GROUP, and GL_DEBUG_SEVERITY_NOTIFICATION are available only if the GL version is 4.3 or higher.
Errors
GL_INVALID_VALUE is generated if count is negative.
GL_INVALID_ENUM is generated if any of source, type or severity is not one of the accepted interface types.
GL_INVALID_OPERATION is generated if count is non-zero and either source or type is GL_DONT_CARE or if severity is not GL_DONT_CARE.
See Also
glDebugMessageInsert, glDebugMessageCallback, glGetDebugMessageLog, glPushDebugGroup, glPopDebugGroup
Copyright
Copyright © 2012 Khronos Group. This material may be distributed subject to the terms and conditions set forth in the Open Publication License, v 1.0, 8 June 1999. http://opencontent.org/openpub/.