Package org.lwjgl.vulkan
Interface VkAllocationFunctionI
-
- All Superinterfaces:
- CallbackI, CallbackI.P, Pointer
- All Known Implementing Classes:
- VkAllocationFunction
@FunctionalInterface public interface VkAllocationFunctionI extends CallbackI.P
Instances of this interface may be set to thepfnAllocation
member of theVkAllocationCallbacks
struct.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.lwjgl.system.CallbackI
CallbackI.B, CallbackI.D, CallbackI.F, CallbackI.I, CallbackI.J, CallbackI.P, CallbackI.S, CallbackI.V, CallbackI.Z
-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method and Description default long
address()
Returns the raw pointer address as along
value.default long
callback(long args)
Will be called by native code.long
invoke(long pUserData, long size, long alignment, int allocationScope)
Will be called by the Vulkan implementation to allocate memory.
-
-
-
Method Detail
-
address
default long address()
Description copied from interface:Pointer
Returns the raw pointer address as along
value.
-
callback
default long callback(long args)
Description copied from interface:CallbackI.P
Will be called by native code.- Specified by:
callback
in interfaceCallbackI.P
- Parameters:
args
- pointer to aDCArgs
iterator- Returns:
- the value to store to the result
DCValue
-
invoke
long invoke(long pUserData, long size, long alignment, int allocationScope)
Will be called by the Vulkan implementation to allocate memory.- Parameters:
pUserData
- the value specified forVkAllocationCallbacks
.pUserData
in the allocator specified by the applicationsize
- the size in bytes of the requested allocationalignment
- the requested alignment of the allocation in bytes and must be a power of twoallocationScope
- aVkSystemAllocationScope
value specifying the scope of the lifetime of the allocation- Returns:
- must either return
NULL
(in case of allocation failure or if size is zero) or a valid pointer to a memory allocation containing at least size bytes, and with the pointer value being a multiple of alignment.
-
-