Class VmaAllocationCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaAllocationCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VmaAllocationCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceLayout
struct VmaAllocationCreateInfo { VmaAllocationCreateFlagsflags(); VmaMemoryUsageusage(); VkMemoryPropertyFlagsrequiredFlags(); VkMemoryPropertyFlagspreferredFlags(); uint32_tmemoryTypeBits(); VmaPoolpool(); void *pUserData(); floatpriority(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVmaAllocationCreateInfo.BufferAn array ofVmaAllocationCreateInfostructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFLAGS
MEMORYTYPEBITS
POOL
PREFERREDFLAGS
PRIORITY
PUSERDATA
REQUIREDFLAGSThe struct member offsets.static intSIZEOFThe struct size in bytes.static intUSAGEThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VmaAllocationCreateInfo(java.nio.ByteBuffer container)Creates aVmaAllocationCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VmaAllocationCreateInfocalloc()Returns a newVmaAllocationCreateInfoinstance allocated withmemCalloc.static VmaAllocationCreateInfo.Buffercalloc(int capacity)Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withmemCalloc.static VmaAllocationCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaAllocationCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaAllocationCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaAllocationCreateInfocallocStack()Deprecated.static VmaAllocationCreateInfo.BuffercallocStack(int capacity)Deprecated.static VmaAllocationCreateInfo.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaAllocationCreateInfocallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VmaAllocationCreateInfocreate()Returns a newVmaAllocationCreateInfoinstance allocated withBufferUtils.static VmaAllocationCreateInfo.Buffercreate(int capacity)Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withBufferUtils.static VmaAllocationCreateInfocreate(long address)Returns a newVmaAllocationCreateInfoinstance for the specified memory address.static VmaAllocationCreateInfo.Buffercreate(long address, int capacity)Create aVmaAllocationCreateInfo.Bufferinstance at the specified memory.static VmaAllocationCreateInfocreateSafe(long address)static VmaAllocationCreateInfo.BuffercreateSafe(long address, int capacity)intflags()useVmaAllocationCreateFlagBitsenum.VmaAllocationCreateInfoflags(int value)Sets the specified value to theflags()field.static VmaAllocationCreateInfomalloc()Returns a newVmaAllocationCreateInfoinstance allocated withmemAlloc.static VmaAllocationCreateInfo.Buffermalloc(int capacity)Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withmemAlloc.static VmaAllocationCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VmaAllocationCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaAllocationCreateInfoinstance allocated on the specifiedMemoryStack.static VmaAllocationCreateInfomallocStack()Deprecated.static VmaAllocationCreateInfo.BuffermallocStack(int capacity)Deprecated.static VmaAllocationCreateInfo.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VmaAllocationCreateInfomallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.intmemoryTypeBits()bitmask containing one bit set for every memory type acceptable for this allocation.VmaAllocationCreateInfomemoryTypeBits(int value)Sets the specified value to thememoryTypeBits()field.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static intnmemoryTypeBits(long struct)Unsafe version ofmemoryTypeBits().static voidnmemoryTypeBits(long struct, int value)Unsafe version ofmemoryTypeBits.static longnpool(long struct)Unsafe version ofpool().static voidnpool(long struct, long value)Unsafe version ofpool.static intnpreferredFlags(long struct)Unsafe version ofpreferredFlags().static voidnpreferredFlags(long struct, int value)Unsafe version ofpreferredFlags.static floatnpriority(long struct)Unsafe version ofpriority().static voidnpriority(long struct, float value)Unsafe version ofpriority.static longnpUserData(long struct)Unsafe version ofpUserData().static voidnpUserData(long struct, long value)Unsafe version ofpUserData.static intnrequiredFlags(long struct)Unsafe version ofrequiredFlags().static voidnrequiredFlags(long struct, int value)Unsafe version ofrequiredFlags.static intnusage(long struct)Unsafe version ofusage().static voidnusage(long struct, int value)Unsafe version ofusage.longpool()pool that this allocation should be created in.VmaAllocationCreateInfopool(long value)Sets the specified value to thepool()field.intpreferredFlags()flags that preferably should be set in a memory type chosen for an allocation.VmaAllocationCreateInfopreferredFlags(int value)Sets the specified value to thepreferredFlags()field.floatpriority()A floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations.VmaAllocationCreateInfopriority(float value)Sets the specified value to thepriority()field.longpUserData()custom general-purpose pointer that will be stored inVmaAllocation, can be read asVmaAllocationInfo::pUserDataand changed usingSetAllocationUserData.VmaAllocationCreateInfopUserData(long value)Sets the specified value to thepUserData()field.intrequiredFlags()flags that must be set in a Memory Type chosen for an allocation.VmaAllocationCreateInforequiredFlags(int value)Sets the specified value to therequiredFlags()field.VmaAllocationCreateInfoset(int flags, int usage, int requiredFlags, int preferredFlags, int memoryTypeBits, long pool, long pUserData, float priority)Initializes this struct with the specified values.VmaAllocationCreateInfoset(VmaAllocationCreateInfo src)Copies the specified struct data to this struct.intsizeof()intusage()intended usage of memory.VmaAllocationCreateInfousage(int value)Sets the specified value to theusage()field.
-
-
-
Constructor Detail
-
VmaAllocationCreateInfo
public VmaAllocationCreateInfo(java.nio.ByteBuffer container)
Creates aVmaAllocationCreateInfoinstance 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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
flags
public int flags()
useVmaAllocationCreateFlagBitsenum. One or more of:
-
usage
public int usage()
intended usage of memory.You can leave
MEMORY_USAGE_UNKNOWNif you specify memory requirements in other way. Ifpoolis not null, this member is ignored. One of:
-
requiredFlags
public int 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
poolis not null, this member is ignored.
-
preferredFlags
public int preferredFlags()
flags that preferably should be set in a memory type chosen for an allocation.Set to 0 if no additional flags are preferred. If
poolis not null, this member is ignored.
-
memoryTypeBits
public int 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. Ifpoolis not null, this member is ignored.
-
pool
public long pool()
pool that this allocation should be created in.Leave
VK_NULL_HANDLEto allocate from default pool. If not null, members:usage,requiredFlags,preferredFlags,memoryTypeBitsare ignored.
-
pUserData
public long pUserData()
custom general-purpose pointer that will be stored inVmaAllocation, can be read asVmaAllocationInfo::pUserDataand changed usingSetAllocationUserData.If
ALLOCATION_CREATE_USER_DATA_COPY_STRING_BITis 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.
-
priority
public float priority()
A floating-point value between 0 and 1, indicating the priority of the allocation relative to other memory allocations.It is used only when
ALLOCATOR_CREATE_EXT_MEMORY_PRIORITY_BITflag was used during creation of theVmaAllocatorobject and this allocation ends up as dedicated or is explicitly forced as dedicated usingALLOCATION_CREATE_DEDICATED_MEMORY_BIT. Otherwise, it has the priority of a memory block where it is placed and this variable is ignored.
-
flags
public VmaAllocationCreateInfo flags(int value)
Sets the specified value to theflags()field.
-
usage
public VmaAllocationCreateInfo usage(int value)
Sets the specified value to theusage()field.
-
requiredFlags
public VmaAllocationCreateInfo requiredFlags(int value)
Sets the specified value to therequiredFlags()field.
-
preferredFlags
public VmaAllocationCreateInfo preferredFlags(int value)
Sets the specified value to thepreferredFlags()field.
-
memoryTypeBits
public VmaAllocationCreateInfo memoryTypeBits(int value)
Sets the specified value to thememoryTypeBits()field.
-
pool
public VmaAllocationCreateInfo pool(long value)
Sets the specified value to thepool()field.
-
pUserData
public VmaAllocationCreateInfo pUserData(long value)
Sets the specified value to thepUserData()field.
-
priority
public VmaAllocationCreateInfo priority(float value)
Sets the specified value to thepriority()field.
-
set
public VmaAllocationCreateInfo set(int flags, int usage, int requiredFlags, int preferredFlags, int memoryTypeBits, long pool, long pUserData, float priority)
Initializes this struct with the specified values.
-
set
public VmaAllocationCreateInfo set(VmaAllocationCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VmaAllocationCreateInfo malloc()
Returns a newVmaAllocationCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VmaAllocationCreateInfo calloc()
Returns a newVmaAllocationCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VmaAllocationCreateInfo create()
Returns a newVmaAllocationCreateInfoinstance allocated withBufferUtils.
-
create
public static VmaAllocationCreateInfo create(long address)
Returns a newVmaAllocationCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VmaAllocationCreateInfo createSafe(long address)
-
malloc
public static VmaAllocationCreateInfo.Buffer malloc(int capacity)
Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VmaAllocationCreateInfo.Buffer calloc(int capacity)
Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VmaAllocationCreateInfo.Buffer create(int capacity)
Returns a newVmaAllocationCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VmaAllocationCreateInfo.Buffer create(long address, int capacity)
Create aVmaAllocationCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VmaAllocationCreateInfo.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VmaAllocationCreateInfo mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaAllocationCreateInfo callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaAllocationCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VmaAllocationCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaAllocationCreateInfo.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VmaAllocationCreateInfo.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VmaAllocationCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VmaAllocationCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VmaAllocationCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaAllocationCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VmaAllocationCreateInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaAllocationCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VmaAllocationCreateInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VmaAllocationCreateInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
nusage
public static int nusage(long struct)
Unsafe version ofusage().
-
nrequiredFlags
public static int nrequiredFlags(long struct)
Unsafe version ofrequiredFlags().
-
npreferredFlags
public static int npreferredFlags(long struct)
Unsafe version ofpreferredFlags().
-
nmemoryTypeBits
public static int nmemoryTypeBits(long struct)
Unsafe version ofmemoryTypeBits().
-
npool
public static long npool(long struct)
Unsafe version ofpool().
-
npUserData
public static long npUserData(long struct)
Unsafe version ofpUserData().
-
npriority
public static float npriority(long struct)
Unsafe version ofpriority().
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
nusage
public static void nusage(long struct, int value)Unsafe version ofusage.
-
nrequiredFlags
public static void nrequiredFlags(long struct, int value)Unsafe version ofrequiredFlags.
-
npreferredFlags
public static void npreferredFlags(long struct, int value)Unsafe version ofpreferredFlags.
-
nmemoryTypeBits
public static void nmemoryTypeBits(long struct, int value)Unsafe version ofmemoryTypeBits.
-
npool
public static void npool(long struct, long value)Unsafe version ofpool.
-
npUserData
public static void npUserData(long struct, long value)Unsafe version ofpUserData.
-
npriority
public static void npriority(long struct, float value)Unsafe version ofpriority.
-
-