Package org.lwjgl.vulkan
Class VkDrawIndexedIndirectCommand
java.lang.Object
org.lwjgl.system.Pointer.Default
org.lwjgl.system.Struct<VkDrawIndexedIndirectCommand>
org.lwjgl.vulkan.VkDrawIndexedIndirectCommand
- All Implemented Interfaces:
AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDrawIndexedIndirectCommand
extends org.lwjgl.system.Struct<VkDrawIndexedIndirectCommand>
implements org.lwjgl.system.NativeResource
Structure specifying an indexed indirect drawing command.
Description
The members of VkDrawIndexedIndirectCommand have the same meaning as the similarly named parameters of CmdDrawIndexed.
Valid Usage
- If the bound graphics pipeline state was created with
VkPipelineVertexInputDivisorStateCreateInfoin thepNextchain ofVkGraphicsPipelineCreateInfo::pVertexInputState, any member ofVkPipelineVertexInputDivisorStateCreateInfo::pVertexBindingDivisorshas a value other than 1 indivisor, andVkPhysicalDeviceVertexAttributeDivisorProperties::supportsNonZeroFirstInstanceisFALSE, thenfirstInstancemust be 0 - If shader objects are used for drawing or the bound graphics pipeline state was created with the
DYNAMIC_STATE_VERTEX_INPUT_EXTdynamic state enabled, any member of thepVertexBindingDescriptionsparameter to theCmdSetVertexInputEXTcall that sets this dynamic state has a value other than 1 indivisor, andVkPhysicalDeviceVertexAttributeDivisorProperties::supportsNonZeroFirstInstanceisFALSE, thenfirstInstancemust be 0
- If the
robustBufferAccess2feature is not enabled,(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 viavkCmdBindIndexBufferorvkCmdBindIndexBuffer2. IfvkCmdBindIndexBuffer2is used to bind the index buffer, the size of the bound index buffer isCmdBindIndexBuffer2::size - If the
drawIndirectFirstInstancefeature is not enabled,firstInstancemust 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 ClassesNested classes/interfaces inherited from class org.lwjgl.system.Struct
org.lwjgl.system.Struct.StructValidationNested classes/interfaces inherited from interface org.lwjgl.system.Pointer
org.lwjgl.system.Pointer.Default -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe struct alignment in bytes.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct member offsets.static final intThe struct size in bytes.static final intThe struct member offsets.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE -
Constructor Summary
ConstructorsConstructorDescriptionVkDrawIndexedIndirectCommand(ByteBuffer container) Creates aVkDrawIndexedIndirectCommandinstance at the current position of the specifiedByteBuffercontainer. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkDrawIndexedIndirectCommandcalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc.calloc(int capacity) Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc.calloc(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 VkDrawIndexedIndirectCommandDeprecated.callocStack(int capacity) Deprecated.callocStack(int capacity, org.lwjgl.system.MemoryStack stack) Deprecated.static VkDrawIndexedIndirectCommandcallocStack(org.lwjgl.system.MemoryStack stack) Deprecated.static VkDrawIndexedIndirectCommandcreate()Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils.create(int capacity) Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.static VkDrawIndexedIndirectCommandcreate(long address) Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address.create(long address, int capacity) Create aVkDrawIndexedIndirectCommand.Bufferinstance at the specified memory.static @Nullable VkDrawIndexedIndirectCommandcreateSafe(long address) static @Nullable VkDrawIndexedIndirectCommand.BuffercreateSafe(long address, int capacity) intthe base index within the index buffer.firstIndex(int value) Sets the specified value to thefirstIndex()field.intthe instance ID of the first instance to draw.firstInstance(int value) Sets the specified value to thefirstInstance()field.intthe number of vertices to draw.indexCount(int value) Sets the specified value to theindexCount()field.intthe number of instances to draw.instanceCount(int value) Sets the specified value to theinstanceCount()field.static VkDrawIndexedIndirectCommandmalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc.malloc(int capacity) Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc.malloc(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 VkDrawIndexedIndirectCommandDeprecated.mallocStack(int capacity) Deprecated.mallocStack(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.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.intsizeof()intthe 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.Struct
clear, free, isNull, validate, validateMethods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toStringMethods 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 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 Details
-
sizeof
public int sizeof()- Specified by:
sizeofin classorg.lwjgl.system.Struct<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 newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc. The instance must be explicitly freed. -
calloc
Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc. The instance must be explicitly freed. -
create
Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils. -
create
Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address. -
createSafe
-
malloc
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
Create aVkDrawIndexedIndirectCommand.Bufferinstance 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 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.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, 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
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
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:
capacity- the buffer capacitystack- the stack from which to allocate
-
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:
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.
-