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, NativeResource, Pointer
public class VkDrawIndirectCommand extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes an indirect draw command.
Valid Usage
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding
- If the drawIndirectFirstInstance feature is not enabled,
firstInstancemust be 0
Member documentation
vertexCount– the number of vertices to drawinstanceCount– the number of instances to drawfirstVertex– the index of the first vertex to drawfirstInstance– 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 and Description static classVkDrawIndirectCommand.BufferAn array ofVkDrawIndirectCommandstructs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static intSIZEOFThe struct size in bytes.-
Fields inherited from interface org.lwjgl.system.Pointer
POINTER_SHIFT, POINTER_SIZE
-
-
Constructor Summary
Constructors Constructor and 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 and 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, MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndirectCommandcallocStack(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 ornullif the address isNULL.static VkDrawIndirectCommand.Buffercreate(long address, int capacity)Create aVkDrawIndirectCommand.Bufferinstance at the specified memory.intfirstInstance()Returns the value of thefirstInstancefield.intfirstVertex()Returns the value of thefirstVertexfield.intinstanceCount()Returns the value of 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, MemoryStack stack)Returns a newVkDrawIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndirectCommandmallocStack(MemoryStack stack)Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.intsizeof()Returns thesizeof(struct).intvertexCount()Returns the value of thevertexCountfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
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()
Description copied from class:StructReturns thesizeof(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.
-
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 ornullif the address isNULL.
-
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
-
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(MemoryStack stack)
Returns a newVkDrawIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDrawIndirectCommand callocStack(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, 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, 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
-
-