Package org.lwjgl.opengl

# Class KHRDebug

java.lang.Object
org.lwjgl.opengl.KHRDebug

public final class KHRDebug extends Object

## Field Summary

Fields
Modifier and Type
Field
Description
`static final int`
`GL_BUFFER`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_CONTEXT_FLAG_DEBUG_BIT`
Returned by GetIntegerv when <pname> is CONTEXT_FLAGS:
`static final int`
`GL_DEBUG_CALLBACK_FUNCTION`
Tokens accepted by the <pname> parameter of GetPointerv:
`static final int`
`GL_DEBUG_CALLBACK_USER_PARAM`
Tokens accepted by the <pname> parameter of GetPointerv:
`static final int`
`GL_DEBUG_GROUP_STACK_DEPTH`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_DEBUG_LOGGED_MESSAGES`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_DEBUG_OUTPUT`
Tokens accepted by the <target> parameters of Enable, Disable, and IsEnabled:
`static final int`
`GL_DEBUG_OUTPUT_SYNCHRONOUS`
Tokens accepted by the <target> parameters of Enable, Disable, and IsEnabled:
`static final int`
`GL_DEBUG_SEVERITY_HIGH`
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SEVERITY_LOW`
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SEVERITY_MEDIUM`
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SEVERITY_NOTIFICATION`
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_API`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_APPLICATION`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_OTHER`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_SHADER_COMPILER`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_THIRD_PARTY`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_SOURCE_WINDOW_SYSTEM`
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_ERROR`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_MARKER`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_OTHER`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_PERFORMANCE`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_POP_GROUP`
Tokens accepted or provided by the <type> parameters of DebugMessageControl and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_PORTABILITY`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_PUSH_GROUP`
Tokens accepted or provided by the <type> parameters of DebugMessageControl and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR`
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:
`static final int`
`GL_DISPLAY_LIST`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_MAX_DEBUG_GROUP_STACK_DEPTH`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_MAX_DEBUG_LOGGED_MESSAGES`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_MAX_DEBUG_MESSAGE_LENGTH`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_MAX_LABEL_LENGTH`
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:
`static final int`
`GL_PROGRAM`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_PROGRAM_PIPELINE`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_QUERY`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_SAMPLER`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:
`static final int`
`GL_SHADER`
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

## Method Summary

Modifier and Type
Method
Description
`static void`
`glDebugMessageCallback(KHRDebugCallback callback)`
The `KHRDebugCallback.Handler` implementation passed to this method will be used for KHR_debug messages.
`static void`
`glDebugMessageControl(int source, int type, int severity, IntBuffer ids, boolean enabled)`
`static void`
`glDebugMessageInsert(int source, int type, int id, int severity, CharSequence buf)`
Overloads glDebugMessageInsert.
`static void`
`glDebugMessageInsert(int source, int type, int id, int severity, ByteBuffer buf)`
`static int`
`glGetDebugMessageLog(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog)`
`static String`
`glGetObjectLabel(int identifier, int name, int bufSize)`
Overloads glGetObjectLabel.
`static void`
`glGetObjectLabel(int identifier, int name, IntBuffer length, ByteBuffer label)`
`static String`
`glGetObjectPtrLabel(PointerWrapper ptr, int bufSize)`
Overloads glGetObjectPtrLabel.
`static void`
`glGetObjectPtrLabel(PointerWrapper ptr, IntBuffer length, ByteBuffer label)`
`static void`
`glObjectLabel(int identifier, int name, CharSequence label)`
Overloads glObjectLabel.
`static void`
`glObjectLabel(int identifier, int name, ByteBuffer label)`
`static void`
`glObjectPtrLabel(PointerWrapper ptr, CharSequence label)`
Overloads glObjectPtrLabel.
`static void`
`glObjectPtrLabel(PointerWrapper ptr, ByteBuffer label)`
`static void`
`glPopDebugGroup()`
`static void`
`glPushDebugGroup(int source, int id, CharSequence message)`
Overloads glPushDebugGroup.
`static void`
`glPushDebugGroup(int source, int id, ByteBuffer message)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### GL_DEBUG_OUTPUT

public static final int GL_DEBUG_OUTPUT
Tokens accepted by the <target> parameters of Enable, Disable, and IsEnabled:

See Also:
  - Constant Field Values

### GL_DEBUG_OUTPUT_SYNCHRONOUS

public static final int GL_DEBUG_OUTPUT_SYNCHRONOUS
Tokens accepted by the <target> parameters of Enable, Disable, and IsEnabled:

See Also:
  - Constant Field Values

### GL_CONTEXT_FLAG_DEBUG_BIT

public static final int GL_CONTEXT_FLAG_DEBUG_BIT
Returned by GetIntegerv when <pname> is CONTEXT_FLAGS:

See Also:
  - Constant Field Values

### GL_MAX_DEBUG_MESSAGE_LENGTH

public static final int GL_MAX_DEBUG_MESSAGE_LENGTH
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_MAX_DEBUG_LOGGED_MESSAGES

public static final int GL_MAX_DEBUG_LOGGED_MESSAGES
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_DEBUG_LOGGED_MESSAGES

public static final int GL_DEBUG_LOGGED_MESSAGES
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH

public static final int GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_MAX_DEBUG_GROUP_STACK_DEPTH

public static final int GL_MAX_DEBUG_GROUP_STACK_DEPTH
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_DEBUG_GROUP_STACK_DEPTH

public static final int GL_DEBUG_GROUP_STACK_DEPTH
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_MAX_LABEL_LENGTH

public static final int GL_MAX_LABEL_LENGTH
Tokens accepted by the <value> parameters of GetBooleanv, GetIntegerv, GetFloatv, GetDoublev and GetInteger64v:

