public class VkDescriptorBufferInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
When setting range to WHOLE_SIZE, the effective range must not be larger than the maximum range for the descriptor type (maxUniformBufferRange or maxStorageBufferRange). This means that WHOLE_SIZE is not typically useful in the common case where uniform buffer descriptors are suballocated from a buffer that is much larger than maxUniformBufferRange.
For DESCRIPTOR_TYPE_UNIFORM_BUFFER_DYNAMIC and DESCRIPTOR_TYPE_STORAGE_BUFFER_DYNAMIC descriptor types, offset is the base offset from which the dynamic offset is applied and range is the static size used for all dynamic offsets.
offset must be less than the size of bufferrange is not equal to WHOLE_SIZE, range must be greater than 0range is not equal to WHOLE_SIZE, range must be less than or equal to the size of buffer minus offsetbuffer must be a valid VkBuffer handlebuffer – the buffer resource.offset – the offset in bytes from the start of buffer. Access to buffer memory via this descriptor uses addressing that is relative to this starting offset.range – the size in bytes that is used for this descriptor update, or WHOLE_SIZE to use the range from offset to the end of the buffer.
struct VkDescriptorBufferInfo {
VkBuffer buffer;
VkDeviceSize offset;
VkDeviceSize range;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkDescriptorBufferInfo.Buffer
An array of
VkDescriptorBufferInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BUFFER
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
RANGE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
VkDescriptorBufferInfo(java.nio.ByteBuffer container)
Creates a
VkDescriptorBufferInfo instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
long |
buffer()
Returns the value of the
buffer field. |
VkDescriptorBufferInfo |
buffer(long value)
Sets the specified value to the
buffer field. |
static VkDescriptorBufferInfo |
calloc()
Returns a new
VkDescriptorBufferInfo instance allocated with memCalloc. |
static VkDescriptorBufferInfo.Buffer |
calloc(int capacity)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated with memCalloc. |
static VkDescriptorBufferInfo |
callocStack()
Returns a new
VkDescriptorBufferInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkDescriptorBufferInfo.Buffer |
callocStack(int capacity)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkDescriptorBufferInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkDescriptorBufferInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorBufferInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkDescriptorBufferInfo |
create()
Returns a new
VkDescriptorBufferInfo instance allocated with BufferUtils. |
static VkDescriptorBufferInfo.Buffer |
create(int capacity)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated with BufferUtils. |
static VkDescriptorBufferInfo |
create(long address)
Returns a new
VkDescriptorBufferInfo instance for the specified memory address. |
static VkDescriptorBufferInfo.Buffer |
create(long address,
int capacity)
Create a
VkDescriptorBufferInfo.Buffer instance at the specified memory. |
static VkDescriptorBufferInfo |
createSafe(long address)
|
static VkDescriptorBufferInfo.Buffer |
createSafe(long address,
int capacity)
|
static VkDescriptorBufferInfo |
malloc()
Returns a new
VkDescriptorBufferInfo instance allocated with memAlloc. |
static VkDescriptorBufferInfo.Buffer |
malloc(int capacity)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated with memAlloc. |
static VkDescriptorBufferInfo |
mallocStack()
Returns a new
VkDescriptorBufferInfo instance allocated on the thread-local MemoryStack. |
static VkDescriptorBufferInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkDescriptorBufferInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorBufferInfo.Buffer instance allocated on the specified MemoryStack. |
static VkDescriptorBufferInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkDescriptorBufferInfo instance allocated on the specified MemoryStack. |
static long |
nbuffer(long struct)
Unsafe version of
buffer(). |
static void |
nbuffer(long struct,
long value)
Unsafe version of
buffer. |
static long |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
long value)
Unsafe version of
offset. |
static long |
nrange(long struct)
Unsafe version of
range(). |
static void |
nrange(long struct,
long value)
Unsafe version of
range. |
long |
offset()
Returns the value of the
offset field. |
VkDescriptorBufferInfo |
offset(long value)
Sets the specified value to the
offset field. |
long |
range()
Returns the value of the
range field. |
VkDescriptorBufferInfo |
range(long value)
Sets the specified value to the
range field. |
VkDescriptorBufferInfo |
set(long buffer,
long offset,
long range)
Initializes this struct with the specified values.
|
VkDescriptorBufferInfo |
set(VkDescriptorBufferInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int BUFFER
public static final int OFFSET
public static final int RANGE
public VkDescriptorBufferInfo(java.nio.ByteBuffer container)
VkDescriptorBufferInfo 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 buffer()
buffer field.public long offset()
offset field.public long range()
range field.public VkDescriptorBufferInfo buffer(long value)
buffer field.public VkDescriptorBufferInfo offset(long value)
offset field.public VkDescriptorBufferInfo range(long value)
range field.public VkDescriptorBufferInfo set(long buffer, long offset, long range)
public VkDescriptorBufferInfo set(VkDescriptorBufferInfo src)
src - the source structpublic static VkDescriptorBufferInfo malloc()
VkDescriptorBufferInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkDescriptorBufferInfo calloc()
VkDescriptorBufferInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkDescriptorBufferInfo create()
VkDescriptorBufferInfo instance allocated with BufferUtils.public static VkDescriptorBufferInfo create(long address)
VkDescriptorBufferInfo instance for the specified memory address.@Nullable public static VkDescriptorBufferInfo createSafe(long address)
public static VkDescriptorBufferInfo.Buffer malloc(int capacity)
VkDescriptorBufferInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer calloc(int capacity)
VkDescriptorBufferInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer create(int capacity)
VkDescriptorBufferInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer create(long address, int capacity)
VkDescriptorBufferInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkDescriptorBufferInfo.Buffer createSafe(long address, int capacity)
public static VkDescriptorBufferInfo mallocStack()
VkDescriptorBufferInfo instance allocated on the thread-local MemoryStack.public static VkDescriptorBufferInfo callocStack()
VkDescriptorBufferInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkDescriptorBufferInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkDescriptorBufferInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkDescriptorBufferInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkDescriptorBufferInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkDescriptorBufferInfo.Buffer mallocStack(int capacity)
VkDescriptorBufferInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer callocStack(int capacity)
VkDescriptorBufferInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkDescriptorBufferInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkDescriptorBufferInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkDescriptorBufferInfo.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 nbuffer(long struct)
buffer().public static long noffset(long struct)
offset().public static long nrange(long struct)
range().public static void nbuffer(long struct,
long value)
buffer.public static void noffset(long struct,
long value)
offset.public static void nrange(long struct,
long value)
range.Copyright LWJGL. All Rights Reserved. License terms.