Package org.lwjgl.vulkan
Class VkDrawIndexedIndirectCommand
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDrawIndexedIndirectCommand
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDrawIndexedIndirectCommand extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a indexed indirect drawing command.Description
The members of
VkDrawIndexedIndirectCommandhave the same meaning as the similarly named parameters ofCmdDrawIndexed.Valid Usage
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding, as described in Vertex Input Description
(indexSize × (firstIndex + indexCount) + offset)must be less than or equal to the size of the bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viavkCmdBindIndexBuffer- If the drawIndirectFirstInstance feature is not enabled,
firstInstancemust be 0
See Also
Layout
struct VkDrawIndexedIndirectCommand { uint32_tindexCount(); uint32_tinstanceCount(); uint32_tfirstIndex(); int32_tvertexOffset(); uint32_tfirstInstance(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDrawIndexedIndirectCommand.BufferAn array ofVkDrawIndexedIndirectCommandstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFIRSTINDEX
FIRSTINSTANCE
INDEXCOUNT
INSTANCECOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVERTEXOFFSETThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDrawIndexedIndirectCommand(java.nio.ByteBuffer container)Creates aVkDrawIndexedIndirectCommandinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static VkDrawIndexedIndirectCommandcalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommand.Buffercalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommand.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommandcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommandcallocStack()Deprecated.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity)Deprecated.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDrawIndexedIndirectCommandcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static VkDrawIndexedIndirectCommandcreate()Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils.static VkDrawIndexedIndirectCommand.Buffercreate(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.static VkDrawIndexedIndirectCommandcreate(long address)Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address.static VkDrawIndexedIndirectCommand.Buffercreate(long address, int capacity)Create aVkDrawIndexedIndirectCommand.Bufferinstance at the specified memory.static VkDrawIndexedIndirectCommandcreateSafe(long address)static VkDrawIndexedIndirectCommand.BuffercreateSafe(long address, int capacity)intfirstIndex()the base index within the index buffer.VkDrawIndexedIndirectCommandfirstIndex(int value)Sets the specified value to thefirstIndex()field.intfirstInstance()the instance ID of the first instance to draw.VkDrawIndexedIndirectCommandfirstInstance(int value)Sets the specified value to thefirstInstance()field.intindexCount()the number of vertices to draw.VkDrawIndexedIndirectCommandindexCount(int value)Sets the specified value to theindexCount()field.intinstanceCount()the number of instances to draw.VkDrawIndexedIndirectCommandinstanceCount(int value)Sets the specified value to theinstanceCount()field.static VkDrawIndexedIndirectCommandmalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommand.Buffermalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommand.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndexedIndirectCommandmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.static VkDrawIndexedIndirectCommandmallocStack()Deprecated.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity)Deprecated.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDrawIndexedIndirectCommandmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static intnfirstIndex(long struct)Unsafe version offirstIndex().static voidnfirstIndex(long struct, int value)Unsafe version offirstIndex.static intnfirstInstance(long struct)Unsafe version offirstInstance().static voidnfirstInstance(long struct, int value)Unsafe version offirstInstance.static intnindexCount(long struct)Unsafe version ofindexCount().static voidnindexCount(long struct, int value)Unsafe version ofindexCount.static intninstanceCount(long struct)Unsafe version ofinstanceCount().static voidninstanceCount(long struct, int value)Unsafe version ofinstanceCount.static intnvertexOffset(long struct)Unsafe version ofvertexOffset().static voidnvertexOffset(long struct, int value)Unsafe version ofvertexOffset.VkDrawIndexedIndirectCommandset(int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)Initializes this struct with the specified values.VkDrawIndexedIndirectCommandset(VkDrawIndexedIndirectCommand src)Copies the specified struct data to this struct.intsizeof()intvertexOffset()the value added to the vertex index before indexing into the vertex buffer.VkDrawIndexedIndirectCommandvertexOffset(int value)Sets the specified value to thevertexOffset()field.
-
-
-
Constructor Detail
-
VkDrawIndexedIndirectCommand
public VkDrawIndexedIndirectCommand(java.nio.ByteBuffer container)
Creates aVkDrawIndexedIndirectCommandinstance 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()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
indexCount
public int indexCount()
the number of vertices to draw.
-
instanceCount
public int instanceCount()
the number of instances to draw.
-
firstIndex
public int firstIndex()
the base index within the index buffer.
-
vertexOffset
public int vertexOffset()
the value added to the vertex index before indexing into the vertex buffer.
-
firstInstance
public int firstInstance()
the instance ID of the first instance to draw.
-
indexCount
public VkDrawIndexedIndirectCommand indexCount(int value)
Sets the specified value to theindexCount()field.
-
instanceCount
public VkDrawIndexedIndirectCommand instanceCount(int value)
Sets the specified value to theinstanceCount()field.
-
firstIndex
public VkDrawIndexedIndirectCommand firstIndex(int value)
Sets the specified value to thefirstIndex()field.
-
vertexOffset
public VkDrawIndexedIndirectCommand vertexOffset(int value)
Sets the specified value to thevertexOffset()field.
-
firstInstance
public VkDrawIndexedIndirectCommand firstInstance(int value)
Sets the specified value to thefirstInstance()field.
-
set
public VkDrawIndexedIndirectCommand set(int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)
Initializes this struct with the specified values.
-
set
public VkDrawIndexedIndirectCommand set(VkDrawIndexedIndirectCommand src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDrawIndexedIndirectCommand malloc()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDrawIndexedIndirectCommand calloc()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDrawIndexedIndirectCommand create()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils.
-
create
public static VkDrawIndexedIndirectCommand create(long address)
Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address.
-
createSafe
@Nullable public static VkDrawIndexedIndirectCommand createSafe(long address)
-
malloc
public static VkDrawIndexedIndirectCommand.Buffer malloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDrawIndexedIndirectCommand.Buffer calloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(long address, int capacity)
Create aVkDrawIndexedIndirectCommand.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkDrawIndexedIndirectCommand.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static VkDrawIndexedIndirectCommand mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndexedIndirectCommand callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndexedIndirectCommand mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndexedIndirectCommand callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkDrawIndexedIndirectCommand malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkDrawIndexedIndirectCommand calloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static VkDrawIndexedIndirectCommand.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static VkDrawIndexedIndirectCommand.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nindexCount
public static int nindexCount(long struct)
Unsafe version ofindexCount().
-
ninstanceCount
public static int ninstanceCount(long struct)
Unsafe version ofinstanceCount().
-
nfirstIndex
public static int nfirstIndex(long struct)
Unsafe version offirstIndex().
-
nvertexOffset
public static int nvertexOffset(long struct)
Unsafe version ofvertexOffset().
-
nfirstInstance
public static int nfirstInstance(long struct)
Unsafe version offirstInstance().
-
nindexCount
public static void nindexCount(long struct, int value)Unsafe version ofindexCount.
-
ninstanceCount
public static void ninstanceCount(long struct, int value)Unsafe version ofinstanceCount.
-
nfirstIndex
public static void nfirstIndex(long struct, int value)Unsafe version offirstIndex.
-
nvertexOffset
public static void nvertexOffset(long struct, int value)Unsafe version ofvertexOffset.
-
nfirstInstance
public static void nfirstInstance(long struct, int value)Unsafe version offirstInstance.
-
-