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 draw indexed indirect 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
Member documentation
indexCount– the number of vertices to draw.instanceCount– the number of instances to draw.firstIndex– the base index within the index buffer.vertexOffset– the value added to the vertex index before indexing into the vertex buffer.firstInstance– the instance ID of the first instance to draw.
Layout
struct VkDrawIndexedIndirectCommand { uint32_t indexCount; uint32_t instanceCount; uint32_t firstIndex; int32_t vertexOffset; uint32_t firstInstance; }
-
-
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 Modifier and Type Method Description static VkDrawIndexedIndirectCommandcalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommand.Buffercalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommandcallocStack()Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommandcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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()Returns the value of thefirstIndexfield.VkDrawIndexedIndirectCommandfirstIndex(int value)Sets the specified value to thefirstIndexfield.intfirstInstance()Returns the value of thefirstInstancefield.VkDrawIndexedIndirectCommandfirstInstance(int value)Sets the specified value to thefirstInstancefield.intindexCount()Returns the value of theindexCountfield.VkDrawIndexedIndirectCommandindexCount(int value)Sets the specified value to theindexCountfield.intinstanceCount()Returns the value of theinstanceCountfield.VkDrawIndexedIndirectCommandinstanceCount(int value)Sets the specified value to theinstanceCountfield.static VkDrawIndexedIndirectCommandmalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommand.Buffermalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommandmallocStack()Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStack.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndexedIndirectCommandmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.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()Returns the value of thevertexOffsetfield.VkDrawIndexedIndirectCommandvertexOffset(int value)Sets the specified value to thevertexOffsetfield.
-
-
-
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()
Returns the value of theindexCountfield.
-
instanceCount
public int instanceCount()
Returns the value of theinstanceCountfield.
-
firstIndex
public int firstIndex()
Returns the value of thefirstIndexfield.
-
vertexOffset
public int vertexOffset()
Returns the value of thevertexOffsetfield.
-
firstInstance
public int firstInstance()
Returns the value of thefirstInstancefield.
-
indexCount
public VkDrawIndexedIndirectCommand indexCount(int value)
Sets the specified value to theindexCountfield.
-
instanceCount
public VkDrawIndexedIndirectCommand instanceCount(int value)
Sets the specified value to theinstanceCountfield.
-
firstIndex
public VkDrawIndexedIndirectCommand firstIndex(int value)
Sets the specified value to thefirstIndexfield.
-
vertexOffset
public VkDrawIndexedIndirectCommand vertexOffset(int value)
Sets the specified value to thevertexOffsetfield.
-
firstInstance
public VkDrawIndexedIndirectCommand firstInstance(int value)
Sets the specified value to thefirstInstancefield.
-
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
public static VkDrawIndexedIndirectCommand mallocStack()
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack()
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDrawIndexedIndirectCommand mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack(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
-
mallocStack
public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDrawIndexedIndirectCommand.Buffer mallocStack(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
-
callocStack
public static VkDrawIndexedIndirectCommand.Buffer callocStack(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.
-
-