/**
  * The {@code ARBDebugOutputCallback.Handler} implementation passed to this method will be used
  * for ARB_debug_output messages. If callback is null, any previously registered handler for the
  * current thread will be unregistered and stop receiving messages.
  *
  * <p>
  *
  * @param callback the callback function to use
  */
 public static void glDebugMessageCallbackARB(ARBDebugOutputCallback callback) {
   ContextCapabilities caps = GLContext.getCapabilities();
   long function_pointer = caps.glDebugMessageCallbackARB;
   BufferChecks.checkFunctionAddress(function_pointer);
   long userParam = callback == null ? 0 : CallbackUtil.createGlobalRef(callback.getHandler());
   CallbackUtil.registerContextCallbackARB(userParam);
   nglDebugMessageCallbackARB(
       callback == null ? 0 : callback.getPointer(), userParam, function_pointer);
 }