This extension allows the GL to notify applications when various debug events occur in contexts that have been created with the debug flag, as provided
by WGL_ARB_create_context and GLX_ARB_create_context.
These events are represented in the form of enumerable messages with an included human-readable translation. Examples of debug events include incorrect use of the GL, warnings of undefined behavior, and performance warnings.
A message is uniquely identified by a category and an implementation-dependent ID within that category. Message categories are general and are used to organize large groups of similar messages together. Examples of categories include GL errors, performance warnings, and deprecated functionality warnings. Each message is also assigned a severity level that denotes roughly how "important" that message is in comparison to other messages across all categories. For example, notification of a GL error would have a higher severity than a performance warning due to redundant state changes.
Messages are communicated to the application through an application-defined callback function that is called by the GL implementation on each debug message. The motivation for the callback routine is to free application developers from actively having to query whether any GL error or other debuggable event has happened after each call to a GL function. With a callback, developers can keep their code free of debug checks, and only have to react to messages as they occur. In order to support indirect rendering, a message log is also provided that stores copies of recent messages until they are actively queried.
To control the volume of debug output, messages can be disabled either individually by ID, or entire groups of messages can be turned off based on category or severity.
The only requirement on the minimum quantity and type of messages that implementations of this extension must support is that a message must be sent notifying the application whenever any GL error occurs. Any further messages are left to the implementation. Implementations do not have to output messages from all categories listed by this extension in order to support this extension, and new categories can be added by other extensions.
This extension places no restrictions or requirements on any additional functionality provided by the debug context flag through other extensions.
Requires WGL_ARB_create_context or GLX_ARB_create_context.
| Modifier and Type | Field and Description |
|---|---|
| public static final int | GL_DEBUG_CATEGORY_API_ERROR_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_APPLICATION_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_DEPRECATION_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_OTHER_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_PERFORMANCE_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_LOGGED_MESSAGES_AMD
Tokens accepted by GetIntegerv. |
| public static final int | GL_DEBUG_SEVERITY_HIGH_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_SEVERITY_LOW_AMD
Tokens accepted by |
| public static final int | GL_DEBUG_SEVERITY_MEDIUM_AMD
Tokens accepted by |
| public static final int | GL_MAX_DEBUG_LOGGED_MESSAGES_AMD
Tokens accepted by GetIntegerv. |
| public static final int | GL_MAX_DEBUG_MESSAGE_LENGTH_AMD
Tokens accepted by GetIntegerv. |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description | ||||
|---|---|---|---|---|---|
| public static void | glDebugMessageCallbackAMD(GLDebugMessageAMDCallbackI
a callback function that will be called when a debug message is generated callback, long a user supplied pointer that will be passed on each invocation of userParam)callbackSpecifies a callback to receive debugging messages from the GL. | ||||
| public static void | glDebugMessageEnableAMD(int category, int
the message severity. One of: severity, IntBuffer
an array of message ids ids, boolean whether to enable or disable the referenced subset of messages enabled)Allows disabling or enabling generation of subsets of messages. | ||||
| public static void | glDebugMessageEnableAMD(int category, int
the message severity. One of: severity, int id, boolean
whether to enable or disable the referenced subset of messages enabled)Allows disabling or enabling generation of subsets of messages. | ||||
| public static void | glDebugMessageEnableAMD(int category, int severity, int[] ids, boolean enabled)
Array version of: | ||||
| public static void | glDebugMessageInsertAMD(int
the message category. Must be: category, int
the message severity. One of: severity, int
the message id id, ByteBuffer the message characters buf)Injects an application-supplied message into the debug message stream. | ||||
| public static void | glDebugMessageInsertAMD(int
the message category. Must be: category, int
the message severity. One of: severity, int
the message id id, CharSequence the message characters buf)Injects an application-supplied message into the debug message stream. | ||||
| public static int | glGetDebugMessageLogAMD(int
the number of debug messages to retrieve from the log count, IntBuffer an array of variables to receive the categories of the retrieved messages categories, IntBuffer an array of variables to receive the severities of the retrieved messages severities, IntBuffer an array of variables to receive the ids of the retrieved messages ids, IntBuffer an array of variables to receive the lengths of the retrieved messages lengths, ByteBuffer an array of characters that will receive the messages messageLog)Retrieves messages from the debug message log. | ||||
| public static int | glGetDebugMessageLogAMD(int count, int[] categories, int[] severities, int[] ids, int[] lengths, ByteBuffer messageLog)
Array version of: | ||||
| public static native void | |||||
| public static native void | nglDebugMessageEnableAMD(int category, int severity, int
the number of values in the count, long ids, boolean enabled)ids arrayUnsafe version of: | ||||
| public static native void | nglDebugMessageInsertAMD(int category, int severity, int id, int
the number of character in the message length, long buf)Unsafe version of: | ||||
| public static native int | nglGetDebugMessageLogAMD(int count, int
the maximum number of characters that can be written in the bufsize, long categories, long severities, long ids, long lengths, long messageLog)message arrayUnsafe version of: |
| GL_DEBUG_CATEGORY_API_ERROR_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_API_ERROR_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_APPLICATION_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_APPLICATION_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_DEPRECATION_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_DEPRECATION_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_OTHER_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_OTHER_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_PERFORMANCE_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_PERFORMANCE_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_SHADER_COMPILER_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_UNDEFINED_BEHAVIOR_AMD Tokens accepted by | |
| GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_CATEGORY_WINDOW_SYSTEM_AMD Tokens accepted by | |
| GL_DEBUG_LOGGED_MESSAGES_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_LOGGED_MESSAGES_AMD Tokens accepted by GetIntegerv. | |
| GL_DEBUG_SEVERITY_HIGH_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_SEVERITY_HIGH_AMD Tokens accepted by | |
| GL_DEBUG_SEVERITY_LOW_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_SEVERITY_LOW_AMD Tokens accepted by | |
| GL_DEBUG_SEVERITY_MEDIUM_AMD | back to summary |
|---|---|
| public static final int GL_DEBUG_SEVERITY_MEDIUM_AMD Tokens accepted by | |
| GL_MAX_DEBUG_LOGGED_MESSAGES_AMD | back to summary |
|---|---|
| public static final int GL_MAX_DEBUG_LOGGED_MESSAGES_AMD Tokens accepted by GetIntegerv. | |
| GL_MAX_DEBUG_MESSAGE_LENGTH_AMD | back to summary |
|---|---|
| public static final int GL_MAX_DEBUG_MESSAGE_LENGTH_AMD Tokens accepted by GetIntegerv. | |
| AMDDebugOutput | back to summary |
|---|---|
| protected AMDDebugOutput() | |
| glDebugMessageCallbackAMD | back to summary |
|---|---|
| public static void glDebugMessageCallbackAMD(GLDebugMessageAMDCallbackI callback, long userParam) Specifies a callback to receive debugging messages from the GL. With If the application has specified a callback function in a debug context, the implementation will call that function whenever any unfiltered message is
generated. The ID, category, and severity of the message are specified by the callback parameters If no callback is set, then messages are instead stored in an internal message log up to some maximum number of strings as defined by the
implementation-dependent constant
| |
| glDebugMessageEnableAMD | back to summary | |||
|---|---|---|---|---|
| public static void glDebugMessageEnableAMD(int category, int severity, IntBuffer ids, boolean enabled) Allows disabling or enabling generation of subsets of messages. If
In all of the above cases, if Although messages are grouped into categories and severities, and entire groups of messages can be turned off with a single call, there is no explicit per-category or per-severity enabled state. Instead the enabled state is stored individually for each message. There is no difference between disabling a category of messages with a single call, and enumerating all messages of that category and individually disabling each of them by their ID. All messages of severity level
| ||||
| glDebugMessageEnableAMD | back to summary | |||
|---|---|---|---|---|
| public static void glDebugMessageEnableAMD(int category, int severity, int id, boolean enabled) Allows disabling or enabling generation of subsets of messages. If
In all of the above cases, if Although messages are grouped into categories and severities, and entire groups of messages can be turned off with a single call, there is no explicit per-category or per-severity enabled state. Instead the enabled state is stored individually for each message. There is no difference between disabling a category of messages with a single call, and enumerating all messages of that category and individually disabling each of them by their ID. All messages of severity level
| ||||
| glDebugMessageEnableAMD | back to summary |
|---|---|
| public static void glDebugMessageEnableAMD(int category, int severity, int[] ids, boolean enabled) Array version of: | |
| glDebugMessageInsertAMD | back to summary | ||||
|---|---|---|---|---|---|
| public static void glDebugMessageInsertAMD(int category, int severity, int id, ByteBuffer buf) Injects an application-supplied message into the debug message stream. The value of
| |||||
| glDebugMessageInsertAMD | back to summary | ||||
|---|---|---|---|---|---|
| public static void glDebugMessageInsertAMD(int category, int severity, int id, CharSequence buf) Injects an application-supplied message into the debug message stream. The value of
| |||||
| glGetDebugMessageLogAMD | back to summary |
|---|---|
| public static int glGetDebugMessageLogAMD(int count, IntBuffer categories, IntBuffer severities, IntBuffer ids, IntBuffer lengths, ByteBuffer messageLog) Retrieves messages from the debug message log. This function will fetch as many messages as possible from the message log up to
| |
| glGetDebugMessageLogAMD | back to summary |
|---|---|
| public static int glGetDebugMessageLogAMD(int count, int[] categories, int[] severities, int[] ids, int[] lengths, ByteBuffer messageLog) Array version of:
| |
| nglDebugMessageCallbackAMD | back to summary |
|---|---|
| public static native void nglDebugMessageCallbackAMD(long callback, long userParam) Unsafe version of: | |
| nglDebugMessageEnableAMD | back to summary |
|---|---|
| public static native void nglDebugMessageEnableAMD(int category, int severity, int count, long ids, boolean enabled) Unsafe version of:
| |
| nglDebugMessageInsertAMD | back to summary |
|---|---|
| public static native void nglDebugMessageInsertAMD(int category, int severity, int id, int length, long buf) Unsafe version of:
| |
| nglGetDebugMessageLogAMD | back to summary |
|---|---|
| public static native int nglGetDebugMessageLogAMD(int count, int bufsize, long categories, long severities, long ids, long lengths, long messageLog) Unsafe version of:
| |