Package org.lwjgl.vulkan
Class VkBufferCreateInfo
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkBufferCreateInfo
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkBufferCreateInfo extends Struct
Khronos Reference Page
Vulkan SpecificationContains information about how a buffer should be created.
Valid Usage
sType
must beSTRUCTURE_TYPE_BUFFER_CREATE_INFO
pNext
must beNULL
flags
must be a valid combination ofVkBufferCreateFlagBits
valuesusage
must be a valid combination ofVkBufferUsageFlagBits
valuesusage
must not be 0sharingMode
must be a validVkSharingMode
valuesize
must be greater than 0- If
sharingMode
isSHARING_MODE_CONCURRENT
,pQueueFamilyIndices
must be a pointer to an array ofqueueFamilyIndexCount
uint32_t
values - If
sharingMode
isSHARING_MODE_CONCURRENT
,queueFamilyIndexCount
must be greater than 1 - If the sparse bindings feature is not enabled,
flags
must not containBUFFER_CREATE_SPARSE_BINDING_BIT
- If the sparse buffer residency feature is not enabled,
flags
must not containBUFFER_CREATE_SPARSE_RESIDENCY_BIT
- If the sparse aliased residency feature is not enabled,
flags
must not containBUFFER_CREATE_SPARSE_ALIASED_BIT
- If
flags
containsBUFFER_CREATE_SPARSE_RESIDENCY_BIT
orBUFFER_CREATE_SPARSE_ALIASED_BIT
, it must also containBUFFER_CREATE_SPARSE_BINDING_BIT
Member documentation
sType
– the type of this structure. Must be:STRUCTURE_TYPE_BUFFER_CREATE_INFO
pNext
– reserved for use by extensionsflags
– aVkBufferCreateFlagBits
bitfield describing additional parameters of the buffer. One or more of:BUFFER_CREATE_SPARSE_ALIASED_BIT
BUFFER_CREATE_SPARSE_BINDING_BIT
BUFFER_CREATE_SPARSE_RESIDENCY_BIT
size
– the size in bytes of the buffer to be createdusage
– aVkBufferUsageFlagBits
bitfield describing the allowed usages of the buffer. One or more of:sharingMode
– the sharing mode of the buffer when it will be accessed by multiple queue families. One of:SHARING_MODE_CONCURRENT
SHARING_MODE_EXCLUSIVE
queueFamilyIndexCount
– the number of entries in thepQueueFamilyIndices
arraypQueueFamilyIndices
– a list of queue families that will access this buffer (ignored ifsharingMode
is notSHARING_MODE_CONCURRENT
)
Layout
struct VkBufferCreateInfo { VkStructureType sType; const void * pNext; VkBufferCreateFlags flags; VkDeviceSize size; VkBufferUsageFlags usage; VkSharingMode sharingMode; uint32_t queueFamilyIndexCount; const uint32_t * pQueueFamilyIndices; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
VkBufferCreateInfo.Buffer
An array ofVkBufferCreateInfo
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and Description VkBufferCreateInfo(java.nio.ByteBuffer container)
Creates aVkBufferCreateInfo
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkBufferCreateInfo
calloc()
Returns a newVkBufferCreateInfo
instance allocated withmemCalloc
.static VkBufferCreateInfo.Buffer
calloc(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withmemCalloc
.static VkBufferCreateInfo
callocStack()
Returns a newVkBufferCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferCreateInfo.Buffer
callocStack(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkBufferCreateInfo.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferCreateInfo
callocStack(MemoryStack stack)
Returns a newVkBufferCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkBufferCreateInfo
create()
Returns a newVkBufferCreateInfo
instance allocated withBufferUtils
.static VkBufferCreateInfo.Buffer
create(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withBufferUtils
.static VkBufferCreateInfo
create(long address)
Returns a newVkBufferCreateInfo
instance for the specified memory address ornull
if the address isNULL
.static VkBufferCreateInfo.Buffer
create(long address, int capacity)
Create aVkBufferCreateInfo.Buffer
instance at the specified memory.int
flags()
Returns the value of theflags
field.VkBufferCreateInfo
flags(int value)
Sets the specified value to theflags
field.static VkBufferCreateInfo
malloc()
Returns a newVkBufferCreateInfo
instance allocated withmemAlloc
.static VkBufferCreateInfo.Buffer
malloc(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withmemAlloc
.static VkBufferCreateInfo
mallocStack()
Returns a newVkBufferCreateInfo
instance allocated on the thread-localMemoryStack
.static VkBufferCreateInfo.Buffer
mallocStack(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.static VkBufferCreateInfo.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.static VkBufferCreateInfo
mallocStack(MemoryStack stack)
Returns a newVkBufferCreateInfo
instance allocated on the specifiedMemoryStack
.VkBufferCreateInfo
nset(long struct)
Unsafe version ofset
.long
pNext()
Returns the value of thepNext
field.VkBufferCreateInfo
pNext(long value)
Sets the specified value to thepNext
field.java.nio.IntBuffer
pQueueFamilyIndices()
Returns aIntBuffer
view of the data pointed to by thepQueueFamilyIndices
field.VkBufferCreateInfo
pQueueFamilyIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices
field.int
queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCount
field.VkBufferCreateInfo
set(int sType, long pNext, int flags, long size, int usage, int sharingMode, java.nio.IntBuffer pQueueFamilyIndices)
Initializes this struct with the specified values.VkBufferCreateInfo
set(VkBufferCreateInfo src)
Copies the specified struct data to this struct.int
sharingMode()
Returns the value of thesharingMode
field.VkBufferCreateInfo
sharingMode(int value)
Sets the specified value to thesharingMode
field.long
size()
Returns the value of thesize
field.VkBufferCreateInfo
size(long value)
Sets the specified value to thesize
field.int
sizeof()
Returns thesizeof(struct)
.int
sType()
Returns the value of thesType
field.VkBufferCreateInfo
sType(int value)
Sets the specified value to thesType
field.int
usage()
Returns the value of theusage
field.VkBufferCreateInfo
usage(int value)
Sets the specified value to theusage
field.static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsVkBufferCreateInfo.validate(long)
for each struct contained in the specified struct array.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkBufferCreateInfo
public VkBufferCreateInfo(java.nio.ByteBuffer container)
Creates aVkBufferCreateInfo
instance at the current position of the specifiedByteBuffer
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.
-
-
Method Detail
-
sizeof
public int sizeof()
Description copied from class:Struct
Returns thesizeof(struct)
.
-
sType
public int sType()
Returns the value of thesType
field.
-
pNext
public long pNext()
Returns the value of thepNext
field.
-
flags
public int flags()
Returns the value of theflags
field.
-
size
public long size()
Returns the value of thesize
field.
-
usage
public int usage()
Returns the value of theusage
field.
-
sharingMode
public int sharingMode()
Returns the value of thesharingMode
field.
-
queueFamilyIndexCount
public int queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCount
field.
-
pQueueFamilyIndices
public java.nio.IntBuffer pQueueFamilyIndices()
Returns aIntBuffer
view of the data pointed to by thepQueueFamilyIndices
field.
-
sType
public VkBufferCreateInfo sType(int value)
Sets the specified value to thesType
field.
-
pNext
public VkBufferCreateInfo pNext(long value)
Sets the specified value to thepNext
field.
-
flags
public VkBufferCreateInfo flags(int value)
Sets the specified value to theflags
field.
-
size
public VkBufferCreateInfo size(long value)
Sets the specified value to thesize
field.
-
usage
public VkBufferCreateInfo usage(int value)
Sets the specified value to theusage
field.
-
sharingMode
public VkBufferCreateInfo sharingMode(int value)
Sets the specified value to thesharingMode
field.
-
pQueueFamilyIndices
public VkBufferCreateInfo pQueueFamilyIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to thepQueueFamilyIndices
field.
-
set
public VkBufferCreateInfo set(int sType, long pNext, int flags, long size, int usage, int sharingMode, java.nio.IntBuffer pQueueFamilyIndices)
Initializes this struct with the specified values.
-
nset
public VkBufferCreateInfo nset(long struct)
Unsafe version ofset
.
-
set
public VkBufferCreateInfo set(VkBufferCreateInfo src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static VkBufferCreateInfo malloc()
Returns a newVkBufferCreateInfo
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkBufferCreateInfo calloc()
Returns a newVkBufferCreateInfo
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkBufferCreateInfo create()
Returns a newVkBufferCreateInfo
instance allocated withBufferUtils
.
-
create
public static VkBufferCreateInfo create(long address)
Returns a newVkBufferCreateInfo
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkBufferCreateInfo.Buffer malloc(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkBufferCreateInfo.Buffer calloc(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferCreateInfo.Buffer create(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkBufferCreateInfo.Buffer create(long address, int capacity)
Create aVkBufferCreateInfo.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkBufferCreateInfo mallocStack()
Returns a newVkBufferCreateInfo
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkBufferCreateInfo callocStack()
Returns a newVkBufferCreateInfo
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkBufferCreateInfo mallocStack(MemoryStack stack)
Returns a newVkBufferCreateInfo
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkBufferCreateInfo callocStack(MemoryStack stack)
Returns a newVkBufferCreateInfo
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static VkBufferCreateInfo.Buffer mallocStack(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkBufferCreateInfo.Buffer callocStack(int capacity)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkBufferCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static VkBufferCreateInfo.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkBufferCreateInfo.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
CallsVkBufferCreateInfo.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-