Package org.lwjgl.vulkan
Class VkDrawIndirectCommand
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDrawIndirectCommand
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class VkDrawIndirectCommand extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceStructure specifying a draw indirect command.Description
The members of
VkDrawIndirectCommandhave the same meaning as the similarly named parameters ofCmdDraw.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
- If the drawIndirectFirstInstance feature is not enabled,
firstInstancemust be 0
See Also
Member documentation
vertexCount– the number of vertices to draw.instanceCount– the number of instances to draw.firstVertex– the index of the first vertex to draw.firstInstance– the instance ID of the first instance to draw.
Layout
struct VkDrawIndirectCommand { uint32_t vertexCount; uint32_t instanceCount; uint32_t firstVertex; uint32_t firstInstance; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVkDrawIndirectCommand.BufferAn array ofVkDrawIndirectCommandstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intFIRSTINSTANCE
FIRSTVERTEX
INSTANCECOUNTThe struct member offsets.static intSIZEOFThe struct size in bytes.static intVERTEXCOUNTThe struct member offsets.
-
Constructor Summary
Constructors Constructor Description VkDrawIndirectCommand(java.nio.ByteBuffer container)Creates aVkDrawIndirectCommandinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static VkDrawIndirectCommandcalloc()Returns a newVkDrawIndirectCommandinstance allocated withmemCalloc.static VkDrawIndirectCommand.Buffercalloc(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated withmemCalloc.static VkDrawIndirectCommandcallocStack()Returns a newVkDrawIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommand.BuffercallocStack(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommand.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommandcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommandcreate()Returns a newVkDrawIndirectCommandinstance allocated withBufferUtils.static VkDrawIndirectCommand.Buffercreate(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated withBufferUtils.static VkDrawIndirectCommandcreate(long address)Returns a newVkDrawIndirectCommandinstance for the specified memory address.static VkDrawIndirectCommand.Buffercreate(long address, int capacity)Create aVkDrawIndirectCommand.Bufferinstance at the specified memory.static VkDrawIndirectCommandcreateSafe(long address)static VkDrawIndirectCommand.BuffercreateSafe(long address, int capacity)intfirstInstance()Returns the value of thefirstInstancefield.VkDrawIndirectCommandfirstInstance(int value)Sets the specified value to thefirstInstancefield.intfirstVertex()Returns the value of thefirstVertexfield.VkDrawIndirectCommandfirstVertex(int value)Sets the specified value to thefirstVertexfield.intinstanceCount()Returns the value of theinstanceCountfield.VkDrawIndirectCommandinstanceCount(int value)Sets the specified value to theinstanceCountfield.static VkDrawIndirectCommandmalloc()Returns a newVkDrawIndirectCommandinstance allocated withmemAlloc.static VkDrawIndirectCommand.Buffermalloc(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated withmemAlloc.static VkDrawIndirectCommandmallocStack()Returns a newVkDrawIndirectCommandinstance allocated on the thread-localMemoryStack.static VkDrawIndirectCommand.BuffermallocStack(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.static VkDrawIndirectCommand.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndirectCommandmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.static intnfirstInstance(long struct)Unsafe version offirstInstance().static voidnfirstInstance(long struct, int value)Unsafe version offirstInstance.static intnfirstVertex(long struct)Unsafe version offirstVertex().static voidnfirstVertex(long struct, int value)Unsafe version offirstVertex.static intninstanceCount(long struct)Unsafe version ofinstanceCount().static voidninstanceCount(long struct, int value)Unsafe version ofinstanceCount.static intnvertexCount(long struct)Unsafe version ofvertexCount().static voidnvertexCount(long struct, int value)Unsafe version ofvertexCount.VkDrawIndirectCommandset(int vertexCount, int instanceCount, int firstVertex, int firstInstance)Initializes this struct with the specified values.VkDrawIndirectCommandset(VkDrawIndirectCommand src)Copies the specified struct data to this struct.intsizeof()intvertexCount()Returns the value of thevertexCountfield.VkDrawIndirectCommandvertexCount(int value)Sets the specified value to thevertexCountfield.
-
-
-
Constructor Detail
-
VkDrawIndirectCommand
public VkDrawIndirectCommand(java.nio.ByteBuffer container)
Creates aVkDrawIndirectCommandinstance 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
-
vertexCount
public int vertexCount()
Returns the value of thevertexCountfield.
-
instanceCount
public int instanceCount()
Returns the value of theinstanceCountfield.
-
firstVertex
public int firstVertex()
Returns the value of thefirstVertexfield.
-
firstInstance
public int firstInstance()
Returns the value of thefirstInstancefield.
-
vertexCount
public VkDrawIndirectCommand vertexCount(int value)
Sets the specified value to thevertexCountfield.
-
instanceCount
public VkDrawIndirectCommand instanceCount(int value)
Sets the specified value to theinstanceCountfield.
-
firstVertex
public VkDrawIndirectCommand firstVertex(int value)
Sets the specified value to thefirstVertexfield.
-
firstInstance
public VkDrawIndirectCommand firstInstance(int value)
Sets the specified value to thefirstInstancefield.
-
set
public VkDrawIndirectCommand set(int vertexCount, int instanceCount, int firstVertex, int firstInstance)
Initializes this struct with the specified values.
-
set
public VkDrawIndirectCommand set(VkDrawIndirectCommand src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static VkDrawIndirectCommand malloc()
Returns a newVkDrawIndirectCommandinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDrawIndirectCommand calloc()
Returns a newVkDrawIndirectCommandinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDrawIndirectCommand create()
Returns a newVkDrawIndirectCommandinstance allocated withBufferUtils.
-
create
public static VkDrawIndirectCommand create(long address)
Returns a newVkDrawIndirectCommandinstance for the specified memory address.
-
createSafe
@Nullable public static VkDrawIndirectCommand createSafe(long address)
-
malloc
public static VkDrawIndirectCommand.Buffer malloc(int capacity)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDrawIndirectCommand.Buffer calloc(int capacity)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndirectCommand.Buffer create(int capacity)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndirectCommand.Buffer create(long address, int capacity)
Create aVkDrawIndirectCommand.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static VkDrawIndirectCommand.Buffer createSafe(long address, int capacity)
-
mallocStack
public static VkDrawIndirectCommand mallocStack()
Returns a newVkDrawIndirectCommandinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDrawIndirectCommand callocStack()
Returns a newVkDrawIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDrawIndirectCommand mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDrawIndirectCommand callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkDrawIndirectCommand.Buffer mallocStack(int capacity)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDrawIndirectCommand.Buffer callocStack(int capacity)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDrawIndirectCommand.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkDrawIndirectCommand.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nvertexCount
public static int nvertexCount(long struct)
Unsafe version ofvertexCount().
-
ninstanceCount
public static int ninstanceCount(long struct)
Unsafe version ofinstanceCount().
-
nfirstVertex
public static int nfirstVertex(long struct)
Unsafe version offirstVertex().
-
nfirstInstance
public static int nfirstInstance(long struct)
Unsafe version offirstInstance().
-
nvertexCount
public static void nvertexCount(long struct, int value)Unsafe version ofvertexCount.
-
ninstanceCount
public static void ninstanceCount(long struct, int value)Unsafe version ofinstanceCount.
-
nfirstVertex
public static void nfirstVertex(long struct, int value)Unsafe version offirstVertex.
-
nfirstInstance
public static void nfirstInstance(long struct, int value)Unsafe version offirstInstance.
-
-