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 indirect drawing 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
Layout
struct VkDrawIndirectCommand { uint32_tvertexCount(); uint32_tinstanceCount(); uint32_tfirstVertex(); uint32_tfirstInstance(); }
-
-
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 Deprecated 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 VkDrawIndirectCommand.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommandcalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommandcallocStack()Deprecated.static VkDrawIndirectCommand.BuffercallocStack(int capacity)Deprecated.static VkDrawIndirectCommand.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDrawIndirectCommandcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()the instance ID of the first instance to draw.VkDrawIndirectCommandfirstInstance(int value)Sets the specified value to thefirstInstance()field.intfirstVertex()the index of the first vertex to draw.VkDrawIndirectCommandfirstVertex(int value)Sets the specified value to thefirstVertex()field.intinstanceCount()the number of instances to draw.VkDrawIndirectCommandinstanceCount(int value)Sets the specified value to theinstanceCount()field.static VkDrawIndirectCommandmalloc()Returns a newVkDrawIndirectCommandinstance allocated withmemAlloc.static VkDrawIndirectCommand.Buffermalloc(int capacity)Returns a newVkDrawIndirectCommand.Bufferinstance allocated withmemAlloc.static VkDrawIndirectCommand.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndirectCommandmalloc(org.lwjgl.system.MemoryStack stack)Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.static VkDrawIndirectCommandmallocStack()Deprecated.static VkDrawIndirectCommand.BuffermallocStack(int capacity)Deprecated.static VkDrawIndirectCommand.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static VkDrawIndirectCommandmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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()the number of vertices to draw.VkDrawIndirectCommandvertexCount(int value)Sets the specified value to thevertexCount()field.
-
-
-
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()
the number of vertices to draw.
-
instanceCount
public int instanceCount()
the number of instances to draw.
-
firstVertex
public int firstVertex()
the index of the first vertex to draw.
-
firstInstance
public int firstInstance()
the instance ID of the first instance to draw.
-
vertexCount
public VkDrawIndirectCommand vertexCount(int value)
Sets the specified value to thevertexCount()field.
-
instanceCount
public VkDrawIndirectCommand instanceCount(int value)
Sets the specified value to theinstanceCount()field.
-
firstVertex
public VkDrawIndirectCommand firstVertex(int value)
Sets the specified value to thefirstVertex()field.
-
firstInstance
public VkDrawIndirectCommand firstInstance(int value)
Sets the specified value to thefirstInstance()field.
-
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
@Deprecated public static VkDrawIndirectCommand mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndirectCommand callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndirectCommand mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndirectCommand callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndirectCommand.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static VkDrawIndirectCommand.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static VkDrawIndirectCommand.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 VkDrawIndirectCommand.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static VkDrawIndirectCommand malloc(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static VkDrawIndirectCommand calloc(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
-
malloc
public static VkDrawIndirectCommand.Buffer malloc(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
-
calloc
public static VkDrawIndirectCommand.Buffer calloc(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.
-
-