public class VmaAllocationInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
VmaAllocation objects, that can be retrieved using function GetAllocationInfo.
memoryType –
memory type index that this allocation was allocated from.
It never changes.
deviceMemory –
handle to Vulkan memory object.
Same memory object can be shared by multiple allocations.
It can change after call to Defragment if this allocation is passed to the function, or if allocation is lost.
If the allocation is lost, it is equal to VK_NULL_HANDLE.
offset –
offset into deviceMemory object to the beginning of this allocation, in bytes. (deviceMemory, offset) pair is unique to this
allocation.
It can change after call to Defragment if this allocation is passed to the function, or if allocation is lost.
size –
size of this allocation, in bytes.
It never changes, unless allocation is lost.
pMappedData –
pointer to the beginning of this allocation as mapped data.
If the allocation hasn't been mapped using MapMemory and hasn't been created with ALLOCATION_CREATE_MAPPED_BIT flag, this value null.
It can change after call to MapMemory, UnmapMemory. It can also change after call to Defragment if this allocation is passed to the function.
pUserData –
custom general-purpose pointer that was passed as VmaAllocationCreateInfo::pUserData or set using SetAllocationUserData.
It can change after call to SetAllocationUserData for this allocation.
struct VmaAllocationInfo {
uint32_t memoryType;
VkDeviceMemory deviceMemory;
VkDeviceSize offset;
VkDeviceSize size;
void * pMappedData;
void * pUserData;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VmaAllocationInfo.Buffer
An array of
VmaAllocationInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
DEVICEMEMORY
The struct member offsets.
|
static int |
MEMORYTYPE
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
PMAPPEDDATA
The struct member offsets.
|
static int |
PUSERDATA
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VmaAllocationInfo(java.nio.ByteBuffer container)
Creates a
VmaAllocationInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VmaAllocationInfo |
calloc()
Returns a new
VmaAllocationInfo instance allocated with memCalloc. |
static VmaAllocationInfo.Buffer |
calloc(int capacity)
Returns a new
VmaAllocationInfo.Buffer instance allocated with memCalloc. |
static VmaAllocationInfo |
callocStack()
Returns a new
VmaAllocationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaAllocationInfo.Buffer |
callocStack(int capacity)
Returns a new
VmaAllocationInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaAllocationInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaAllocationInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaAllocationInfo |
create()
Returns a new
VmaAllocationInfo instance allocated with BufferUtils. |
static VmaAllocationInfo.Buffer |
create(int capacity)
Returns a new
VmaAllocationInfo.Buffer instance allocated with BufferUtils. |
static VmaAllocationInfo |
create(long address)
Returns a new
VmaAllocationInfo instance for the specified memory address. |
static VmaAllocationInfo.Buffer |
create(long address,
int capacity)
Create a
VmaAllocationInfo.Buffer instance at the specified memory. |
static VmaAllocationInfo |
createSafe(long address)
|
static VmaAllocationInfo.Buffer |
createSafe(long address,
int capacity)
|
long |
deviceMemory()
Returns the value of the
deviceMemory field. |
static VmaAllocationInfo |
malloc()
Returns a new
VmaAllocationInfo instance allocated with memAlloc. |
static VmaAllocationInfo.Buffer |
malloc(int capacity)
Returns a new
VmaAllocationInfo.Buffer instance allocated with memAlloc. |
static VmaAllocationInfo |
mallocStack()
Returns a new
VmaAllocationInfo instance allocated on the thread-local MemoryStack. |
static VmaAllocationInfo.Buffer |
mallocStack(int capacity)
Returns a new
VmaAllocationInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VmaAllocationInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationInfo.Buffer instance allocated on the specified MemoryStack. |
static VmaAllocationInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationInfo instance allocated on the specified MemoryStack. |
int |
memoryType()
Returns the value of the
memoryType field. |
static long |
ndeviceMemory(long struct)
Unsafe version of
deviceMemory(). |
static int |
nmemoryType(long struct)
Unsafe version of
memoryType(). |
static long |
noffset(long struct)
Unsafe version of
offset(). |
static long |
npMappedData(long struct)
Unsafe version of
pMappedData(). |
static long |
npUserData(long struct)
Unsafe version of
pUserData(). |
static long |
nsize(long struct)
Unsafe version of
size(). |
long |
offset()
Returns the value of the
offset field. |
long |
pMappedData()
Returns the value of the
pMappedData field. |
long |
pUserData()
Returns the value of the
pUserData field. |
long |
size()
Returns the value of the
size field. |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MEMORYTYPE
public static final int DEVICEMEMORY
public static final int OFFSET
public static final int SIZE
public static final int PMAPPEDDATA
public static final int PUSERDATA
public VmaAllocationInfo(java.nio.ByteBuffer container)
VmaAllocationInfo 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 int memoryType()
memoryType field.public long deviceMemory()
deviceMemory field.public long offset()
offset field.public long size()
size field.public long pMappedData()
pMappedData field.public long pUserData()
pUserData field.public static VmaAllocationInfo malloc()
VmaAllocationInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VmaAllocationInfo calloc()
VmaAllocationInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VmaAllocationInfo create()
VmaAllocationInfo instance allocated with BufferUtils.public static VmaAllocationInfo create(long address)
VmaAllocationInfo instance for the specified memory address.@Nullable public static VmaAllocationInfo createSafe(long address)
public static VmaAllocationInfo.Buffer malloc(int capacity)
VmaAllocationInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaAllocationInfo.Buffer calloc(int capacity)
VmaAllocationInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaAllocationInfo.Buffer create(int capacity)
VmaAllocationInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VmaAllocationInfo.Buffer create(long address, int capacity)
VmaAllocationInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VmaAllocationInfo.Buffer createSafe(long address, int capacity)
public static VmaAllocationInfo mallocStack()
VmaAllocationInfo instance allocated on the thread-local MemoryStack.public static VmaAllocationInfo callocStack()
VmaAllocationInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaAllocationInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocationInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaAllocationInfo callocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocationInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VmaAllocationInfo.Buffer mallocStack(int capacity)
VmaAllocationInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VmaAllocationInfo.Buffer callocStack(int capacity)
VmaAllocationInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VmaAllocationInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaAllocationInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VmaAllocationInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaAllocationInfo.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 int nmemoryType(long struct)
memoryType().public static long ndeviceMemory(long struct)
deviceMemory().public static long noffset(long struct)
offset().public static long nsize(long struct)
size().public static long npMappedData(long struct)
pMappedData().public static long npUserData(long struct)
pUserData().Copyright LWJGL. All Rights Reserved. License terms.