org.lwjgl.vulkan.VkInternalFreeNotification 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 org.lwjgl.system.*;
import static org.lwjgl.system.MemoryUtil.*;
/**
* Application-defined memory free notification function.
*
* C Specification
*
* The type of {@code pfnInternalFree} is:
*
* typedef void (VKAPI_PTR *PFN_vkInternalFreeNotification)(
void* pUserData,
size_t size,
VkInternalAllocationType allocationType,
VkSystemAllocationScope allocationScope);
*
* See Also
*
* {@link VkAllocationCallbacks}
*/
public abstract class VkInternalFreeNotification extends Callback implements VkInternalFreeNotificationI {
/** Creates a {@code VkInternalFreeNotification} instance from the specified function pointer. */
public static VkInternalFreeNotification create(long functionPointer) {
if ( functionPointer == NULL )
return null;
VkInternalFreeNotificationI instance = Callback.get(functionPointer);
return instance instanceof VkInternalFreeNotification
? (VkInternalFreeNotification)instance
: new Container(functionPointer, instance);
}
/** Creates a {@code VkInternalFreeNotification} instance that delegates to the specified {@code VkInternalFreeNotificationI} instance. */
public static VkInternalFreeNotification create(VkInternalFreeNotificationI instance) {
return instance instanceof VkInternalFreeNotification
? (VkInternalFreeNotification)instance
: new Container(instance.address(), instance);
}
protected VkInternalFreeNotification() {
super(SIGNATURE);
}
private VkInternalFreeNotification(long functionPointer) {
super(functionPointer);
}
private static final class Container extends VkInternalFreeNotification {
private final VkInternalFreeNotificationI delegate;
Container(long functionPointer, VkInternalFreeNotificationI delegate) {
super(functionPointer);
this.delegate = delegate;
}
@Override
public void invoke(long pUserData, long size, int allocationType, int allocationScope) {
delegate.invoke(pUserData, size, allocationType, allocationScope);
}
}
}