Class KHRDebug
- java.lang.Object
-
- org.lwjgl.opengl.KHRDebug
-
public class KHRDebug extends java.lang.ObjectNative bindings to the KHR_debug extension.This extension allows the GL to notify applications when various events occur that may be useful during application development, debugging and profiling.
These events are represented in the form of enumerable messages with a human-readable string representation. Examples of debug events include incorrect use of the GL, warnings of undefined behavior, and performance warnings.
A message is uniquely identified by a source, a type and an implementation-dependent ID within the source and type pair.
A message's source identifies the origin of the message and can either describe components of the GL, the window system, third-party external sources such as external debuggers, or even the application itself.
The type of the message roughly identifies the nature of the event that caused the message. Examples include errors, performance warnings, warnings about undefined behavior or notifications identifying that the application is within a specific section of the application code.
A message's ID for a given source and type further distinguishes messages within namespaces. For example, an error caused by a negative parameter value or an invalid internal texture format are both errors generated by the API, but would likely have different message IDs.
Each message is also assigned to a severity level that denotes roughly how "important" that message is in comparison to other messages across all sources and types. For example, notification of a GL error would likely have a higher severity than a performance warning due to redundant state changes.
Furthermore, every message contains an implementation-dependent string representation that provides a useful description of the event.
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 a GL error, or any other debuggable event has happened after each call to a GL function. With a callback, developers can keep their code free of debug checks, set breakpoints in the callback function, and only have to react to messages as they occur. In situations where using a callback is not possible, a message log is also provided that stores only 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 sets of messages can be turned off based on combination of source and type, through the entire application code or only section of the code encapsulated in debug groups. A debug group may also be used to annotate the command stream using descriptive texts.
This extension also defines debug markers, a mechanism for the OpenGL application to annotate the command stream with markers for discrete events.
When profiling or debugging an OpenGL application with a built-in or an external debugger or profiler, it is difficult to relate the commands within the command stream to the elements of the scene or parts of the program code to which they correspond. Debug markers and debug groups help obviate this by allowing applications to specify this link. For example, a debug marker can be used to identify the beginning of a frame in the command stream and a debug group can encapsulate a specific command stream to identify a rendering pass. Debug groups also allow control of the debug outputs volume per section of an application code providing an effective way to handle the massive amount of debug outputs that drivers can generate.
Some existing implementations of
ARB_debug_outputonly expose the ARB_debug_output extension string if the context was created with the debug flag {GLX|WGL}_CONTEXT_DEBUG_BIT_ARB as specified in {GLX|WGL}_ARB_create_context. The behavior is not obvious when the functionality is brought into the OpenGL core specification because the extension string and function entry points must always exist.This extension modifies the existing ARB_debug_output extension to allow implementations to always have an empty message log. The specific messages written to the message log or callback routines are already implementation defined, so this specification simply makes it explicit that it's fine for there to be zero messages generated, even when a GL error occurs, which is useful if the context is non-debug.
Debug output can be enabled and disabled by changing the
DEBUG_OUTPUTstate. It is implementation defined how much debug output is generated if the context was created without theCONTEXT_FLAG_DEBUG_BITset. This is a new query bit added to the existingCONTEXT_FLAGSstate to specify whether the context was created with debug enabled.Finally, this extension defines a mechanism for OpenGL applications to label their objects (textures, buffers, shaders, etc.) with a descriptive string.
When profiling or debugging an OpenGL application within an external or built-in (debut output API) debugger or profiler it is difficult to identify objects from their object names (integers).
Even when the object itself is viewed it can be problematic to differentiate between similar objects. Attaching a descriptive string, a label, to an object obviates this difficulty.
The intended purpose of this extension is purely to improve the user experience within OpenGL development tools and application built-in profilers and debuggers. This extension typically improves OpenGL programmers efficiency by allowing them to instantly detect issues and the reason for these issues giving him more time to focus on adding new features to an OpenGL application.
Promoted to core in
OpenGL 4.3.
-
-
Field Summary
Fields Modifier and Type Field and Description static intGL_BUFFERTokens accepted or provided by theidentifierparameters of ObjectLabel and GetObjectLabel.static intGL_CONTEXT_FLAG_DEBUG_BITReturned by GetIntegerv whenpnameis CONTEXT_FLAGS.static intGL_DEBUG_CALLBACK_FUNCTION
GL_DEBUG_CALLBACK_USER_PARAMTokens accepted by thepnameparameter of GetPointerv.static intGL_DEBUG_GROUP_STACK_DEPTH
GL_DEBUG_LOGGED_MESSAGES
GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTHTokens accepted by thevalueparameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.static intGL_DEBUG_OUTPUT
GL_DEBUG_OUTPUT_SYNCHRONOUSTokens accepted by thetargetparameters of Enable, Disable, and IsEnabled.static intGL_DEBUG_SEVERITY_HIGH
GL_DEBUG_SEVERITY_LOW
GL_DEBUG_SEVERITY_MEDIUM
GL_DEBUG_SEVERITY_NOTIFICATIONTokens accepted or provided by theseverityparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and theseveritiesparameter of GetDebugMessageLog.static intGL_DEBUG_SOURCE_API
GL_DEBUG_SOURCE_APPLICATION
GL_DEBUG_SOURCE_OTHER
GL_DEBUG_SOURCE_SHADER_COMPILER
GL_DEBUG_SOURCE_THIRD_PARTY
GL_DEBUG_SOURCE_WINDOW_SYSTEMTokens accepted or provided by thesourceparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thesourcesparameter of GetDebugMessageLog (some commands restrictsourceto a subset of these parameters; see the specification body for details).static intGL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
GL_DEBUG_TYPE_ERROR
GL_DEBUG_TYPE_MARKER
GL_DEBUG_TYPE_OTHER
GL_DEBUG_TYPE_PERFORMANCETokens accepted or provided by thetypeparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.static intGL_DEBUG_TYPE_POP_GROUPTokens accepted or provided by thetypeparameters of DebugMessageControl and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.static intGL_DEBUG_TYPE_PORTABILITYTokens accepted or provided by thetypeparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.static intGL_DEBUG_TYPE_PUSH_GROUPTokens accepted or provided by thetypeparameters of DebugMessageControl and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.static intGL_DEBUG_TYPE_UNDEFINED_BEHAVIORTokens accepted or provided by thetypeparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.static intGL_DISPLAY_LISTTokens accepted or provided by theidentifierparameters of ObjectLabel and GetObjectLabel.static intGL_MAX_DEBUG_GROUP_STACK_DEPTH
GL_MAX_DEBUG_LOGGED_MESSAGES
GL_MAX_DEBUG_MESSAGE_LENGTH
GL_MAX_LABEL_LENGTHTokens accepted by thevalueparameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.static intGL_PROGRAM
GL_PROGRAM_PIPELINE
GL_QUERY
GL_SAMPLER
GL_SHADERTokens accepted or provided by theidentifierparameters of ObjectLabel and GetObjectLabel.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidglDebugMessageCallback(GLDebugMessageCallbackI callback, long userParam)Specifies a callback to receive debugging messages from the GL.static voidglDebugMessageControl(int source, int type, int severity, int[] ids, boolean enabled)Array version of:DebugMessageControlstatic voidglDebugMessageControl(int source, int type, int severity, int id, boolean enabled)Controls the volume of debug output in the active debug group, by disabling specific or groups of messages.static voidglDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, boolean enabled)Controls the volume of debug output in the active debug group, by disabling specific or groups of messages.static voidglDebugMessageInsert(int source, int type, int id, int severity, java.nio.ByteBuffer message)This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or signals about specific render system events.static voidglDebugMessageInsert(int source, int type, int id, int severity, java.lang.CharSequence message)This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or signals about specific render system events.static intglGetDebugMessageLog(int count, int[] sources, int[] types, int[] ids, int[] severities, int[] lengths, java.nio.ByteBuffer messageLog)Array version of:GetDebugMessageLogstatic intglGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog)Retrieves messages from the debug message log.static java.lang.StringglGetObjectLabel(int identifier, int name)Retrieves the label of a named object identified within a namespace.static java.lang.StringglGetObjectLabel(int identifier, int name, int bufSize)Retrieves the label of a named object identified within a namespace.static voidglGetObjectLabel(int identifier, int name, int[] length, java.nio.ByteBuffer label)Array version of:GetObjectLabelstatic voidglGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, java.nio.ByteBuffer label)Retrieves the label of a named object identified within a namespace.static java.lang.StringglGetObjectPtrLabel(long ptr)Retrieves the label of a sync object identified by a pointer.static java.lang.StringglGetObjectPtrLabel(long ptr, int bufSize)Retrieves the label of a sync object identified by a pointer.static voidglGetObjectPtrLabel(long ptr, int[] length, java.nio.ByteBuffer label)Array version of:GetObjectPtrLabelstatic voidglGetObjectPtrLabel(long ptr, java.nio.IntBuffer length, java.nio.ByteBuffer label)Retrieves the label of a sync object identified by a pointer.static voidglObjectLabel(int identifier, int name, java.nio.ByteBuffer label)Labels a named object identified within a namespace.static voidglObjectLabel(int identifier, int name, java.lang.CharSequence label)Labels a named object identified within a namespace.static voidglObjectPtrLabel(long ptr, java.nio.ByteBuffer label)Labels a sync object identified by a pointer.static voidglObjectPtrLabel(long ptr, java.lang.CharSequence label)Labels a sync object identified by a pointer.static voidglPopDebugGroup()Pops the active debug group.static voidglPushDebugGroup(int source, int id, java.nio.ByteBuffer message)Pushes a debug group described by the stringmessageinto the command stream.static voidglPushDebugGroup(int source, int id, java.lang.CharSequence message)Pushes a debug group described by the stringmessageinto the command stream.
-
-
-
Field Detail
-
GL_DEBUG_OUTPUT, GL_DEBUG_OUTPUT_SYNCHRONOUS
Tokens accepted by thetargetparameters of Enable, Disable, and IsEnabled.
-
GL_CONTEXT_FLAG_DEBUG_BIT
Returned by GetIntegerv whenpnameis CONTEXT_FLAGS.
-
GL_MAX_DEBUG_MESSAGE_LENGTH, GL_MAX_DEBUG_LOGGED_MESSAGES, GL_DEBUG_LOGGED_MESSAGES, GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH, GL_MAX_DEBUG_GROUP_STACK_DEPTH, GL_DEBUG_GROUP_STACK_DEPTH, GL_MAX_LABEL_LENGTH
Tokens accepted by thevalueparameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v.
-
GL_DEBUG_CALLBACK_FUNCTION, GL_DEBUG_CALLBACK_USER_PARAM
Tokens accepted by thepnameparameter of GetPointerv.
-
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
Tokens accepted or provided by thesourceparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thesourcesparameter of GetDebugMessageLog (some commands restrictsourceto a subset of these parameters; see the specification body for details).
-
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
Tokens accepted or provided by thetypeparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.
-
GL_DEBUG_TYPE_PUSH_GROUP, GL_DEBUG_TYPE_POP_GROUP
Tokens accepted or provided by thetypeparameters of DebugMessageControl and DEBUGPROC, and thetypesparameter of GetDebugMessageLog.
-
GL_DEBUG_SEVERITY_HIGH, GL_DEBUG_SEVERITY_MEDIUM, GL_DEBUG_SEVERITY_LOW, GL_DEBUG_SEVERITY_NOTIFICATION
Tokens accepted or provided by theseverityparameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and theseveritiesparameter of GetDebugMessageLog.
-
GL_BUFFER, GL_SHADER, GL_PROGRAM, GL_QUERY, GL_PROGRAM_PIPELINE, GL_SAMPLER, GL_DISPLAY_LIST
Tokens accepted or provided by theidentifierparameters of ObjectLabel and GetObjectLabel.
-
-
Method Detail
-
glDebugMessageControl
public static void glDebugMessageControl(int source, int type, int severity, java.nio.IntBuffer ids, boolean enabled)Controls the volume of debug output in the active debug group, by disabling specific or groups of messages.If
enabledisTRUE, the referenced subset of messages will be enabled. IfFALSE, then those messages will be disabled.This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following ways:
- If
source,type, orseverityisDONT_CARE, the messages from all sources, of all types, or of all severities are referenced respectively. - When values other than
DONT_CAREare specified, all messages whose source, type, or severity match the specifiedsource,type, orseverityrespectively will be referenced. - If
countis greater than zero, thenidsis an array ofcountmessage IDs for the specified combination ofsourceandtype. In this case, ifsourceortypeisDONT_CARE, orseverityis notDONT_CARE, the errorINVALID_OPERATIONis generated.
Unrecognized message IDs in
idsare ignored. Ifcountis zero, the value ifidsis ignored.Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a single call, and individually disabling all messages from that source using their types and IDs.
If the
DEBUG_OUTPUTstate is disabled the GL operates the same as if messages of everysource,typeorseverityare disabled.- Parameters:
source- the source of debug messages to enable or disable. One of:DEBUG_SOURCE_APIDEBUG_SOURCE_WINDOW_SYSTEMDEBUG_SOURCE_SHADER_COMPILERDEBUG_SOURCE_THIRD_PARTYDEBUG_SOURCE_APPLICATIONDEBUG_SOURCE_OTHERtype- the type of debug messages to enable or disable. One of:DEBUG_TYPE_ERRORDEBUG_TYPE_DEPRECATED_BEHAVIORDEBUG_TYPE_UNDEFINED_BEHAVIORDEBUG_TYPE_PORTABILITYDEBUG_TYPE_PERFORMANCEDEBUG_TYPE_OTHERDEBUG_TYPE_MARKERseverity- the severity of debug messages to enable or disable. One of:DEBUG_SEVERITY_HIGHDEBUG_SEVERITY_MEDIUMDEBUG_SEVERITY_LOWDEBUG_SEVERITY_NOTIFICATIONids- an array of unsigned integers containing the ids of the messages to enable or disableenabled- whether the selected messages should be enabled or disabled
- If
-
glDebugMessageControl
public static void glDebugMessageControl(int source, int type, int severity, int id, boolean enabled)Controls the volume of debug output in the active debug group, by disabling specific or groups of messages.If
enabledisTRUE, the referenced subset of messages will be enabled. IfFALSE, then those messages will be disabled.This command can reference different subsets of messages by first considering the set of all messages, and filtering out messages based on the following ways:
- If
source,type, orseverityisDONT_CARE, the messages from all sources, of all types, or of all severities are referenced respectively. - When values other than
DONT_CAREare specified, all messages whose source, type, or severity match the specifiedsource,type, orseverityrespectively will be referenced. - If
countis greater than zero, thenidsis an array ofcountmessage IDs for the specified combination ofsourceandtype. In this case, ifsourceortypeisDONT_CARE, orseverityis notDONT_CARE, the errorINVALID_OPERATIONis generated.
Unrecognized message IDs in
idsare ignored. Ifcountis zero, the value ifidsis ignored.Although messages are grouped into an implicit hierarchy by their sources and types, there is no explicit per-source, per-type or per-severity enabled state. Instead, the enabled state is stored individually for each message. There is no difference between disabling all messages from one source in a single call, and individually disabling all messages from that source using their types and IDs.
If the
DEBUG_OUTPUTstate is disabled the GL operates the same as if messages of everysource,typeorseverityare disabled.- Parameters:
source- the source of debug messages to enable or disable. One of:DEBUG_SOURCE_APIDEBUG_SOURCE_WINDOW_SYSTEMDEBUG_SOURCE_SHADER_COMPILERDEBUG_SOURCE_THIRD_PARTYDEBUG_SOURCE_APPLICATIONDEBUG_SOURCE_OTHERtype- the type of debug messages to enable or disable. One of:DEBUG_TYPE_ERRORDEBUG_TYPE_DEPRECATED_BEHAVIORDEBUG_TYPE_UNDEFINED_BEHAVIORDEBUG_TYPE_PORTABILITYDEBUG_TYPE_PERFORMANCEDEBUG_TYPE_OTHERDEBUG_TYPE_MARKERseverity- the severity of debug messages to enable or disable. One of:DEBUG_SEVERITY_HIGHDEBUG_SEVERITY_MEDIUMDEBUG_SEVERITY_LOWDEBUG_SEVERITY_NOTIFICATIONenabled- whether the selected messages should be enabled or disabled
- If
-
glDebugMessageInsert
public static void glDebugMessageInsert(int source, int type, int id, int severity, java.nio.ByteBuffer message) public static void glDebugMessageInsert(int source, int type, int id, int severity, java.lang.CharSequence message)This function can be called by applications and third-party libraries to generate their own messages, such as ones containing timestamp information or signals about specific render system events.The value of
idspecifies the ID for the message andseverityindicates its severity level as defined by the caller. The stringbufcontains the string representation of the message. The parameterlengthcontains the number of characters inbuf. Iflengthis negative, it is implied thatbufcontains a null terminated string. The errorINVALID_VALUEwill be generated if the number of characters inbuf, excluding the null terminator whenlengthis negative, is not less than the value ofMAX_DEBUG_MESSAGE_LENGTH.If the
DEBUG_OUTPUTstate is disabled calls to DebugMessageInsert are discarded and do not generate an error.- Parameters:
source- the source of the debug message to insert. One of:DEBUG_SOURCE_APIDEBUG_SOURCE_WINDOW_SYSTEMDEBUG_SOURCE_SHADER_COMPILERDEBUG_SOURCE_THIRD_PARTYDEBUG_SOURCE_APPLICATIONDEBUG_SOURCE_OTHERtype- the type of the debug message insert. One of:DEBUG_TYPE_ERRORDEBUG_TYPE_DEPRECATED_BEHAVIORDEBUG_TYPE_UNDEFINED_BEHAVIORDEBUG_TYPE_PORTABILITYDEBUG_TYPE_PERFORMANCEDEBUG_TYPE_OTHERDEBUG_TYPE_MARKERid- the user-supplied identifier of the message to insert. One of:DEBUG_SEVERITY_HIGHDEBUG_SEVERITY_MEDIUMDEBUG_SEVERITY_LOWDEBUG_SEVERITY_NOTIFICATIONseverity- the severity of the debug messages to insertmessage- a character array containing the message to insert
-
glDebugMessageCallback
public static void glDebugMessageCallback(GLDebugMessageCallbackI callback, long userParam)
Specifies a callback to receive debugging messages from the GL.The function's prototype must follow the type definition of DEBUGPROC including its platform-dependent calling convention. Anything else will result in undefined behavior. Only one debug callback can be specified for the current context, and further calls overwrite the previous callback. Specifying
NULLas the value ofcallbackclears the current callback and disables message output through callbacks. Applications can provide user-specified data through the pointeruserParam. The context will store this pointer and will include it as one of the parameters in each call to the callback function.If the application has specified a callback function for receiving debug output, the implementation will call that function whenever any enabled message is generated. The source, type, ID, and severity of the message are specified by the DEBUGPROC parameters
source,type,id, andseverity, respectively. The string representation of the message is stored inmessageand its length (excluding the null-terminator) is stored inlength. The parameteruserParamis the user-specified parameter that was given when calling DebugMessageCallback.Applications can query the current callback function and the current user-specified parameter by obtaining the values of
DEBUG_CALLBACK_FUNCTIONandDEBUG_CALLBACK_USER_PARAM, respectively.Applications that specify a callback function must be aware of certain special conditions when executing code inside a callback when it is called by the GL, regardless of the debug source.
The memory for
messageis owned and managed by the GL, and should only be considered valid for the duration of the function call.The behavior of calling any GL or window system function from within the callback function is undefined and may lead to program termination.
Care must also be taken in securing debug callbacks for use with asynchronous debug output by multi-threaded GL implementations.
If the
DEBUG_OUTPUTstate is disabled then the GL will not call the callback function.- Parameters:
callback- a callback function that will be called when a debug message is generateduserParam- a user supplied pointer that will be passed on each invocation ofcallback
-
glGetDebugMessageLog
public static int glGetDebugMessageLog(int count, java.nio.IntBuffer sources, java.nio.IntBuffer types, java.nio.IntBuffer ids, java.nio.IntBuffer severities, java.nio.IntBuffer lengths, java.nio.ByteBuffer messageLog)Retrieves messages from the debug message log.This function fetches a maximum of
countmessages from the message log, and will return the number of messages successfully fetched.Messages will be fetched from the log in order of oldest to newest. Those messages that were fetched will be removed from the log.
The sources, types, severities, IDs, and string lengths of fetched messages will be stored in the application-provided arrays
sources,types,severities,ids, andlengths, respectively. The application is responsible for allocating enough space for each array to hold up tocountelements. The string representations of all fetched messages are stored in themessageLogarray. If multiple messages are fetched, their strings are concatenated into the samemessageLogarray and will be separated by single null terminators. The last string in the array will also be null-terminated. The maximum size ofmessageLog, including the space used by all null terminators, is given bybufSize. IfbufSizeis less than zero andmessageLogis notNULL, anINVALID_VALUEerror will be generated. If a message's string, including its null terminator, can not fully fit within themessageLogarray's remaining space, then that message and any subsequent messages will not be fetched and will remain in the log. The string lengths stored in the arraylengthsinclude the space for the null terminator of each string.Any or all of the arrays
sources,types,ids,severities,lengthsandmessageLogcan also be null pointers, which causes the attributes for such arrays to be discarded when messages are fetched, however those messages will still be removed from the log. Thus to simply delete up tocountmessages from the message log while ignoring their attributes, the application can call the function with null pointers for all attribute arrays.If the context was created without the
CONTEXT_FLAG_DEBUG_BITin theCONTEXT_FLAGSstate, then the GL can opt to never add messages to the message log so GetDebugMessageLog will always return zero.- Parameters:
count- the number of debug messages to retrieve from the logsources- an array of variables to receive the sources of the retrieved messagestypes- an array of variables to receive the types of the retrieved messagesids- an array of unsigned integers to receive the ids of the retrieved messagesseverities- an array of variables to receive the severites of the retrieved messageslengths- an array of variables to receive the lengths of the received messagesmessageLog- an array of characters that will receive the messages
-
glPushDebugGroup
public static void glPushDebugGroup(int source, int id, java.nio.ByteBuffer message) public static void glPushDebugGroup(int source, int id, java.lang.CharSequence message)Pushes a debug group described by the stringmessageinto the command stream. The value ofidspecifies the ID of messages generated. The parameterlengthcontains the number of characters inmessage. Iflengthis negative, it is implied thatmessagecontains a null terminated string. The message has the specifiedsourceandid,typeDEBUG_TYPE_PUSH_GROUP, andseverityDEBUG_SEVERITY_NOTIFICATION. The GL will put a new debug group on top of the debug group stack which inherits the control of the volume of debug output of the debug group previously residing on the top of the debug group stack. Because debug groups are strictly hierarchical, any additional control of the debug output volume will only apply within the active debug group and the debug groups pushed on top of the active debug group.An
INVALID_ENUMerror is generated if the value ofsourceis neitherDEBUG_SOURCE_APPLICATIONnorDEBUG_SOURCE_THIRD_PARTY. AnINVALID_VALUEerror is generated iflengthis negative and the number of characters inmessage, excluding the null-terminator, is not less than the value ofMAX_DEBUG_MESSAGE_LENGTH.- Parameters:
source- the source of the debug message. One of:DEBUG_SOURCE_APPLICATIONDEBUG_SOURCE_THIRD_PARTYid- the identifier of the messagemessage- a string containing the message to be sent to the debug output stream
-
glPopDebugGroup
public static void glPopDebugGroup()
Pops the active debug group. When a debug group is popped, the GL will also generate a debug output message describing its cause based on themessagestring, the sourcesource, and an IDidsubmitted to the associatedPushDebugGroupcommand.DEBUG_TYPE_PUSH_GROUPandDEBUG_TYPE_POP_GROUPshare a single namespace for messageid.severityhas the valueDEBUG_SEVERITY_NOTIFICATION. Thetypehas the valueDEBUG_TYPE_POP_GROUP. Popping a debug group restores the debug output volume control of the parent debug group.Attempting to pop the default debug group off the stack generates a
STACK_UNDERFLOWerror; pushing a debug group onto a stack containingMAX_DEBUG_GROUP_STACK_DEPTHminus one elements will generate aSTACK_OVERFLOWerror.
-
glObjectLabel
public static void glObjectLabel(int identifier, int name, java.nio.ByteBuffer label) public static void glObjectLabel(int identifier, int name, java.lang.CharSequence label)Labels a named object identified within a namespace.- Parameters:
identifier- the namespace from which the name of the object is allocated. One of:BUFFERSHADERPROGRAMQUERYPROGRAM_PIPELINESAMPLERDISPLAY_LISTVERTEX_ARRAYTEXTURERENDERBUFFERFRAMEBUFFERTRANSFORM_FEEDBACKname- the name of the object to labellabel- a string containing the label to assign to the object
-
glGetObjectLabel
public static void glGetObjectLabel(int identifier, int name, java.nio.IntBuffer length, java.nio.ByteBuffer label)Retrieves the label of a named object identified within a namespace.- Parameters:
identifier- the namespace from which the name of the object is allocated. One of:BUFFERSHADERPROGRAMQUERYPROGRAM_PIPELINESAMPLERDISPLAY_LISTVERTEX_ARRAYTEXTURERENDERBUFFERFRAMEBUFFERTRANSFORM_FEEDBACKname- the name of the object whose label to retrievelength- the address of a variable to receive the length of the object labellabel- a string that will receive the object label
-
glGetObjectLabel
public static java.lang.String glGetObjectLabel(int identifier, int name, int bufSize)Retrieves the label of a named object identified within a namespace.- Parameters:
identifier- the namespace from which the name of the object is allocated. One of:BUFFERSHADERPROGRAMQUERYPROGRAM_PIPELINESAMPLERDISPLAY_LISTVERTEX_ARRAYTEXTURERENDERBUFFERFRAMEBUFFERTRANSFORM_FEEDBACKname- the name of the object whose label to retrievebufSize- the length of the buffer whose address is inlabel
-
glGetObjectLabel
public static java.lang.String glGetObjectLabel(int identifier, int name)Retrieves the label of a named object identified within a namespace.- Parameters:
identifier- the namespace from which the name of the object is allocated. One of:BUFFERSHADERPROGRAMQUERYPROGRAM_PIPELINESAMPLERDISPLAY_LISTVERTEX_ARRAYTEXTURERENDERBUFFERFRAMEBUFFERTRANSFORM_FEEDBACKname- the name of the object whose label to retrieve
-
glObjectPtrLabel
public static void glObjectPtrLabel(long ptr, java.nio.ByteBuffer label) public static void glObjectPtrLabel(long ptr, java.lang.CharSequence label)Labels a sync object identified by a pointer.- Parameters:
ptr- a pointer identifying a sync objectlabel- a string containing the label to assign to the object
-
glGetObjectPtrLabel
public static void glGetObjectPtrLabel(long ptr, java.nio.IntBuffer length, java.nio.ByteBuffer label)Retrieves the label of a sync object identified by a pointer.- Parameters:
ptr- the name of the sync object whose label to retrievelength- a variable to receive the length of the object labellabel- a string that will receive the object label
-
glGetObjectPtrLabel
public static java.lang.String glGetObjectPtrLabel(long ptr, int bufSize)Retrieves the label of a sync object identified by a pointer.- Parameters:
ptr- the name of the sync object whose label to retrievebufSize- the length of the buffer whose address is inlabel
-
glGetObjectPtrLabel
public static java.lang.String glGetObjectPtrLabel(long ptr)
Retrieves the label of a sync object identified by a pointer.- Parameters:
ptr- the name of the sync object whose label to retrieve
-
glDebugMessageControl
public static void glDebugMessageControl(int source, int type, int severity, int[] ids, boolean enabled)Array version of:DebugMessageControl
-
glGetDebugMessageLog
public static int glGetDebugMessageLog(int count, int[] sources, int[] types, int[] ids, int[] severities, int[] lengths, java.nio.ByteBuffer messageLog)Array version of:GetDebugMessageLog
-
glGetObjectLabel
public static void glGetObjectLabel(int identifier, int name, int[] length, java.nio.ByteBuffer label)Array version of:GetObjectLabel
-
glGetObjectPtrLabel
public static void glGetObjectPtrLabel(long ptr, int[] length, java.nio.ByteBuffer label)Array version of:GetObjectPtrLabel
-
-