Class KHRDebug
- java.lang.Object
-
- org.lwjgl.egl.KHRDebug
-
public class KHRDebug extends java.lang.Object
Native bindings to the KHR_debug extension.This extension allows EGL to notify applications when various events occur that may be useful during application development and debugging.
These events are represented in the form of debug messages with a human-readable string representation. Examples of debug events include errors due to incorrect use of the EGL API, warnings of undefined behavior, and performance warnings.
The "type" of the message roughly identifies the nature of the event that caused the message. Examples include input errors, performance information, or warnings about undefined behavior.
Messages are communicated to the application through an application- defined callback function that is called by the EGL implementation on each debug message. The motivation for the callback routine is to free application developers from actively having to query whether an EGL error, or any other debuggable event has happened after each call to a EGL 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. The callback also offers much more information than just an error code.
To control the volume of debug output, types of messages can be enabled or disabled. The mechanism is controlled by attributes passed to EGL. The state of the message type control can be queried.
Debug output can be enabled and disabled by changing the callback function.
NULL
will disable the feature while a valid function pointer will enable it.Finally, this extension defines a mechanism for EGL applications to label their objects (contexts, surfaces, syncs, etc.) with a pointer to an application provided structure. This pointer can be a descriptive string, identifier or pointer to a structure. This enables the application to associate the EGL object with application information. EGL will not interpret this pointer as a string or any other meaning - just attach to the object and pass back in the callback when that object is the primary object of an event.
-
-
Field Summary
Fields Modifier and Type Field Description static int
EGL_DEBUG_CALLBACK_KHR
Tokens provided by the input attribute to eglQueryDebugKHR.static int
EGL_DEBUG_MSG_CRITICAL_KHR
EGL_DEBUG_MSG_ERROR_KHR
EGL_DEBUG_MSG_INFO_KHR
EGL_DEBUG_MSG_WARN_KHRTokens provided by themessageType
parameter of EGLDEBUGPROCKHR or the attributes input toDebugMessageControlKHR
or attribute ofQueryDebugKHR
.static int
EGL_OBJECT_CONTEXT_KHR
EGL_OBJECT_DISPLAY_KHR
EGL_OBJECT_IMAGE_KHR
EGL_OBJECT_STREAM_KHR
EGL_OBJECT_SURFACE_KHR
EGL_OBJECT_SYNC_KHR
EGL_OBJECT_THREAD_KHRTokens accepted by theobjectType
parameter of functionLabelObjectKHR
.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static int
eglDebugMessageControlKHR(EGLDebugMessageKHRCallbackI callback, org.lwjgl.PointerBuffer attrib_list)
static int
eglLabelObjectKHR(long display, int objectType, long object, long label)
static boolean
eglQueryDebugKHR(int attribute, org.lwjgl.PointerBuffer value)
static int
neglDebugMessageControlKHR(long callback, long attrib_list)
static int
neglQueryDebugKHR(int attribute, long value)
-
-
-
Field Detail
-
EGL_OBJECT_THREAD_KHR, EGL_OBJECT_DISPLAY_KHR, EGL_OBJECT_CONTEXT_KHR, EGL_OBJECT_SURFACE_KHR, EGL_OBJECT_IMAGE_KHR, EGL_OBJECT_SYNC_KHR, EGL_OBJECT_STREAM_KHR
Tokens accepted by theobjectType
parameter of functionLabelObjectKHR
.
-
EGL_DEBUG_MSG_CRITICAL_KHR, EGL_DEBUG_MSG_ERROR_KHR, EGL_DEBUG_MSG_WARN_KHR, EGL_DEBUG_MSG_INFO_KHR
Tokens provided by themessageType
parameter of EGLDEBUGPROCKHR or the attributes input toDebugMessageControlKHR
or attribute ofQueryDebugKHR
.
-
EGL_DEBUG_CALLBACK_KHR
Tokens provided by the input attribute to eglQueryDebugKHR.
-
-
Method Detail
-
neglDebugMessageControlKHR
public static int neglDebugMessageControlKHR(long callback, long attrib_list)
-
eglDebugMessageControlKHR
public static int eglDebugMessageControlKHR(EGLDebugMessageKHRCallbackI callback, @Nullable org.lwjgl.PointerBuffer attrib_list)
-
neglQueryDebugKHR
public static int neglQueryDebugKHR(int attribute, long value)
-
eglQueryDebugKHR
public static boolean eglQueryDebugKHR(int attribute, org.lwjgl.PointerBuffer value)
-
eglLabelObjectKHR
public static int eglLabelObjectKHR(long display, int objectType, long object, long label)
-
-