public class VmaAllocationCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
flags – use VmaAllocationCreateFlagBits enum. One or more of:usage – intended usage of memory.
You can leave MEMORY_USAGE_UNKNOWN if you specify memory requirements in other way. If pool is not null, this member is ignored. One of:
MEMORY_USAGE_UNKNOWN | MEMORY_USAGE_GPU_ONLY | MEMORY_USAGE_CPU_ONLY |
MEMORY_USAGE_CPU_TO_GPU | MEMORY_USAGE_GPU_TO_CPU | MEMORY_USAGE_CPU_COPY |
MEMORY_USAGE_GPU_LAZILY_ALLOCATED |
requiredFlags –
flags that must be set in a Memory Type chosen for an allocation.
Leave 0 if you specify memory requirements in other way. If pool is not null, this member is ignored.
preferredFlags –
flags that preferably should be set in a memory type chosen for an allocation.
Set to 0 if no additional flags are prefered. If pool is not null, this member is ignored.
memoryTypeBits –
bitmask containing one bit set for every memory type acceptable for this allocation.
Value 0 is equivalent to UINT32_MAX - it means any memory type is accepted if it meets other requirements specified by this structure, with no
further restrictions on memory type index. If pool is not null, this member is ignored.
pool –
pool that this allocation should be created in.
Leave VK_NULL_HANDLE to allocate from default pool. If not null, members: usage, requiredFlags, preferredFlags,
memoryTypeBits are ignored.
pUserData –
custom general-purpose pointer that will be stored in VmaAllocation, can be read as VmaAllocationInfo::pUserData and changed using
SetAllocationUserData.
If ALLOCATION_CREATE_USER_DATA_COPY_STRING_BIT is used, it must be either null or pointer to a null-terminated string. The string will be then copied
to internal buffer, so it doesn't need to be valid after allocation call.
struct VmaAllocationCreateInfo {
VmaAllocationCreateFlags flags;
VmaMemoryUsage usage;
VkMemoryPropertyFlags requiredFlags;
VkMemoryPropertyFlags preferredFlags;
uint32_t memoryTypeBits;
VmaPool pool;
void * pUserData;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VmaAllocationCreateInfo.Buffer
An array of
VmaAllocationCreateInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
FLAGS
The struct member offsets.
|
static int |
MEMORYTYPEBITS
The struct member offsets.
|
static int |
POOL
The struct member offsets.
|
static int |
PREFERREDFLAGS
The struct member offsets.
|
static int |
PUSERDATA
The struct member offsets.
|
static int |
REQUIREDFLAGS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
USAGE
The struct member offsets.
|
| Constructor and Description |
|---|
VmaAllocationCreateInfo(java.nio.ByteBuffer container)
Creates a
VmaAllocationCreateInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static VmaAllocationCreateInfo |
calloc()
Returns a new
VmaAllocationCreateInfo instance allocated with memCalloc. |
static VmaAllocationCreateInfo.Buffer |
calloc(int capacity)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated with memCalloc. |
static VmaAllocationCreateInfo |
callocStack()
Returns a new
VmaAllocationCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaAllocationCreateInfo.Buffer |
callocStack(int capacity)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VmaAllocationCreateInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaAllocationCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VmaAllocationCreateInfo |
create()
Returns a new
VmaAllocationCreateInfo instance allocated with BufferUtils. |
static VmaAllocationCreateInfo.Buffer |
create(int capacity)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated with BufferUtils. |
static VmaAllocationCreateInfo |
create(long address)
Returns a new
VmaAllocationCreateInfo instance for the specified memory address. |
static VmaAllocationCreateInfo.Buffer |
create(long address,
int capacity)
Create a
VmaAllocationCreateInfo.Buffer instance at the specified memory. |
static VmaAllocationCreateInfo |
createSafe(long address)
|
static VmaAllocationCreateInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
VmaAllocationCreateInfo |
flags(int value)
Sets the specified value to the
flags field. |
static VmaAllocationCreateInfo |
malloc()
Returns a new
VmaAllocationCreateInfo instance allocated with memAlloc. |
static VmaAllocationCreateInfo.Buffer |
malloc(int capacity)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated with memAlloc. |
static VmaAllocationCreateInfo |
mallocStack()
Returns a new
VmaAllocationCreateInfo instance allocated on the thread-local MemoryStack. |
static VmaAllocationCreateInfo.Buffer |
mallocStack(int capacity)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VmaAllocationCreateInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationCreateInfo.Buffer instance allocated on the specified MemoryStack. |
static VmaAllocationCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VmaAllocationCreateInfo instance allocated on the specified MemoryStack. |
int |
memoryTypeBits()
Returns the value of the
memoryTypeBits field. |
VmaAllocationCreateInfo |
memoryTypeBits(int value)
Sets the specified value to the
memoryTypeBits field. |
static int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nmemoryTypeBits(long struct)
Unsafe version of
memoryTypeBits(). |
static void |
nmemoryTypeBits(long struct,
int value)
Unsafe version of
memoryTypeBits. |
static long |
npool(long struct)
Unsafe version of
pool(). |
static void |
npool(long struct,
long value)
Unsafe version of
pool. |
static int |
npreferredFlags(long struct)
Unsafe version of
preferredFlags(). |
static void |
npreferredFlags(long struct,
int value)
Unsafe version of
preferredFlags. |
static long |
npUserData(long struct)
Unsafe version of
pUserData(). |
static void |
npUserData(long struct,
long value)
Unsafe version of
pUserData. |
static int |
nrequiredFlags(long struct)
Unsafe version of
requiredFlags(). |
static void |
nrequiredFlags(long struct,
int value)
Unsafe version of
requiredFlags. |
static int |
nusage(long struct)
Unsafe version of
usage(). |
static void |
nusage(long struct,
int value)
Unsafe version of
usage. |
long |
pool()
Returns the value of the
pool field. |
VmaAllocationCreateInfo |
pool(long value)
Sets the specified value to the
pool field. |
int |
preferredFlags()
Returns the value of the
preferredFlags field. |
VmaAllocationCreateInfo |
preferredFlags(int value)
Sets the specified value to the
preferredFlags field. |
long |
pUserData()
Returns the value of the
pUserData field. |
VmaAllocationCreateInfo |
pUserData(long value)
Sets the specified value to the
pUserData field. |
int |
requiredFlags()
Returns the value of the
requiredFlags field. |
VmaAllocationCreateInfo |
requiredFlags(int value)
Sets the specified value to the
requiredFlags field. |
VmaAllocationCreateInfo |
set(int flags,
int usage,
int requiredFlags,
int preferredFlags,
int memoryTypeBits,
long pool,
long pUserData)
Initializes this struct with the specified values.
|
VmaAllocationCreateInfo |
set(VmaAllocationCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
usage()
Returns the value of the
usage field. |
VmaAllocationCreateInfo |
usage(int value)
Sets the specified value to the
usage field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int FLAGS
public static final int USAGE
public static final int REQUIREDFLAGS
public static final int PREFERREDFLAGS
public static final int MEMORYTYPEBITS
public static final int POOL
public static final int PUSERDATA
public VmaAllocationCreateInfo(java.nio.ByteBuffer container)
VmaAllocationCreateInfo 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 flags()
flags field.public int usage()
usage field.public int requiredFlags()
requiredFlags field.public int preferredFlags()
preferredFlags field.public int memoryTypeBits()
memoryTypeBits field.public long pool()
pool field.public long pUserData()
pUserData field.public VmaAllocationCreateInfo flags(int value)
flags field.public VmaAllocationCreateInfo usage(int value)
usage field.public VmaAllocationCreateInfo requiredFlags(int value)
requiredFlags field.public VmaAllocationCreateInfo preferredFlags(int value)
preferredFlags field.public VmaAllocationCreateInfo memoryTypeBits(int value)
memoryTypeBits field.public VmaAllocationCreateInfo pool(long value)
pool field.public VmaAllocationCreateInfo pUserData(long value)
pUserData field.public VmaAllocationCreateInfo set(int flags, int usage, int requiredFlags, int preferredFlags, int memoryTypeBits, long pool, long pUserData)
public VmaAllocationCreateInfo set(VmaAllocationCreateInfo src)
src - the source structpublic static VmaAllocationCreateInfo malloc()
VmaAllocationCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VmaAllocationCreateInfo calloc()
VmaAllocationCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VmaAllocationCreateInfo create()
VmaAllocationCreateInfo instance allocated with BufferUtils.public static VmaAllocationCreateInfo create(long address)
VmaAllocationCreateInfo instance for the specified memory address.@Nullable public static VmaAllocationCreateInfo createSafe(long address)
public static VmaAllocationCreateInfo.Buffer malloc(int capacity)
VmaAllocationCreateInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer calloc(int capacity)
VmaAllocationCreateInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer create(int capacity)
VmaAllocationCreateInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer create(long address, int capacity)
VmaAllocationCreateInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VmaAllocationCreateInfo.Buffer createSafe(long address, int capacity)
public static VmaAllocationCreateInfo mallocStack()
VmaAllocationCreateInfo instance allocated on the thread-local MemoryStack.public static VmaAllocationCreateInfo callocStack()
VmaAllocationCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VmaAllocationCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocationCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VmaAllocationCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VmaAllocationCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VmaAllocationCreateInfo.Buffer mallocStack(int capacity)
VmaAllocationCreateInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer callocStack(int capacity)
VmaAllocationCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaAllocationCreateInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VmaAllocationCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VmaAllocationCreateInfo.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 nflags(long struct)
flags().public static int nusage(long struct)
usage().public static int nrequiredFlags(long struct)
requiredFlags().public static int npreferredFlags(long struct)
preferredFlags().public static int nmemoryTypeBits(long struct)
memoryTypeBits().public static long npool(long struct)
pool().public static long npUserData(long struct)
pUserData().public static void nflags(long struct,
int value)
flags.public static void nusage(long struct,
int value)
usage.public static void nrequiredFlags(long struct,
int value)
requiredFlags.public static void npreferredFlags(long struct,
int value)
preferredFlags.public static void nmemoryTypeBits(long struct,
int value)
memoryTypeBits.public static void npool(long struct,
long value)
pool.public static void npUserData(long struct,
long value)
pUserData.Copyright LWJGL. All Rights Reserved. License terms.