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
sTypemust beSTRUCTURE_TYPE_BUFFER_CREATE_INFOpNextmust beNULLflagsmust be a valid combination ofVkBufferCreateFlagBitsvaluesusagemust be a valid combination ofVkBufferUsageFlagBitsvaluesusagemust not be 0sharingModemust be a validVkSharingModevaluesizemust be greater than 0- If
sharingModeisSHARING_MODE_CONCURRENT,pQueueFamilyIndicesmust be a pointer to an array ofqueueFamilyIndexCountuint32_tvalues - If
sharingModeisSHARING_MODE_CONCURRENT,queueFamilyIndexCountmust be greater than 1 - If the sparse bindings feature is not enabled,
flagsmust not containBUFFER_CREATE_SPARSE_BINDING_BIT - If the sparse buffer residency feature is not enabled,
flagsmust not containBUFFER_CREATE_SPARSE_RESIDENCY_BIT - If the sparse aliased residency feature is not enabled,
flagsmust not containBUFFER_CREATE_SPARSE_ALIASED_BIT - If
flagscontainsBUFFER_CREATE_SPARSE_RESIDENCY_BITorBUFFER_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_INFOpNext– reserved for use by extensionsflags– aVkBufferCreateFlagBitsbitfield describing additional parameters of the buffer. One or more of:BUFFER_CREATE_SPARSE_ALIASED_BITBUFFER_CREATE_SPARSE_BINDING_BITBUFFER_CREATE_SPARSE_RESIDENCY_BITsize– the size in bytes of the buffer to be createdusage– aVkBufferUsageFlagBitsbitfield 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_CONCURRENTSHARING_MODE_EXCLUSIVEqueueFamilyIndexCount– the number of entries in thepQueueFamilyIndicesarraypQueueFamilyIndices– a list of queue families that will access this buffer (ignored ifsharingModeis 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 classVkBufferCreateInfo.BufferAn array ofVkBufferCreateInfostructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe 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 aVkBufferCreateInfoinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkBufferCreateInfocalloc()Returns a newVkBufferCreateInfoinstance allocated withmemCalloc.static VkBufferCreateInfo.Buffercalloc(int capacity)Returns a newVkBufferCreateInfo.Bufferinstance allocated withmemCalloc.static VkBufferCreateInfocallocStack()Returns a newVkBufferCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferCreateInfo.BuffercallocStack(int capacity)Returns a newVkBufferCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkBufferCreateInfo.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkBufferCreateInfo.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferCreateInfocallocStack(MemoryStack stack)Returns a newVkBufferCreateInfoinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkBufferCreateInfocreate()Returns a newVkBufferCreateInfoinstance allocated withBufferUtils.static VkBufferCreateInfo.Buffercreate(int capacity)Returns a newVkBufferCreateInfo.Bufferinstance allocated withBufferUtils.static VkBufferCreateInfocreate(long address)Returns a newVkBufferCreateInfoinstance for the specified memory address ornullif the address isNULL.static VkBufferCreateInfo.Buffercreate(long address, int capacity)Create aVkBufferCreateInfo.Bufferinstance at the specified memory.intflags()Returns the value of theflagsfield.VkBufferCreateInfoflags(int value)Sets the specified value to theflagsfield.static VkBufferCreateInfomalloc()Returns a newVkBufferCreateInfoinstance allocated withmemAlloc.static VkBufferCreateInfo.Buffermalloc(int capacity)Returns a newVkBufferCreateInfo.Bufferinstance allocated withmemAlloc.static VkBufferCreateInfomallocStack()Returns a newVkBufferCreateInfoinstance allocated on the thread-localMemoryStack.static VkBufferCreateInfo.BuffermallocStack(int capacity)Returns a newVkBufferCreateInfo.Bufferinstance allocated on the thread-localMemoryStack.static VkBufferCreateInfo.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkBufferCreateInfo.Bufferinstance allocated on the specifiedMemoryStack.static VkBufferCreateInfomallocStack(MemoryStack stack)Returns a newVkBufferCreateInfoinstance allocated on the specifiedMemoryStack.VkBufferCreateInfonset(long struct)Unsafe version ofset.longpNext()Returns the value of thepNextfield.VkBufferCreateInfopNext(long value)Sets the specified value to thepNextfield.java.nio.IntBufferpQueueFamilyIndices()Returns aIntBufferview of the data pointed to by thepQueueFamilyIndicesfield.VkBufferCreateInfopQueueFamilyIndices(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto thepQueueFamilyIndicesfield.intqueueFamilyIndexCount()Returns the value of thequeueFamilyIndexCountfield.VkBufferCreateInfoset(int sType, long pNext, int flags, long size, int usage, int sharingMode, java.nio.IntBuffer pQueueFamilyIndices)Initializes this struct with the specified values.VkBufferCreateInfoset(VkBufferCreateInfo src)Copies the specified struct data to this struct.intsharingMode()Returns the value of thesharingModefield.VkBufferCreateInfosharingMode(int value)Sets the specified value to thesharingModefield.longsize()Returns the value of thesizefield.VkBufferCreateInfosize(long value)Sets the specified value to thesizefield.intsizeof()Returns thesizeof(struct).intsType()Returns the value of thesTypefield.VkBufferCreateInfosType(int value)Sets the specified value to thesTypefield.intusage()Returns the value of theusagefield.VkBufferCreateInfousage(int value)Sets the specified value to theusagefield.static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(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 aVkBufferCreateInfoinstance 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 Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturns thesizeof(struct).
-
sType
public int sType()
Returns the value of thesTypefield.
-
pNext
public long pNext()
Returns the value of thepNextfield.
-
flags
public int flags()
Returns the value of theflagsfield.
-
size
public long size()
Returns the value of thesizefield.
-
usage
public int usage()
Returns the value of theusagefield.
-
sharingMode
public int sharingMode()
Returns the value of thesharingModefield.
-
queueFamilyIndexCount
public int queueFamilyIndexCount()
Returns the value of thequeueFamilyIndexCountfield.
-
pQueueFamilyIndices
public java.nio.IntBuffer pQueueFamilyIndices()
Returns aIntBufferview of the data pointed to by thepQueueFamilyIndicesfield.
-
sType
public VkBufferCreateInfo sType(int value)
Sets the specified value to thesTypefield.
-
pNext
public VkBufferCreateInfo pNext(long value)
Sets the specified value to thepNextfield.
-
flags
public VkBufferCreateInfo flags(int value)
Sets the specified value to theflagsfield.
-
size
public VkBufferCreateInfo size(long value)
Sets the specified value to thesizefield.
-
usage
public VkBufferCreateInfo usage(int value)
Sets the specified value to theusagefield.
-
sharingMode
public VkBufferCreateInfo sharingMode(int value)
Sets the specified value to thesharingModefield.
-
pQueueFamilyIndices
public VkBufferCreateInfo pQueueFamilyIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto thepQueueFamilyIndicesfield.
-
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 newVkBufferCreateInfoinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkBufferCreateInfo calloc()
Returns a newVkBufferCreateInfoinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkBufferCreateInfo create()
Returns a newVkBufferCreateInfoinstance allocated withBufferUtils.
-
create
public static VkBufferCreateInfo create(long address)
Returns a newVkBufferCreateInfoinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkBufferCreateInfo.Buffer malloc(int capacity)
Returns a newVkBufferCreateInfo.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkBufferCreateInfo.Buffer calloc(int capacity)
Returns a newVkBufferCreateInfo.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferCreateInfo.Buffer create(int capacity)
Returns a newVkBufferCreateInfo.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkBufferCreateInfo.Buffer create(long address, int capacity)
Create aVkBufferCreateInfo.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkBufferCreateInfo mallocStack()
Returns a newVkBufferCreateInfoinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkBufferCreateInfo callocStack()
Returns a newVkBufferCreateInfoinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkBufferCreateInfo mallocStack(MemoryStack stack)
Returns a newVkBufferCreateInfoinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkBufferCreateInfo callocStack(MemoryStack stack)
Returns a newVkBufferCreateInfoinstance allocated on the specifiedMemoryStackand 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.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkBufferCreateInfo.Buffer callocStack(int capacity)
Returns a newVkBufferCreateInfo.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkBufferCreateInfo.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkBufferCreateInfo.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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
-
-