Package org.lwjgl.util.vma
Class VmaVirtualAllocationCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.util.vma.VmaVirtualAllocationCreateInfo
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VmaVirtualAllocationCreateInfo extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceParameters of created virtual allocation to be passed toVirtualAllocate.Layout
struct VmaVirtualAllocationCreateInfo { VkDeviceSizesize(); VkDeviceSizealignment(); VmaVirtualAllocationCreateFlagsflags(); void *pUserData(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVmaVirtualAllocationCreateInfo.BufferAn array ofVmaVirtualAllocationCreateInfostructs.
-
Constructor Summary
Constructors Constructor Description VmaVirtualAllocationCreateInfo(java.nio.ByteBuffer container)Creates aVmaVirtualAllocationCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description longalignment()required alignment of the allocation.VmaVirtualAllocationCreateInfoalignment(long value)Sets the specified value to thealignment()field.static VmaVirtualAllocationCreateInfocalloc()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemCalloc.static VmaVirtualAllocationCreateInfo.Buffercalloc(int capacity)Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemCalloc.static VmaVirtualAllocationCreateInfo.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaVirtualAllocationCreateInfocalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VmaVirtualAllocationCreateInfocreate()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withBufferUtils.static VmaVirtualAllocationCreateInfo.Buffercreate(int capacity)Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withBufferUtils.static VmaVirtualAllocationCreateInfocreate(long address)Returns a newVmaVirtualAllocationCreateInfoinstance for the specified memory address.static VmaVirtualAllocationCreateInfo.Buffercreate(long address, int capacity)Create aVmaVirtualAllocationCreateInfo.Bufferinstance at the specified memory.static VmaVirtualAllocationCreateInfocreateSafe(long address)static VmaVirtualAllocationCreateInfo.BuffercreateSafe(long address, int capacity)intflags()use combination ofVmaVirtualAllocationCreateFlagBits.VmaVirtualAllocationCreateInfoflags(int value)Sets the specified value to theflags()field.static VmaVirtualAllocationCreateInfomalloc()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemAlloc.static VmaVirtualAllocationCreateInfo.Buffermalloc(int capacity)Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemAlloc.static VmaVirtualAllocationCreateInfo.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VmaVirtualAllocationCreateInfomalloc(org.lwjgl.system.MemoryStack stack)Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStack.static longnalignment(long struct)Unsafe version ofalignment().static voidnalignment(long struct, long value)Unsafe version ofalignment.static intnflags(long struct)Unsafe version offlags().static voidnflags(long struct, int value)Unsafe version offlags.static longnpUserData(long struct)Unsafe version ofpUserData().static voidnpUserData(long struct, long value)Unsafe version ofpUserData.static longnsize(long struct)Unsafe version ofsize().static voidnsize(long struct, long value)Unsafe version ofsize.longpUserData()custom pointer to be associated with the allocation.VmaVirtualAllocationCreateInfopUserData(long value)Sets the specified value to thepUserData()field.VmaVirtualAllocationCreateInfoset(long size, long alignment, int flags, long pUserData)Initializes this struct with the specified values.VmaVirtualAllocationCreateInfoset(VmaVirtualAllocationCreateInfo src)Copies the specified struct data to this struct.longsize()size of the allocation.VmaVirtualAllocationCreateInfosize(long value)Sets the specified value to thesize()field.intsizeof()
-
-
-
Constructor Detail
-
VmaVirtualAllocationCreateInfo
public VmaVirtualAllocationCreateInfo(java.nio.ByteBuffer container)
Creates aVmaVirtualAllocationCreateInfoinstance 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
-
size
public long size()
size of the allocation.Cannot be zero.
-
alignment
public long alignment()
required alignment of the allocation. Optional.Must be power of two. Special value 0 has the same meaning as 1 - means no special alignment is required, so allocation can start at any offset.
-
flags
public int flags()
use combination ofVmaVirtualAllocationCreateFlagBits. One or more of:VIRTUAL_ALLOCATION_CREATE_UPPER_ADDRESS_BITVIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_MEMORY_BITVIRTUAL_ALLOCATION_CREATE_STRATEGY_MIN_TIME_BITVIRTUAL_ALLOCATION_CREATE_STRATEGY_MASK
-
pUserData
public long pUserData()
custom pointer to be associated with the allocation. Optional.It can be any value and can be used for user-defined purposes. It can be fetched or changed later.
-
size
public VmaVirtualAllocationCreateInfo size(long value)
Sets the specified value to thesize()field.
-
alignment
public VmaVirtualAllocationCreateInfo alignment(long value)
Sets the specified value to thealignment()field.
-
flags
public VmaVirtualAllocationCreateInfo flags(int value)
Sets the specified value to theflags()field.
-
pUserData
public VmaVirtualAllocationCreateInfo pUserData(long value)
Sets the specified value to thepUserData()field.
-
set
public VmaVirtualAllocationCreateInfo set(long size, long alignment, int flags, long pUserData)
Initializes this struct with the specified values.
-
set
public VmaVirtualAllocationCreateInfo set(VmaVirtualAllocationCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VmaVirtualAllocationCreateInfo malloc()
Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VmaVirtualAllocationCreateInfo calloc()
Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VmaVirtualAllocationCreateInfo create()
Returns a newVmaVirtualAllocationCreateInfoinstance allocated withBufferUtils.
-
create
public static VmaVirtualAllocationCreateInfo create(long address)
Returns a newVmaVirtualAllocationCreateInfoinstance for the specified memory address.
-
createSafe
@Nullable public static VmaVirtualAllocationCreateInfo createSafe(long address)
-
malloc
public static VmaVirtualAllocationCreateInfo.Buffer malloc(int capacity)
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VmaVirtualAllocationCreateInfo.Buffer calloc(int capacity)
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VmaVirtualAllocationCreateInfo.Buffer create(int capacity)
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VmaVirtualAllocationCreateInfo.Buffer create(long address, int capacity)
Create aVmaVirtualAllocationCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VmaVirtualAllocationCreateInfo.Buffer createSafe(long address, int capacity)
-
malloc
public static VmaVirtualAllocationCreateInfo malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VmaVirtualAllocationCreateInfo calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VmaVirtualAllocationCreateInfo.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VmaVirtualAllocationCreateInfo.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nsize
public static long nsize(long struct)
Unsafe version ofsize().
-
nalignment
public static long nalignment(long struct)
Unsafe version ofalignment().
-
nflags
public static int nflags(long struct)
Unsafe version offlags().
-
npUserData
public static long npUserData(long struct)
Unsafe version ofpUserData().
-
nsize
public static void nsize(long struct, long value)Unsafe version ofsize.
-
nalignment
public static void nalignment(long struct, long value)Unsafe version ofalignment.
-
nflags
public static void nflags(long struct, int value)Unsafe version offlags.
-
npUserData
public static void npUserData(long struct, long value)Unsafe version ofpUserData.
-
-