public class VkMemoryRequirements
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
size – the size, in bytes, of the memory allocation required: for the resource.alignment – the alignment, in bytes, of the offset within the allocation required: for the resource.memoryTypeBits – a bitmask and contains one bit set for every supported memory type for the resource. Bit i is set if and only if the memory type i in the VkPhysicalDeviceMemoryProperties structure for the physical device is supported for the resource.
struct VkMemoryRequirements {
VkDeviceSize size;
VkDeviceSize alignment;
uint32_t memoryTypeBits;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkMemoryRequirements.Buffer
An array of
VkMemoryRequirements structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNMENT
The struct member offsets.
|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MEMORYTYPEBITS
The struct member offsets.
|
static int |
SIZE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkMemoryRequirements(java.nio.ByteBuffer container)
Creates a
VkMemoryRequirements instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
alignment()
Returns the value of the
alignment field. |
static VkMemoryRequirements |
calloc()
Returns a new
VkMemoryRequirements instance allocated with memCalloc. |
static VkMemoryRequirements.Buffer |
calloc(int capacity)
Returns a new
VkMemoryRequirements.Buffer instance allocated with memCalloc. |
static VkMemoryRequirements |
callocStack()
Returns a new
VkMemoryRequirements instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryRequirements.Buffer |
callocStack(int capacity)
Returns a new
VkMemoryRequirements.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkMemoryRequirements.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryRequirements.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryRequirements |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryRequirements instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkMemoryRequirements |
create()
Returns a new
VkMemoryRequirements instance allocated with BufferUtils. |
static VkMemoryRequirements.Buffer |
create(int capacity)
Returns a new
VkMemoryRequirements.Buffer instance allocated with BufferUtils. |
static VkMemoryRequirements |
create(long address)
Returns a new
VkMemoryRequirements instance for the specified memory address. |
static VkMemoryRequirements.Buffer |
create(long address,
int capacity)
Create a
VkMemoryRequirements.Buffer instance at the specified memory. |
static VkMemoryRequirements |
createSafe(long address)
|
static VkMemoryRequirements.Buffer |
createSafe(long address,
int capacity)
|
static VkMemoryRequirements |
malloc()
Returns a new
VkMemoryRequirements instance allocated with memAlloc. |
static VkMemoryRequirements.Buffer |
malloc(int capacity)
Returns a new
VkMemoryRequirements.Buffer instance allocated with memAlloc. |
static VkMemoryRequirements |
mallocStack()
Returns a new
VkMemoryRequirements instance allocated on the thread-local MemoryStack. |
static VkMemoryRequirements.Buffer |
mallocStack(int capacity)
Returns a new
VkMemoryRequirements.Buffer instance allocated on the thread-local MemoryStack. |
static VkMemoryRequirements.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryRequirements.Buffer instance allocated on the specified MemoryStack. |
static VkMemoryRequirements |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkMemoryRequirements instance allocated on the specified MemoryStack. |
int |
memoryTypeBits()
Returns the value of the
memoryTypeBits field. |
static long |
nalignment(long struct)
Unsafe version of
alignment(). |
static int |
nmemoryTypeBits(long struct)
Unsafe version of
memoryTypeBits(). |
static long |
nsize(long struct)
Unsafe version of
size(). |
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 SIZE
public static final int ALIGNMENT
public static final int MEMORYTYPEBITS
public VkMemoryRequirements(java.nio.ByteBuffer container)
VkMemoryRequirements 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 long size()
size field.public long alignment()
alignment field.public int memoryTypeBits()
memoryTypeBits field.public static VkMemoryRequirements malloc()
VkMemoryRequirements instance allocated with memAlloc. The instance must be explicitly freed.public static VkMemoryRequirements calloc()
VkMemoryRequirements instance allocated with memCalloc. The instance must be explicitly freed.public static VkMemoryRequirements create()
VkMemoryRequirements instance allocated with BufferUtils.public static VkMemoryRequirements create(long address)
VkMemoryRequirements instance for the specified memory address.@Nullable public static VkMemoryRequirements createSafe(long address)
public static VkMemoryRequirements.Buffer malloc(int capacity)
VkMemoryRequirements.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryRequirements.Buffer calloc(int capacity)
VkMemoryRequirements.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkMemoryRequirements.Buffer create(int capacity)
VkMemoryRequirements.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkMemoryRequirements.Buffer create(long address, int capacity)
VkMemoryRequirements.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkMemoryRequirements.Buffer createSafe(long address, int capacity)
public static VkMemoryRequirements mallocStack()
VkMemoryRequirements instance allocated on the thread-local MemoryStack.public static VkMemoryRequirements callocStack()
VkMemoryRequirements instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkMemoryRequirements mallocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryRequirements instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkMemoryRequirements callocStack(org.lwjgl.system.MemoryStack stack)
VkMemoryRequirements instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkMemoryRequirements.Buffer mallocStack(int capacity)
VkMemoryRequirements.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkMemoryRequirements.Buffer callocStack(int capacity)
VkMemoryRequirements.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkMemoryRequirements.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryRequirements.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkMemoryRequirements.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkMemoryRequirements.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 long nsize(long struct)
size().public static long nalignment(long struct)
alignment().public static int nmemoryTypeBits(long struct)
memoryTypeBits().Copyright LWJGL. All Rights Reserved. License terms.