org.lwjgl.vulkan.VkFreeFunctionI 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.dyncall.DynCallback.*;
/**
* Application-defined memory free function.
*
* C Specification
*
* The type of {@code pfnFree} is:
*
*
* typedef void (VKAPI_PTR *PFN_vkFreeFunction)(
* void* pUserData,
* void* pMemory);
*
* Description
*
* {@code pMemory} may be {@code NULL}, which the callback must handle safely. If {@code pMemory} is non-{@code NULL}, it must be a pointer previously allocated by {@code pfnAllocation} or {@code pfnReallocation}. The application should free this memory.
*
* See Also
*
* {@link VkAllocationCallbacks}
*/
@FunctionalInterface
@NativeType("PFN_vkFreeFunction")
public interface VkFreeFunctionI extends CallbackI.V {
String SIGNATURE = Callback.__stdcall("(pp)v");
@Override
default String getSignature() { return SIGNATURE; }
@Override
default void callback(long args) {
invoke(
dcbArgPointer(args),
dcbArgPointer(args)
);
}
/**
* Application-defined memory free function.
*
* @param pUserData the value specified for {@link VkAllocationCallbacks}{@code ::pUserData} in the allocator specified by the application.
* @param pMemory the allocation to be freed.
*/
void invoke(@NativeType("void *") long pUserData, @NativeType("void *") long pMemory);
}