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.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
FieldsModifier 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
ConstructorsConstructorDescriptionVkAllocationCallbacks
(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 @Nullable VkAllocationCallbacks
createSafe
(long address) static @Nullable 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 @Nullable VkAllocationFunction
npfnAllocation
(long struct) Unsafe version ofpfnAllocation()
.static void
npfnAllocation
(long struct, @Nullable VkAllocationFunctionI value) Unsafe version ofpfnAllocation
.static @Nullable VkFreeFunction
npfnFree
(long struct) Unsafe version ofpfnFree()
.static void
npfnFree
(long struct, @Nullable VkFreeFunctionI value) Unsafe version ofpfnFree
.static @Nullable VkInternalAllocationNotification
npfnInternalAllocation
(long struct) Unsafe version ofpfnInternalAllocation()
.static void
npfnInternalAllocation
(long struct, @Nullable VkInternalAllocationNotificationI value) Unsafe version ofpfnInternalAllocation
.static @Nullable VkInternalFreeNotification
npfnInternalFree
(long struct) Unsafe version ofpfnInternalFree()
.static void
npfnInternalFree
(long struct, @Nullable VkInternalFreeNotificationI value) Unsafe version ofpfnInternalFree
.static @Nullable VkReallocationFunction
npfnReallocation
(long struct) Unsafe version ofpfnReallocation()
.static void
npfnReallocation
(long struct, @Nullable VkReallocationFunctionI value) Unsafe version ofpfnReallocation
.static long
npUserData
(long struct) Unsafe version ofpUserData()
.static void
npUserData
(long struct, long value) Unsafe version ofpUserData
.@Nullable VkAllocationFunction
pfnAllocation
(@Nullable VkAllocationFunctionI value) Sets the specified value to thepfnAllocation
field.@Nullable VkFreeFunction
pfnFree()
pfnFree
(@Nullable VkFreeFunctionI value) Sets the specified value to thepfnFree
field.@Nullable VkInternalAllocationNotification
pfnInternalAllocation
(@Nullable VkInternalAllocationNotificationI value) Sets the specified value to thepfnInternalAllocation
field.@Nullable VkInternalFreeNotification
pfnInternalFree
(@Nullable VkInternalFreeNotificationI value) Sets the specified value to thepfnInternalFree
field.@Nullable VkReallocationFunction
pfnReallocation
(@Nullable VkReallocationFunctionI value) Sets the specified value to thepfnReallocation
field.long
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()- Returns:
- the value of the
pUserData
field.
-
pfnAllocation
- Returns:
- the value of the
pfnAllocation
field.
-
pfnReallocation
- Returns:
- the value of the
pfnReallocation
field.
-
pfnFree
- Returns:
- the value of the
pfnFree
field.
-
pfnInternalAllocation
- Returns:
- the value of the
pfnInternalAllocation
field.
-
pfnInternalFree
- Returns:
- the value of the
pfnInternalFree
field.
-
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
.
-