public class VkAllocationCallbacks
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
pfnAllocation must be a valid pointer to a valid user-defined VkAllocationFunctionpfnReallocation must be a valid pointer to a valid user-defined VkReallocationFunctionpfnFree must be a valid pointer to a valid user-defined VkFreeFunctionpfnInternalAllocation or pfnInternalFree is not NULL, both must be valid callbacksVkAllocationFunction, VkFreeFunction, VkInternalAllocationNotification, VkInternalFreeNotification, VkReallocationFunction, AllocateMemory, CreateAccelerationStructureNV, CreateBuffer, CreateBufferView, CreateCommandPool, CreateComputePipelines, CreateDebugReportCallbackEXT, CreateDebugUtilsMessengerEXT, CreateDescriptorPool, CreateDescriptorSetLayout, CreateDescriptorUpdateTemplate, CreateDescriptorUpdateTemplateKHR, CreateDevice, CreateDisplayModeKHR, CreateDisplayPlaneSurfaceKHR, CreateEvent, CreateFence, CreateFramebuffer, CreateGraphicsPipelines, CreateHeadlessSurfaceEXT, CreateImage, CreateImageView, CreateIndirectCommandsLayoutNVX, CreateInstance, CreateMacOSSurfaceMVK, CreateMetalSurfaceEXT, CreateObjectTableNVX, CreatePipelineCache, CreatePipelineLayout, CreateQueryPool, CreateRayTracingPipelinesNV, CreateRenderPass, CreateRenderPass2KHR, CreateSampler, CreateSamplerYcbcrConversion, CreateSamplerYcbcrConversionKHR, CreateSemaphore, CreateShaderModule, CreateSharedSwapchainsKHR, CreateSwapchainKHR, CreateValidationCacheEXT, CreateWaylandSurfaceKHR, CreateWin32SurfaceKHR, CreateXlibSurfaceKHR, DestroyAccelerationStructureNV, DestroyBuffer, DestroyBufferView, DestroyCommandPool, DestroyDebugReportCallbackEXT, DestroyDebugUtilsMessengerEXT, DestroyDescriptorPool, DestroyDescriptorSetLayout, DestroyDescriptorUpdateTemplate, DestroyDescriptorUpdateTemplateKHR, DestroyDevice, DestroyEvent, DestroyFence, DestroyFramebuffer, DestroyImage, DestroyImageView, DestroyIndirectCommandsLayoutNVX, DestroyInstance, DestroyObjectTableNVX, DestroyPipeline, DestroyPipelineCache, DestroyPipelineLayout, DestroyQueryPool, DestroyRenderPass, DestroySampler, DestroySamplerYcbcrConversion, DestroySamplerYcbcrConversionKHR, DestroySemaphore, DestroyShaderModule, DestroySurfaceKHR, DestroySwapchainKHR, DestroyValidationCacheEXT, FreeMemory, RegisterDeviceEventEXT, RegisterDisplayEventEXT
pUserData – a value to be interpreted by the implementation of the callbacks. When any of the callbacks in VkAllocationCallbacks are called, the Vulkan implementation will pass this value as the first parameter to the callback. This value can vary each time an allocator is passed into a command, even when the same object takes an allocator in multiple commands.pfnAllocation – a VkAllocationFunction pointer to an application-defined memory allocation function.pfnReallocation – a VkReallocationFunction pointer to an application-defined memory reallocation function.pfnFree – a VkFreeFunction pointer to an application-defined memory free function.pfnInternalAllocation – a VkInternalAllocationNotification pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations.pfnInternalFree – a VkInternalFreeNotification pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations.
struct VkAllocationCallbacks {
void * pUserData;
PFN_vkAllocationFunction pfnAllocation;
PFN_vkReallocationFunction pfnReallocation;
PFN_vkFreeFunction pfnFree;
PFN_vkInternalAllocationNotification pfnInternalAllocation;
PFN_vkInternalFreeNotification pfnInternalFree;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkAllocationCallbacks.Buffer
An array of
VkAllocationCallbacks structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
PFNALLOCATION
The struct member offsets.
|
static int |
PFNFREE
The struct member offsets.
|
static int |
PFNINTERNALALLOCATION
The struct member offsets.
|
static int |
PFNINTERNALFREE
The struct member offsets.
|
static int |
PFNREALLOCATION
The struct member offsets.
|
static int |
PUSERDATA
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkAllocationCallbacks(java.nio.ByteBuffer container)
Creates a
VkAllocationCallbacks instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VkAllocationCallbacks |
calloc()
Returns a new
VkAllocationCallbacks instance allocated with memCalloc. |
static VkAllocationCallbacks.Buffer |
calloc(int capacity)
Returns a new
VkAllocationCallbacks.Buffer instance allocated with memCalloc. |
static VkAllocationCallbacks |
callocStack()
Returns a new
VkAllocationCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkAllocationCallbacks.Buffer |
callocStack(int capacity)
Returns a new
VkAllocationCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkAllocationCallbacks.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkAllocationCallbacks |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkAllocationCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkAllocationCallbacks |
create()
Returns a new
VkAllocationCallbacks instance allocated with BufferUtils. |
static VkAllocationCallbacks.Buffer |
create(int capacity)
Returns a new
VkAllocationCallbacks.Buffer instance allocated with BufferUtils. |
static VkAllocationCallbacks |
create(long address)
Returns a new
VkAllocationCallbacks instance for the specified memory address. |
static VkAllocationCallbacks.Buffer |
create(long address,
int capacity)
Create a
VkAllocationCallbacks.Buffer instance at the specified memory. |
static VkAllocationCallbacks |
createSafe(long address)
|
static VkAllocationCallbacks.Buffer |
createSafe(long address,
int capacity)
|
static VkAllocationCallbacks |
malloc()
Returns a new
VkAllocationCallbacks instance allocated with memAlloc. |
static VkAllocationCallbacks.Buffer |
malloc(int capacity)
Returns a new
VkAllocationCallbacks.Buffer instance allocated with memAlloc. |
static VkAllocationCallbacks |
mallocStack()
Returns a new
VkAllocationCallbacks instance allocated on the thread-local MemoryStack. |
static VkAllocationCallbacks.Buffer |
mallocStack(int capacity)
Returns a new
VkAllocationCallbacks.Buffer instance allocated on the thread-local MemoryStack. |
static VkAllocationCallbacks.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack. |
static VkAllocationCallbacks |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkAllocationCallbacks instance allocated on the specified MemoryStack. |
static VkAllocationFunction |
npfnAllocation(long struct)
Unsafe version of
pfnAllocation(). |
static void |
npfnAllocation(long struct,
VkAllocationFunctionI value)
Unsafe version of
pfnAllocation. |
static VkFreeFunction |
npfnFree(long struct)
Unsafe version of
pfnFree(). |
static void |
npfnFree(long struct,
VkFreeFunctionI value)
Unsafe version of
pfnFree. |
static VkInternalAllocationNotification |
npfnInternalAllocation(long struct)
Unsafe version of
pfnInternalAllocation(). |
static void |
npfnInternalAllocation(long struct,
VkInternalAllocationNotificationI value)
Unsafe version of
pfnInternalAllocation. |
static VkInternalFreeNotification |
npfnInternalFree(long struct)
Unsafe version of
pfnInternalFree(). |
static void |
npfnInternalFree(long struct,
VkInternalFreeNotificationI value)
Unsafe version of
pfnInternalFree. |
static VkReallocationFunction |
npfnReallocation(long struct)
Unsafe version of
pfnReallocation(). |
static void |
npfnReallocation(long struct,
VkReallocationFunctionI value)
Unsafe version of
pfnReallocation. |
static long |
npUserData(long struct)
Unsafe version of
pUserData(). |
static void |
npUserData(long struct,
long value)
Unsafe version of
pUserData. |
VkAllocationFunction |
pfnAllocation()
Returns the value of the
pfnAllocation field. |
VkAllocationCallbacks |
pfnAllocation(VkAllocationFunctionI value)
Sets the specified value to the
pfnAllocation field. |
VkFreeFunction |
pfnFree()
Returns the value of the
pfnFree field. |
VkAllocationCallbacks |
pfnFree(VkFreeFunctionI value)
Sets the specified value to the
pfnFree field. |
VkInternalAllocationNotification |
pfnInternalAllocation()
Returns the value of the
pfnInternalAllocation field. |
VkAllocationCallbacks |
pfnInternalAllocation(VkInternalAllocationNotificationI value)
Sets the specified value to the
pfnInternalAllocation field. |
VkInternalFreeNotification |
pfnInternalFree()
Returns the value of the
pfnInternalFree field. |
VkAllocationCallbacks |
pfnInternalFree(VkInternalFreeNotificationI value)
Sets the specified value to the
pfnInternalFree field. |
VkReallocationFunction |
pfnReallocation()
Returns the value of the
pfnReallocation field. |
VkAllocationCallbacks |
pfnReallocation(VkReallocationFunctionI value)
Sets the specified value to the
pfnReallocation field. |
long |
pUserData()
Returns the value of the
pUserData field. |
VkAllocationCallbacks |
pUserData(long value)
Sets the specified value to the
pUserData field. |
VkAllocationCallbacks |
set(long pUserData,
VkAllocationFunctionI pfnAllocation,
VkReallocationFunctionI pfnReallocation,
VkFreeFunctionI pfnFree,
VkInternalAllocationNotificationI pfnInternalAllocation,
VkInternalFreeNotificationI pfnInternalFree)
Initializes this struct with the specified values.
|
VkAllocationCallbacks |
set(VkAllocationCallbacks src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int PUSERDATA
public static final int PFNALLOCATION
public static final int PFNREALLOCATION
public static final int PFNFREE
public static final int PFNINTERNALALLOCATION
public static final int PFNINTERNALFREE
public VkAllocationCallbacks(java.nio.ByteBuffer container)
VkAllocationCallbacks instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be
visible to the struct instance and vice versa.
The created instance holds a strong reference to the container object.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic long pUserData()
pUserData field.public VkAllocationFunction pfnAllocation()
pfnAllocation field.public VkReallocationFunction pfnReallocation()
pfnReallocation field.public VkFreeFunction pfnFree()
pfnFree field.@Nullable public VkInternalAllocationNotification pfnInternalAllocation()
pfnInternalAllocation field.@Nullable public VkInternalFreeNotification pfnInternalFree()
pfnInternalFree field.public VkAllocationCallbacks pUserData(long value)
pUserData field.public VkAllocationCallbacks pfnAllocation(VkAllocationFunctionI value)
pfnAllocation field.public VkAllocationCallbacks pfnReallocation(VkReallocationFunctionI value)
pfnReallocation field.public VkAllocationCallbacks pfnFree(VkFreeFunctionI value)
pfnFree field.public VkAllocationCallbacks pfnInternalAllocation(@Nullable VkInternalAllocationNotificationI value)
pfnInternalAllocation field.public VkAllocationCallbacks pfnInternalFree(@Nullable VkInternalFreeNotificationI value)
pfnInternalFree field.public VkAllocationCallbacks set(long pUserData, VkAllocationFunctionI pfnAllocation, VkReallocationFunctionI pfnReallocation, VkFreeFunctionI pfnFree, VkInternalAllocationNotificationI pfnInternalAllocation, VkInternalFreeNotificationI pfnInternalFree)
public VkAllocationCallbacks set(VkAllocationCallbacks src)
src - the source structpublic static VkAllocationCallbacks malloc()
VkAllocationCallbacks instance allocated with memAlloc. The instance must be explicitly freed.public static VkAllocationCallbacks calloc()
VkAllocationCallbacks instance allocated with memCalloc. The instance must be explicitly freed.public static VkAllocationCallbacks create()
VkAllocationCallbacks instance allocated with BufferUtils.public static VkAllocationCallbacks create(long address)
VkAllocationCallbacks instance for the specified memory address.@Nullable public static VkAllocationCallbacks createSafe(long address)
public static VkAllocationCallbacks.Buffer malloc(int capacity)
VkAllocationCallbacks.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer calloc(int capacity)
VkAllocationCallbacks.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer create(int capacity)
VkAllocationCallbacks.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer create(long address, int capacity)
VkAllocationCallbacks.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkAllocationCallbacks.Buffer createSafe(long address, int capacity)
public static VkAllocationCallbacks mallocStack()
VkAllocationCallbacks instance allocated on the thread-local MemoryStack.public static VkAllocationCallbacks callocStack()
VkAllocationCallbacks instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkAllocationCallbacks mallocStack(org.lwjgl.system.MemoryStack stack)
VkAllocationCallbacks instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkAllocationCallbacks callocStack(org.lwjgl.system.MemoryStack stack)
VkAllocationCallbacks instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkAllocationCallbacks.Buffer mallocStack(int capacity)
VkAllocationCallbacks.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer callocStack(int capacity)
VkAllocationCallbacks.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkAllocationCallbacks.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkAllocationCallbacks.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static long npUserData(long struct)
pUserData().public static VkAllocationFunction npfnAllocation(long struct)
pfnAllocation().public static VkReallocationFunction npfnReallocation(long struct)
pfnReallocation().public static VkFreeFunction npfnFree(long struct)
pfnFree().@Nullable public static VkInternalAllocationNotification npfnInternalAllocation(long struct)
pfnInternalAllocation().@Nullable public static VkInternalFreeNotification npfnInternalFree(long struct)
pfnInternalFree().public static void npUserData(long struct,
long value)
pUserData.public static void npfnAllocation(long struct,
VkAllocationFunctionI value)
pfnAllocation.public static void npfnReallocation(long struct,
VkReallocationFunctionI value)
pfnReallocation.public static void npfnFree(long struct,
VkFreeFunctionI value)
pfnFree.public static void npfnInternalAllocation(long struct,
@Nullable
VkInternalAllocationNotificationI value)
pfnInternalAllocation.public static void npfnInternalFree(long struct,
@Nullable
VkInternalFreeNotificationI value)
pfnInternalFree.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.