Package org.lwjgl.vulkan
Class VkDrawIndexedIndirectCommand
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
public class VkDrawIndexedIndirectCommand
extends Struct<VkDrawIndexedIndirectCommand>
implements NativeResource
Structure specifying a indexed indirect drawing command.
Description
The members of VkDrawIndexedIndirectCommand
have the same meaning as the similarly named parameters of CmdDrawIndexed
.
Valid Usage
- If
robustBufferAccess2
is not enabled,(indexSize × (firstIndex + indexCount) + offset)
must be less than or equal to the size of the bound index buffer, withindexSize
being based on the type specified byindexType
, where the index buffer,indexType
, andoffset
are specified viavkCmdBindIndexBuffer
orvkCmdBindIndexBuffer2KHR
. IfvkCmdBindIndexBuffer2KHR
is used to bind the index buffer, the size of the bound index buffer isCmdBindIndexBuffer2KHR
::size
- 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
- If the
drawIndirectFirstInstance
feature is not enabled,firstInstance
must be 0
See Also
Layout
struct VkDrawIndexedIndirectCommand {
uint32_t indexCount()
;
uint32_t instanceCount()
;
uint32_t firstIndex()
;
int32_t vertexOffset()
;
uint32_t firstInstance()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.static final int
The struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionVkDrawIndexedIndirectCommand
(ByteBuffer container) Creates aVkDrawIndexedIndirectCommand
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkDrawIndexedIndirectCommand
calloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemCalloc
.calloc
(int capacity) Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemCalloc
.calloc
(int capacity, MemoryStack stack) Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand
calloc
(MemoryStack stack) Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand
Deprecated.callocStack
(int capacity) Deprecated.callocStack
(int capacity, MemoryStack stack) Deprecated.static VkDrawIndexedIndirectCommand
callocStack
(MemoryStack stack) Deprecated.static VkDrawIndexedIndirectCommand
create()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withBufferUtils
.create
(int capacity) Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withBufferUtils
.static VkDrawIndexedIndirectCommand
create
(long address) Returns a newVkDrawIndexedIndirectCommand
instance for the specified memory address.create
(long address, int capacity) Create aVkDrawIndexedIndirectCommand.Buffer
instance at the specified memory.static VkDrawIndexedIndirectCommand
createSafe
(long address) createSafe
(long address, int capacity) int
the base index within the index buffer.firstIndex
(int value) Sets the specified value to thefirstIndex()
field.int
the instance ID of the first instance to draw.firstInstance
(int value) Sets the specified value to thefirstInstance()
field.int
the number of vertices to draw.indexCount
(int value) Sets the specified value to theindexCount()
field.int
the number of instances to draw.instanceCount
(int value) Sets the specified value to theinstanceCount()
field.static VkDrawIndexedIndirectCommand
malloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemAlloc
.malloc
(int capacity) Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemAlloc
.malloc
(int capacity, MemoryStack stack) Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
.static VkDrawIndexedIndirectCommand
malloc
(MemoryStack stack) Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.static VkDrawIndexedIndirectCommand
Deprecated.mallocStack
(int capacity) Deprecated.mallocStack
(int capacity, MemoryStack stack) Deprecated.static VkDrawIndexedIndirectCommand
mallocStack
(MemoryStack stack) Deprecated.static int
nfirstIndex
(long struct) Unsafe version offirstIndex()
.static void
nfirstIndex
(long struct, int value) Unsafe version offirstIndex
.static int
nfirstInstance
(long struct) Unsafe version offirstInstance()
.static void
nfirstInstance
(long struct, int value) Unsafe version offirstInstance
.static int
nindexCount
(long struct) Unsafe version ofindexCount()
.static void
nindexCount
(long struct, int value) Unsafe version ofindexCount
.static int
ninstanceCount
(long struct) Unsafe version ofinstanceCount()
.static void
ninstanceCount
(long struct, int value) Unsafe version ofinstanceCount
.static int
nvertexOffset
(long struct) Unsafe version ofvertexOffset()
.static void
nvertexOffset
(long struct, int value) Unsafe version ofvertexOffset
.set
(int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance) Initializes this struct with the specified values.Copies the specified struct data to this struct.int
sizeof()
Returnssizeof(struct)
.int
the value added to the vertex index before indexing into the vertex buffer.vertexOffset
(int value) Sets the specified value to thevertexOffset()
field.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
INDEXCOUNT
public static final int INDEXCOUNTThe struct member offsets. -
INSTANCECOUNT
public static final int INSTANCECOUNTThe struct member offsets. -
FIRSTINDEX
public static final int FIRSTINDEXThe struct member offsets. -
VERTEXOFFSET
public static final int VERTEXOFFSETThe struct member offsets. -
FIRSTINSTANCE
public static final int FIRSTINSTANCEThe struct member offsets.
-
-
Constructor Details
-
VkDrawIndexedIndirectCommand
Creates aVkDrawIndexedIndirectCommand
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<VkDrawIndexedIndirectCommand>
-
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
Sets the specified value to theindexCount()
field. -
instanceCount
Sets the specified value to theinstanceCount()
field. -
firstIndex
Sets the specified value to thefirstIndex()
field. -
vertexOffset
Sets the specified value to thevertexOffset()
field. -
firstInstance
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
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newVkDrawIndexedIndirectCommand
instance allocated withBufferUtils
. -
create
Returns a newVkDrawIndexedIndirectCommand
instance for the specified memory address. -
createSafe
-
malloc
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aVkDrawIndexedIndirectCommand.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
@Deprecated public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity, MemoryStack stack) Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
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
.
-