Package org.lwjgl.util.vma
Class VmaVirtualAllocationCreateInfo
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VmaVirtualAllocationCreateInfo>
org.lwjgl.util.vma.VmaVirtualAllocationCreateInfo
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VmaVirtualAllocationCreateInfo
extends org.lwjgl.system.Struct<VmaVirtualAllocationCreateInfo>
implements org.lwjgl.system.NativeResource
Parameters of created virtual allocation to be passed to
VirtualAllocate.
Layout
struct VmaVirtualAllocationCreateInfo {
VkDeviceSize size();
VkDeviceSize alignment();
VmaVirtualAllocationCreateFlags flags();
void * pUserData();
}-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classAn array ofVmaVirtualAllocationCreateInfostructs.Nested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct member offsets.static final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVmaVirtualAllocationCreateInfo(ByteBuffer container) Creates aVmaVirtualAllocationCreateInfoinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionlongrequired alignment of the allocation.alignment(long value) Sets the specified value to thealignment()field.calloc()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemCalloc.calloc(int capacity) Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemCalloc.calloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.calloc(org.lwjgl.system.MemoryStack stack) Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.create()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withBufferUtils.create(int capacity) Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withBufferUtils.create(long address) Returns a newVmaVirtualAllocationCreateInfoinstance for the specified memory address.create(long address, int capacity) Create aVmaVirtualAllocationCreateInfo.Bufferinstance at the specified memory.static @Nullable VmaVirtualAllocationCreateInfocreateSafe(long address) static @Nullable VmaVirtualAllocationCreateInfo.BuffercreateSafe(long address, int capacity) intflags()use combination ofVmaVirtualAllocationCreateFlagBits.flags(int value) Sets the specified value to theflags()field.malloc()Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemAlloc.malloc(int capacity) Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemAlloc.malloc(int capacity, org.lwjgl.system.MemoryStack stack) Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.malloc(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.longcustom pointer to be associated with the allocation.pUserData(long value) Sets the specified value to thepUserData()field.set(long size, long alignment, int flags, long pUserData) Initializes this struct with the specified values.Copies the specified struct data to this struct.longsize()size of the allocation.size(long value) Sets the specified value to thesize()field.intsizeof()Methods inherited from class org.lwjgl.system.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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. -
SIZE
public static final int SIZEThe struct member offsets. -
ALIGNMENT
public static final int ALIGNMENTThe struct member offsets. -
FLAGS
public static final int FLAGSThe struct member offsets. -
PUSERDATA
public static final int PUSERDATAThe struct member offsets.
-
-
Constructor Details
-
VmaVirtualAllocationCreateInfo
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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<VmaVirtualAllocationCreateInfo>
-
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: -
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
Sets the specified value to thesize()field. -
alignment
Sets the specified value to thealignment()field. -
flags
Sets the specified value to theflags()field. -
pUserData
Sets the specified value to thepUserData()field. -
set
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 newVmaVirtualAllocationCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVmaVirtualAllocationCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVmaVirtualAllocationCreateInfoinstance allocated withBufferUtils. -
create
Returns a newVmaVirtualAllocationCreateInfoinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVmaVirtualAllocationCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVmaVirtualAllocationCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
public static @Nullable VmaVirtualAllocationCreateInfo.Buffer createSafe(long address, int capacity) -
malloc
Returns a newVmaVirtualAllocationCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
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:
capacity- the buffer capacitystack- the stack from which to allocate
-
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:
capacity- the buffer capacitystack- the stack from which to allocate
-
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.
-