Package org.lwjgl.vulkan
Class VkAllocationCallbacks
- All Implemented Interfaces:
AutoCloseable,NativeResource,Pointer
struct VkAllocationCallbacks {
void * pUserData;
{@link VkAllocationFunctionI PFN_vkAllocationFunction} pfnAllocation;
{@link VkReallocationFunctionI PFN_vkReallocationFunction} pfnReallocation;
{@link VkFreeFunctionI PFN_vkFreeFunction} pfnFree;
{@link VkInternalAllocationNotificationI PFN_vkInternalAllocationNotification} pfnInternalAllocation;
{@link VkInternalFreeNotificationI PFN_vkInternalFreeNotification} pfnInternalFree;
}-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkAllocationCallbacks(ByteBuffer container) Creates aVkAllocationCallbacksinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkAllocationCallbackscalloc()Returns a newVkAllocationCallbacksinstance allocated withmemCalloc.static VkAllocationCallbacks.Buffercalloc(int capacity) Returns a newVkAllocationCallbacks.Bufferinstance allocated withmemCalloc.static VkAllocationCallbacks.Buffercalloc(int capacity, MemoryStack stack) Returns a newVkAllocationCallbacks.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAllocationCallbackscalloc(MemoryStack stack) Returns a newVkAllocationCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkAllocationCallbacksDeprecated.static VkAllocationCallbacks.BuffercallocStack(int capacity) Deprecated.static VkAllocationCallbacks.BuffercallocStack(int capacity, MemoryStack stack) Deprecated.static VkAllocationCallbackscallocStack(MemoryStack stack) Deprecated.static VkAllocationCallbackscreate()Returns a newVkAllocationCallbacksinstance allocated withBufferUtils.static VkAllocationCallbacks.Buffercreate(int capacity) Returns a newVkAllocationCallbacks.Bufferinstance allocated withBufferUtils.static VkAllocationCallbackscreate(long address) Returns a newVkAllocationCallbacksinstance for the specified memory address.static VkAllocationCallbacks.Buffercreate(long address, int capacity) Create aVkAllocationCallbacks.Bufferinstance at the specified memory.static @Nullable VkAllocationCallbackscreateSafe(long address) static @Nullable VkAllocationCallbacks.BuffercreateSafe(long address, int capacity) static VkAllocationCallbacksmalloc()Returns a newVkAllocationCallbacksinstance allocated withmemAlloc.static VkAllocationCallbacks.Buffermalloc(int capacity) Returns a newVkAllocationCallbacks.Bufferinstance allocated withmemAlloc.static VkAllocationCallbacks.Buffermalloc(int capacity, MemoryStack stack) Returns a newVkAllocationCallbacks.Bufferinstance allocated on the specifiedMemoryStack.static VkAllocationCallbacksmalloc(MemoryStack stack) Returns a newVkAllocationCallbacksinstance allocated on the specifiedMemoryStack.static VkAllocationCallbacksDeprecated.static VkAllocationCallbacks.BuffermallocStack(int capacity) Deprecated.static VkAllocationCallbacks.BuffermallocStack(int capacity, MemoryStack stack) Deprecated.static VkAllocationCallbacksmallocStack(MemoryStack stack) Deprecated.static @Nullable VkAllocationFunctionnpfnAllocation(long struct) Unsafe version ofpfnAllocation().static voidnpfnAllocation(long struct, @Nullable VkAllocationFunctionI value) Unsafe version ofpfnAllocation.static @Nullable VkFreeFunctionnpfnFree(long struct) Unsafe version ofpfnFree().static voidnpfnFree(long struct, @Nullable VkFreeFunctionI value) Unsafe version ofpfnFree.static @Nullable VkInternalAllocationNotificationnpfnInternalAllocation(long struct) Unsafe version ofpfnInternalAllocation().static voidnpfnInternalAllocation(long struct, @Nullable VkInternalAllocationNotificationI value) Unsafe version ofpfnInternalAllocation.static @Nullable VkInternalFreeNotificationnpfnInternalFree(long struct) Unsafe version ofpfnInternalFree().static voidnpfnInternalFree(long struct, @Nullable VkInternalFreeNotificationI value) Unsafe version ofpfnInternalFree.static @Nullable VkReallocationFunctionnpfnReallocation(long struct) Unsafe version ofpfnReallocation().static voidnpfnReallocation(long struct, @Nullable VkReallocationFunctionI value) Unsafe version ofpfnReallocation.static longnpUserData(long struct) Unsafe version ofpUserData().static voidnpUserData(long struct, long value) Unsafe version ofpUserData.@Nullable VkAllocationFunctionpfnAllocation(@Nullable VkAllocationFunctionI value) Sets the specified value to thepfnAllocationfield.@Nullable VkFreeFunctionpfnFree()pfnFree(@Nullable VkFreeFunctionI value) Sets the specified value to thepfnFreefield.@Nullable VkInternalAllocationNotificationpfnInternalAllocation(@Nullable VkInternalAllocationNotificationI value) Sets the specified value to thepfnInternalAllocationfield.@Nullable VkInternalFreeNotificationpfnInternalFree(@Nullable VkInternalFreeNotificationI value) Sets the specified value to thepfnInternalFreefield.@Nullable VkReallocationFunctionpfnReallocation(@Nullable VkReallocationFunctionI value) Sets the specified value to thepfnReallocationfield.longpUserData(long value) Sets the specified value to thepUserDatafield.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.intsizeof()Returnssizeof(struct).Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 aVkAllocationCallbacksinstance at the current position of the specifiedByteBuffercontainer. 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:StructReturnssizeof(struct).- Specified by:
sizeofin classStruct<VkAllocationCallbacks>
-
pUserData
public long pUserData()- Returns:
- the value of the
pUserDatafield.
-
pfnAllocation
- Returns:
- the value of the
pfnAllocationfield.
-
pfnReallocation
- Returns:
- the value of the
pfnReallocationfield.
-
pfnFree
- Returns:
- the value of the
pfnFreefield.
-
pfnInternalAllocation
- Returns:
- the value of the
pfnInternalAllocationfield.
-
pfnInternalFree
- Returns:
- the value of the
pfnInternalFreefield.
-
pUserData
Sets the specified value to thepUserDatafield. -
pfnAllocation
Sets the specified value to thepfnAllocationfield. -
pfnReallocation
Sets the specified value to thepfnReallocationfield. -
pfnFree
Sets the specified value to thepfnFreefield. -
pfnInternalAllocation
public VkAllocationCallbacks pfnInternalAllocation(@Nullable VkInternalAllocationNotificationI value) Sets the specified value to thepfnInternalAllocationfield. -
pfnInternalFree
Sets the specified value to thepfnInternalFreefield. -
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 newVkAllocationCallbacksinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkAllocationCallbacksinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkAllocationCallbacksinstance allocated withBufferUtils. -
create
Returns a newVkAllocationCallbacksinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkAllocationCallbacks.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkAllocationCallbacks.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkAllocationCallbacks.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkAllocationCallbacks.Bufferinstance 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 newVkAllocationCallbacksinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
Returns a newVkAllocationCallbacksinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
Returns a newVkAllocationCallbacks.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
capacity- the buffer capacitystack- the stack from which to allocate
-
calloc
Returns a newVkAllocationCallbacks.Bufferinstance allocated on the specifiedMemoryStackand 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.
-