public class VkBufferViewCreateInfo
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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 an integer multiple of the texel block size of formatrange is not equal to WHOLE_SIZE, range divided by the texel block size of format, multiplied by the number of texels per texel block for that format (as defined in the Compatible Formats table), must be less than or equal to VkPhysicalDeviceLimits::maxTexelBufferElementsrange is not equal to WHOLE_SIZE, the sum of offset and range must be less than or equal to the size of bufferbuffer must have been created with a usage value containing at least one of BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT or BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BITbuffer was created with usage containing BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, format must be supported for uniform texel buffers, as specified by the FORMAT_FEATURE_UNIFORM_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatPropertiesbuffer was created with usage containing BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, format must be supported for storage texel buffers, as specified by the FORMAT_FEATURE_STORAGE_TEXEL_BUFFER_BIT flag in VkFormatProperties::bufferFeatures returned by vkGetPhysicalDeviceFormatPropertiesbuffer is non-sparse then it must be bound completely and contiguously to a single VkDeviceMemory objectoffset must be a multiple of VkPhysicalDeviceLimits::minTexelBufferOffsetAlignmentbuffer was created with usage containing BUFFER_USAGE_STORAGE_TEXEL_BUFFER_BIT, offset must be a multiple of the lesser of VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::storageTexelBufferOffsetAlignmentBytes or, if VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::storageTexelBufferOffsetSingleTexelAlignment is TRUE, the size of a texel of the requested format. If the size of a texel is a multiple of three bytes, then the size of a single component of format is used insteadbuffer was created with usage containing BUFFER_USAGE_UNIFORM_TEXEL_BUFFER_BIT, offset must be a multiple of the lesser of VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::uniformTexelBufferOffsetAlignmentBytes or, if VkPhysicalDeviceTexelBufferAlignmentPropertiesEXT::uniformTexelBufferOffsetSingleTexelAlignment is TRUE, the size of a texel of the requested format. If the size of a texel is a multiple of three bytes, then the size of a single component of format is used insteadsType must be STRUCTURE_TYPE_BUFFER_VIEW_CREATE_INFOpNext must be NULLflags must be 0buffer must be a valid VkBuffer handleformat must be a valid VkFormat valuesType – the type of this structure.pNext – NULL or a pointer to an extension-specific structure.flags – reserved for future use.buffer – a VkBuffer on which the view will be created.format – a VkFormat describing the format of the data elements in the buffer.offset – an offset in bytes from the base address of the buffer. Accesses to the buffer view from shaders use addressing that is relative to this starting offset.range – a size in bytes of the buffer view. If range is equal to WHOLE_SIZE, the range from offset to the end of the buffer is used. If WHOLE_SIZE is used and the remaining size of the buffer is not a multiple of the texel block size of format, the nearest smaller multiple is used.
struct VkBufferViewCreateInfo {
VkStructureType sType;
void const * pNext;
VkBufferViewCreateFlags flags;
VkBuffer buffer;
VkFormat format;
VkDeviceSize offset;
VkDeviceSize range;
}| Modifier and Type | Class and Description |
|---|---|
static class |
VkBufferViewCreateInfo.Buffer
An array of
VkBufferViewCreateInfo structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
BUFFER
The struct member offsets.
|
static int |
FLAGS
The struct member offsets.
|
static int |
FORMAT
The struct member offsets.
|
static int |
OFFSET
The struct member offsets.
|
static int |
PNEXT
The struct member offsets.
|
static int |
RANGE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
static int |
STYPE
The struct member offsets.
|
| Constructor and Description |
|---|
VkBufferViewCreateInfo(java.nio.ByteBuffer container)
Creates a
VkBufferViewCreateInfo 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. |
VkBufferViewCreateInfo |
buffer(long value)
Sets the specified value to the
buffer field. |
static VkBufferViewCreateInfo |
calloc()
Returns a new
VkBufferViewCreateInfo instance allocated with memCalloc. |
static VkBufferViewCreateInfo.Buffer |
calloc(int capacity)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated with memCalloc. |
static VkBufferViewCreateInfo |
callocStack()
Returns a new
VkBufferViewCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferViewCreateInfo.Buffer |
callocStack(int capacity)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static VkBufferViewCreateInfo.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferViewCreateInfo |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferViewCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static VkBufferViewCreateInfo |
create()
Returns a new
VkBufferViewCreateInfo instance allocated with BufferUtils. |
static VkBufferViewCreateInfo.Buffer |
create(int capacity)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated with BufferUtils. |
static VkBufferViewCreateInfo |
create(long address)
Returns a new
VkBufferViewCreateInfo instance for the specified memory address. |
static VkBufferViewCreateInfo.Buffer |
create(long address,
int capacity)
Create a
VkBufferViewCreateInfo.Buffer instance at the specified memory. |
static VkBufferViewCreateInfo |
createSafe(long address)
|
static VkBufferViewCreateInfo.Buffer |
createSafe(long address,
int capacity)
|
int |
flags()
Returns the value of the
flags field. |
VkBufferViewCreateInfo |
flags(int value)
Sets the specified value to the
flags field. |
int |
format()
Returns the value of the
format field. |
VkBufferViewCreateInfo |
format(int value)
Sets the specified value to the
format field. |
static VkBufferViewCreateInfo |
malloc()
Returns a new
VkBufferViewCreateInfo instance allocated with memAlloc. |
static VkBufferViewCreateInfo.Buffer |
malloc(int capacity)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated with memAlloc. |
static VkBufferViewCreateInfo |
mallocStack()
Returns a new
VkBufferViewCreateInfo instance allocated on the thread-local MemoryStack. |
static VkBufferViewCreateInfo.Buffer |
mallocStack(int capacity)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated on the thread-local MemoryStack. |
static VkBufferViewCreateInfo.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferViewCreateInfo.Buffer instance allocated on the specified MemoryStack. |
static VkBufferViewCreateInfo |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
VkBufferViewCreateInfo 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 int |
nflags(long struct)
Unsafe version of
flags(). |
static void |
nflags(long struct,
int value)
Unsafe version of
flags. |
static int |
nformat(long struct)
Unsafe version of
format(). |
static void |
nformat(long struct,
int value)
Unsafe version of
format. |
static long |
noffset(long struct)
Unsafe version of
offset(). |
static void |
noffset(long struct,
long value)
Unsafe version of
offset. |
static long |
npNext(long struct)
Unsafe version of
pNext(). |
static void |
npNext(long struct,
long value)
Unsafe version of
pNext. |
static long |
nrange(long struct)
Unsafe version of
range(). |
static void |
nrange(long struct,
long value)
Unsafe version of
range. |
static int |
nsType(long struct)
Unsafe version of
sType(). |
static void |
nsType(long struct,
int value)
Unsafe version of
sType. |
long |
offset()
Returns the value of the
offset field. |
VkBufferViewCreateInfo |
offset(long value)
Sets the specified value to the
offset field. |
long |
pNext()
Returns the value of the
pNext field. |
VkBufferViewCreateInfo |
pNext(long value)
Sets the specified value to the
pNext field. |
long |
range()
Returns the value of the
range field. |
VkBufferViewCreateInfo |
range(long value)
Sets the specified value to the
range field. |
VkBufferViewCreateInfo |
set(int sType,
long pNext,
int flags,
long buffer,
int format,
long offset,
long range)
Initializes this struct with the specified values.
|
VkBufferViewCreateInfo |
set(VkBufferViewCreateInfo src)
Copies the specified struct data to this struct.
|
int |
sizeof() |
int |
sType()
Returns the value of the
sType field. |
VkBufferViewCreateInfo |
sType(int value)
Sets the specified value to the
sType field. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int STYPE
public static final int PNEXT
public static final int FLAGS
public static final int BUFFER
public static final int FORMAT
public static final int OFFSET
public static final int RANGE
public VkBufferViewCreateInfo(java.nio.ByteBuffer container)
VkBufferViewCreateInfo 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 int sType()
sType field.public long pNext()
pNext field.public int flags()
flags field.public long buffer()
buffer field.public int format()
format field.public long offset()
offset field.public long range()
range field.public VkBufferViewCreateInfo sType(int value)
sType field.public VkBufferViewCreateInfo pNext(long value)
pNext field.public VkBufferViewCreateInfo flags(int value)
flags field.public VkBufferViewCreateInfo buffer(long value)
buffer field.public VkBufferViewCreateInfo format(int value)
format field.public VkBufferViewCreateInfo offset(long value)
offset field.public VkBufferViewCreateInfo range(long value)
range field.public VkBufferViewCreateInfo set(int sType, long pNext, int flags, long buffer, int format, long offset, long range)
public VkBufferViewCreateInfo set(VkBufferViewCreateInfo src)
src - the source structpublic static VkBufferViewCreateInfo malloc()
VkBufferViewCreateInfo instance allocated with memAlloc. The instance must be explicitly freed.public static VkBufferViewCreateInfo calloc()
VkBufferViewCreateInfo instance allocated with memCalloc. The instance must be explicitly freed.public static VkBufferViewCreateInfo create()
VkBufferViewCreateInfo instance allocated with BufferUtils.public static VkBufferViewCreateInfo create(long address)
VkBufferViewCreateInfo instance for the specified memory address.@Nullable public static VkBufferViewCreateInfo createSafe(long address)
public static VkBufferViewCreateInfo.Buffer malloc(int capacity)
VkBufferViewCreateInfo.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer calloc(int capacity)
VkBufferViewCreateInfo.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer create(int capacity)
VkBufferViewCreateInfo.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer create(long address, int capacity)
VkBufferViewCreateInfo.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static VkBufferViewCreateInfo.Buffer createSafe(long address, int capacity)
public static VkBufferViewCreateInfo mallocStack()
VkBufferViewCreateInfo instance allocated on the thread-local MemoryStack.public static VkBufferViewCreateInfo callocStack()
VkBufferViewCreateInfo instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static VkBufferViewCreateInfo mallocStack(org.lwjgl.system.MemoryStack stack)
VkBufferViewCreateInfo instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static VkBufferViewCreateInfo callocStack(org.lwjgl.system.MemoryStack stack)
VkBufferViewCreateInfo instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static VkBufferViewCreateInfo.Buffer mallocStack(int capacity)
VkBufferViewCreateInfo.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer callocStack(int capacity)
VkBufferViewCreateInfo.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferViewCreateInfo.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static VkBufferViewCreateInfo.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
VkBufferViewCreateInfo.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 int nsType(long struct)
sType().public static long npNext(long struct)
pNext().public static int nflags(long struct)
flags().public static long nbuffer(long struct)
buffer().public static int nformat(long struct)
format().public static long noffset(long struct)
offset().public static long nrange(long struct)
range().public static void nsType(long struct,
int value)
sType.public static void npNext(long struct,
long value)
pNext.public static void nflags(long struct,
int value)
flags.public static void nbuffer(long struct,
long value)
buffer.public static void nformat(long struct,
int value)
format.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.