See Also:
  - Constant Field Values

### GL_DEBUG_CALLBACK_FUNCTION

public static final int GL_DEBUG_CALLBACK_FUNCTION
Tokens accepted by the <pname> parameter of GetPointerv:

See Also:
  - Constant Field Values

### GL_DEBUG_CALLBACK_USER_PARAM

public static final int GL_DEBUG_CALLBACK_USER_PARAM
Tokens accepted by the <pname> parameter of GetPointerv:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_API

public static final int GL_DEBUG_SOURCE_API
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_WINDOW_SYSTEM

public static final int GL_DEBUG_SOURCE_WINDOW_SYSTEM
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_SHADER_COMPILER

public static final int GL_DEBUG_SOURCE_SHADER_COMPILER
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_THIRD_PARTY

public static final int GL_DEBUG_SOURCE_THIRD_PARTY
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_APPLICATION

public static final int GL_DEBUG_SOURCE_APPLICATION
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SOURCE_OTHER

public static final int GL_DEBUG_SOURCE_OTHER
Tokens accepted or provided by the <source> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <sources> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_ERROR

public static final int GL_DEBUG_TYPE_ERROR
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR

public static final int GL_DEBUG_TYPE_DEPRECATED_BEHAVIOR
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR

public static final int GL_DEBUG_TYPE_UNDEFINED_BEHAVIOR
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_PORTABILITY

public static final int GL_DEBUG_TYPE_PORTABILITY
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_PERFORMANCE

public static final int GL_DEBUG_TYPE_PERFORMANCE
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_OTHER

public static final int GL_DEBUG_TYPE_OTHER
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_MARKER

public static final int GL_DEBUG_TYPE_MARKER
Tokens accepted or provided by the <type> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_PUSH_GROUP

public static final int GL_DEBUG_TYPE_PUSH_GROUP
Tokens accepted or provided by the <type> parameters of DebugMessageControl and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_TYPE_POP_GROUP

public static final int GL_DEBUG_TYPE_POP_GROUP
Tokens accepted or provided by the <type> parameters of DebugMessageControl and DEBUGPROC, and the <types> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SEVERITY_HIGH

public static final int GL_DEBUG_SEVERITY_HIGH
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SEVERITY_MEDIUM

public static final int GL_DEBUG_SEVERITY_MEDIUM
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SEVERITY_LOW

public static final int GL_DEBUG_SEVERITY_LOW
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_DEBUG_SEVERITY_NOTIFICATION

public static final int GL_DEBUG_SEVERITY_NOTIFICATION
Tokens accepted or provided by the <severity> parameters of DebugMessageControl, DebugMessageInsert and DEBUGPROC callback functions, and the <severities> parameter of GetDebugMessageLog:

See Also:
  - Constant Field Values

### GL_BUFFER

public static final int GL_BUFFER
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_SHADER

public static final int GL_SHADER
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_PROGRAM

public static final int GL_PROGRAM
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_QUERY

public static final int GL_QUERY
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_PROGRAM_PIPELINE

public static final int GL_PROGRAM_PIPELINE
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_SAMPLER

public static final int GL_SAMPLER
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

### GL_DISPLAY_LIST

public static final int GL_DISPLAY_LIST
Tokens accepted or provided by the <identifier> parameters of ObjectLabel and GetObjectLabel:

See Also:
  - Constant Field Values

## Method Details

### glDebugMessageControl

public static void glDebugMessageControl(int source, int type, int severity, IntBuffer ids, boolean enabled)

### glDebugMessageInsert

public static void glDebugMessageInsert(int source, int type, int id, int severity, ByteBuffer buf)

### glDebugMessageInsert

public static void glDebugMessageInsert(int source, int type, int id, int severity, CharSequence buf)
Overloads glDebugMessageInsert.

### glDebugMessageCallback

public static void glDebugMessageCallback(KHRDebugCallback callback)
The `KHRDebugCallback.Handler` implementation passed to this method will be used for KHR_debug messages. If callback is null, any previously registered handler for the current thread will be unregistered and stop receiving messages.

Parameters:
  `callback` - the callback function to use

### glGetDebugMessageLog

public static int glGetDebugMessageLog(int count, IntBuffer sources, IntBuffer types, IntBuffer ids, IntBuffer severities, IntBuffer lengths, ByteBuffer messageLog)

### glPushDebugGroup

public static void glPushDebugGroup(int source, int id, ByteBuffer message)

### glPushDebugGroup

public static void glPushDebugGroup(int source, int id, CharSequence message)
Overloads glPushDebugGroup.

### glPopDebugGroup

public static void glPopDebugGroup()

### glObjectLabel

public static void glObjectLabel(int identifier, int name, ByteBuffer label)

### glObjectLabel

public static void glObjectLabel(int identifier, int name, CharSequence label)
Overloads glObjectLabel.

### glGetObjectLabel

public static void glGetObjectLabel(int identifier, int name, IntBuffer length, ByteBuffer label)

### glGetObjectLabel

public static String glGetObjectLabel(int identifier, int name, int bufSize)
Overloads glGetObjectLabel.

### glObjectPtrLabel

public static void glObjectPtrLabel(PointerWrapper ptr, ByteBuffer label)

### glObjectPtrLabel

public static void glObjectPtrLabel(PointerWrapper ptr, CharSequence label)
Overloads glObjectPtrLabel.

### glGetObjectPtrLabel

public static void glGetObjectPtrLabel(PointerWrapper ptr, IntBuffer length, ByteBuffer label)

### glGetObjectPtrLabel

public static String glGetObjectPtrLabel(PointerWrapper ptr, int bufSize)
Overloads glGetObjectPtrLabel.