org.lwjgl.vulkan.VkDeviceMemoryReportCallbackEXT Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of lwjgl-vulkan Show documentation
Show all versions of lwjgl-vulkan Show documentation
A new generation graphics and compute API that provides high-efficiency, cross-platform access to modern GPUs used in a wide variety of devices from PCs and consoles to mobile phones and embedded platforms.
/*
* Copyright LWJGL. All rights reserved.
* License terms: https://www.lwjgl.org/license
* MACHINE GENERATED FILE, DO NOT EDIT
*/
package org.lwjgl.vulkan;
import javax.annotation.*;
import org.lwjgl.system.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Application-defined device memory report callback function.
*
* C Specification
*
* The prototype for the {@link VkDeviceDeviceMemoryReportCreateInfoEXT}{@code ::pfnUserCallback} function implemented by the application is:
*
*
* typedef void (VKAPI_PTR *PFN_vkDeviceMemoryReportCallbackEXT)(
* const VkDeviceMemoryReportCallbackDataEXT* pCallbackData,
* void* pUserData);
*
* Description
*
* The callback must not make calls to any Vulkan commands.
*
* See Also
*
* {@link VkDeviceDeviceMemoryReportCreateInfoEXT}
*/
public abstract class VkDeviceMemoryReportCallbackEXT extends Callback implements VkDeviceMemoryReportCallbackEXTI {
/**
* Creates a {@code VkDeviceMemoryReportCallbackEXT} instance from the specified function pointer.
*
* @return the new {@code VkDeviceMemoryReportCallbackEXT}
*/
public static VkDeviceMemoryReportCallbackEXT create(long functionPointer) {
VkDeviceMemoryReportCallbackEXTI instance = Callback.get(functionPointer);
return instance instanceof VkDeviceMemoryReportCallbackEXT
? (VkDeviceMemoryReportCallbackEXT)instance
: new Container(functionPointer, instance);
}
/** Like {@link #create(long) create}, but returns {@code null} if {@code functionPointer} is {@code NULL}. */
@Nullable
public static VkDeviceMemoryReportCallbackEXT createSafe(long functionPointer) {
return functionPointer == NULL ? null : create(functionPointer);
}
/** Creates a {@code VkDeviceMemoryReportCallbackEXT} instance that delegates to the specified {@code VkDeviceMemoryReportCallbackEXTI} instance. */
public static VkDeviceMemoryReportCallbackEXT create(VkDeviceMemoryReportCallbackEXTI instance) {
return instance instanceof VkDeviceMemoryReportCallbackEXT
? (VkDeviceMemoryReportCallbackEXT)instance
: new Container(instance.address(), instance);
}
protected VkDeviceMemoryReportCallbackEXT() {
super(CIF);
}
VkDeviceMemoryReportCallbackEXT(long functionPointer) {
super(functionPointer);
}
private static final class Container extends VkDeviceMemoryReportCallbackEXT {
private final VkDeviceMemoryReportCallbackEXTI delegate;
Container(long functionPointer, VkDeviceMemoryReportCallbackEXTI delegate) {
super(functionPointer);
this.delegate = delegate;
}
@Override
public void invoke(long pCallbackData, long pUserData) {
delegate.invoke(pCallbackData, pUserData);
}
}
}