Class VkAllocationCallbacks
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Valid Usage
pfnAllocation
must be a valid pointer to a valid user-definedVkAllocationFunction
pfnReallocation
must be a valid pointer to a valid user-definedVkReallocationFunction
pfnFree
must be a valid pointer to a valid user-definedVkFreeFunction
- If either of
pfnInternalAllocation
orpfnInternalFree
is notNULL
, both must be valid callbacks
See Also
VkAllocationFunction
, VkFreeFunction
, VkInternalAllocationNotification
, VkInternalFreeNotification
, VkReallocationFunction
, AllocateMemory
, CreateAccelerationStructureKHR
, CreateAccelerationStructureNV
, CreateAndroidSurfaceKHR
, CreateBuffer
, CreateBufferView
, CreateCommandPool
, CreateComputePipelines
, CreateCuFunctionNVX
, CreateCuModuleNVX
, CreateCudaFunctionNV
, CreateCudaModuleNV
, CreateDebugReportCallbackEXT
, CreateDebugUtilsMessengerEXT
, CreateDeferredOperationKHR
, CreateDescriptorPool
, CreateDescriptorSetLayout
, CreateDescriptorUpdateTemplate
, CreateDescriptorUpdateTemplateKHR
, CreateDevice
, CreateDirectFBSurfaceEXT
, CreateDisplayModeKHR
, CreateDisplayPlaneSurfaceKHR
, CreateEvent
, CreateExecutionGraphPipelinesAMDX
, CreateFence
, CreateFramebuffer
, CreateGraphicsPipelines
, CreateHeadlessSurfaceEXT
, CreateImage
, CreateImageView
, CreateIndirectCommandsLayoutNV
, CreateInstance
, CreateMacOSSurfaceMVK
, CreateMetalSurfaceEXT
, CreateMicromapEXT
, CreateOpticalFlowSessionNV
, CreatePipelineCache
, CreatePipelineLayout
, CreatePrivateDataSlot
, CreatePrivateDataSlotEXT
, CreateQueryPool
, CreateRayTracingPipelinesKHR
, CreateRayTracingPipelinesNV
, CreateRenderPass
, CreateRenderPass2
, CreateRenderPass2KHR
, CreateSampler
, CreateSamplerYcbcrConversion
, CreateSamplerYcbcrConversionKHR
, CreateSemaphore
, CreateShaderModule
, CreateShadersEXT
, CreateSharedSwapchainsKHR
, CreateSwapchainKHR
, CreateValidationCacheEXT
, CreateVideoSessionKHR
, CreateVideoSessionParametersKHR
, CreateWaylandSurfaceKHR
, CreateWin32SurfaceKHR
, CreateXcbSurfaceKHR
, CreateXlibSurfaceKHR
, DestroyAccelerationStructureKHR
, DestroyAccelerationStructureNV
, DestroyBuffer
, DestroyBufferView
, DestroyCommandPool
, DestroyCuFunctionNVX
, DestroyCuModuleNVX
, DestroyCudaFunctionNV
, DestroyCudaModuleNV
, DestroyDebugReportCallbackEXT
, DestroyDebugUtilsMessengerEXT
, DestroyDeferredOperationKHR
, DestroyDescriptorPool
, DestroyDescriptorSetLayout
, DestroyDescriptorUpdateTemplate
, DestroyDescriptorUpdateTemplateKHR
, DestroyDevice
, DestroyEvent
, DestroyFence
, DestroyFramebuffer
, DestroyImage
, DestroyImageView
, DestroyIndirectCommandsLayoutNV
, DestroyInstance
, DestroyMicromapEXT
, DestroyOpticalFlowSessionNV
, DestroyPipeline
, DestroyPipelineCache
, DestroyPipelineLayout
, DestroyPrivateDataSlot
, DestroyPrivateDataSlotEXT
, DestroyQueryPool
, DestroyRenderPass
, DestroySampler
, DestroySamplerYcbcrConversion
, DestroySamplerYcbcrConversionKHR
, DestroySemaphore
, DestroyShaderEXT
, DestroyShaderModule
, DestroySurfaceKHR
, DestroySwapchainKHR
, DestroyValidationCacheEXT
, DestroyVideoSessionKHR
, DestroyVideoSessionParametersKHR
, FreeMemory
, RegisterDeviceEventEXT
, RegisterDisplayEventEXT
Layout
struct VkAllocationCallbacks {
void * pUserData()
;
PFN_vkAllocationFunction
pfnAllocation()
;
PFN_vkReallocationFunction
pfnReallocation()
;
PFN_vkFreeFunction
pfnFree()
;
PFN_vkInternalAllocationNotification
pfnInternalAllocation()
;
PFN_vkInternalFreeNotification
pfnInternalFree()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkAllocationCallbacks
(ByteBuffer container) Creates aVkAllocationCallbacks
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkAllocationCallbacks
calloc()
Returns a newVkAllocationCallbacks
instance allocated withmemCalloc
.static VkAllocationCallbacks.Buffer
calloc
(int capacity) Returns a newVkAllocationCallbacks.Buffer
instance allocated withmemCalloc
.static VkAllocationCallbacks.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newVkAllocationCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAllocationCallbacks
calloc
(MemoryStack stack) Returns a newVkAllocationCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkAllocationCallbacks
Deprecated.static VkAllocationCallbacks.Buffer
callocStack
(int capacity) Deprecated.static VkAllocationCallbacks.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static VkAllocationCallbacks
callocStack
(MemoryStack stack) Deprecated.static VkAllocationCallbacks
create()
Returns a newVkAllocationCallbacks
instance allocated withBufferUtils
.static VkAllocationCallbacks.Buffer
create
(int capacity) Returns a newVkAllocationCallbacks.Buffer
instance allocated withBufferUtils
.static VkAllocationCallbacks
create
(long address) Returns a newVkAllocationCallbacks
instance for the specified memory address.static VkAllocationCallbacks.Buffer
create
(long address, int capacity) Create aVkAllocationCallbacks.Buffer
instance at the specified memory.static VkAllocationCallbacks
createSafe
(long address) static VkAllocationCallbacks.Buffer
createSafe
(long address, int capacity) static VkAllocationCallbacks
malloc()
Returns a newVkAllocationCallbacks
instance allocated withmemAlloc
.static VkAllocationCallbacks.Buffer
malloc
(int capacity) Returns a newVkAllocationCallbacks.Buffer
instance allocated withmemAlloc
.static VkAllocationCallbacks.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newVkAllocationCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.static VkAllocationCallbacks
malloc
(MemoryStack stack) Returns a newVkAllocationCallbacks
instance allocated on the specifiedMemoryStack
.static VkAllocationCallbacks
Deprecated.static VkAllocationCallbacks.Buffer
mallocStack
(int capacity) Deprecated.static VkAllocationCallbacks.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkAllocationCallbacks
mallocStack
(MemoryStack stack) Deprecated.static VkAllocationFunction
npfnAllocation
(long struct) Unsafe version ofpfnAllocation()
.static void
npfnAllocation
(long struct, VkAllocationFunctionI value) Unsafe version ofpfnAllocation
.static VkFreeFunction
npfnFree
(long struct) Unsafe version ofpfnFree()
.static void
npfnFree
(long struct, VkFreeFunctionI value) Unsafe version ofpfnFree
.npfnInternalAllocation
(long struct) Unsafe version ofpfnInternalAllocation()
.static void
npfnInternalAllocation
(long struct, VkInternalAllocationNotificationI value) Unsafe version ofpfnInternalAllocation
.static VkInternalFreeNotification
npfnInternalFree
(long struct) Unsafe version ofpfnInternalFree()
.static void
npfnInternalFree
(long struct, VkInternalFreeNotificationI value) Unsafe version ofpfnInternalFree
.static VkReallocationFunction
npfnReallocation
(long struct) Unsafe version ofpfnReallocation()
.static void
npfnReallocation
(long struct, VkReallocationFunctionI value) Unsafe version ofpfnReallocation
.static long
npUserData
(long struct) Unsafe version ofpUserData()
.static void
npUserData
(long struct, long value) Unsafe version ofpUserData
.aVkAllocationFunction
pointer to an application-defined memory allocation function.Sets the specified value to thepfnAllocation()
field.pfnFree()
aVkFreeFunction
pointer to an application-defined memory free function.pfnFree
(VkFreeFunctionI value) Sets the specified value to thepfnFree()
field.aVkInternalAllocationNotification
pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations.Sets the specified value to thepfnInternalAllocation()
field.aVkInternalFreeNotification
pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations.Sets the specified value to thepfnInternalFree()
field.aVkReallocationFunction
pointer to an application-defined memory reallocation function.Sets the specified value to thepfnReallocation()
field.long
a value to be interpreted by the implementation of the callbacks.pUserData
(long value) Sets the specified value to thepUserData()
field.set
(long pUserData, VkAllocationFunctionI pfnAllocation, VkReallocationFunctionI pfnReallocation, VkFreeFunctionI pfnFree, VkInternalAllocationNotificationI pfnInternalAllocation, VkInternalFreeNotificationI pfnInternalFree) Initializes this struct with the specified values.set
(VkAllocationCallbacks src) Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
PUSERDATA
public static final int PUSERDATAThe struct member offsets. -
PFNALLOCATION
public static final int PFNALLOCATIONThe struct member offsets. -
PFNREALLOCATION
public static final int PFNREALLOCATIONThe struct member offsets. -
PFNFREE
public static final int PFNFREEThe struct member offsets. -
PFNINTERNALALLOCATION
public static final int PFNINTERNALALLOCATIONThe struct member offsets. -
PFNINTERNALFREE
public static final int PFNINTERNALFREEThe struct member offsets.
-
-
Constructor Details
-
VkAllocationCallbacks
Creates aVkAllocationCallbacks
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkAllocationCallbacks>
-
pUserData
public long pUserData()a value to be interpreted by the implementation of the callbacks. When any of the callbacks inVkAllocationCallbacks
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
aVkAllocationFunction
pointer to an application-defined memory allocation function. -
pfnReallocation
aVkReallocationFunction
pointer to an application-defined memory reallocation function. -
pfnFree
aVkFreeFunction
pointer to an application-defined memory free function. -
pfnInternalAllocation
aVkInternalAllocationNotification
pointer to an application-defined function that is called by the implementation when the implementation makes internal allocations. -
pfnInternalFree
aVkInternalFreeNotification
pointer to an application-defined function that is called by the implementation when the implementation frees internal allocations. -
pUserData
Sets the specified value to thepUserData()
field. -
pfnAllocation
Sets the specified value to thepfnAllocation()
field. -
pfnReallocation
Sets the specified value to thepfnReallocation()
field. -
pfnFree
Sets the specified value to thepfnFree()
field. -
pfnInternalAllocation
public VkAllocationCallbacks pfnInternalAllocation(@Nullable VkInternalAllocationNotificationI value) Sets the specified value to thepfnInternalAllocation()
field. -
pfnInternalFree
Sets the specified value to thepfnInternalFree()
field. -
set
public VkAllocationCallbacks set(long pUserData, VkAllocationFunctionI pfnAllocation, VkReallocationFunctionI pfnReallocation, VkFreeFunctionI pfnFree, VkInternalAllocationNotificationI pfnInternalAllocation, VkInternalFreeNotificationI pfnInternalFree) Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkAllocationCallbacks
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkAllocationCallbacks
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkAllocationCallbacks
instance allocated withBufferUtils
. -
create
Returns a newVkAllocationCallbacks
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkAllocationCallbacks.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkAllocationCallbacks.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkAllocationCallbacks.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkAllocationCallbacks.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkAllocationCallbacks
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkAllocationCallbacks
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkAllocationCallbacks.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkAllocationCallbacks.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
npUserData
public static long npUserData(long struct) Unsafe version ofpUserData()
. -
npfnAllocation
Unsafe version ofpfnAllocation()
. -
npfnReallocation
Unsafe version ofpfnReallocation()
. -
npfnFree
Unsafe version ofpfnFree()
. -
npfnInternalAllocation
Unsafe version ofpfnInternalAllocation()
. -
npfnInternalFree
Unsafe version ofpfnInternalFree()
. -
npUserData
public static void npUserData(long struct, long value) Unsafe version ofpUserData
. -
npfnAllocation
Unsafe version ofpfnAllocation
. -
npfnReallocation
Unsafe version ofpfnReallocation
. -
npfnFree
Unsafe version ofpfnFree
. -
npfnInternalAllocation
public static void npfnInternalAllocation(long struct, @Nullable VkInternalAllocationNotificationI value) Unsafe version ofpfnInternalAllocation
. -
npfnInternalFree
Unsafe version ofpfnInternalFree
.
-