Package org.lwjgl.vulkan
Class VkDrawIndexedIndirectCommand
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.vulkan.VkDrawIndexedIndirectCommand
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, NativeResource, Pointer
public class VkDrawIndexedIndirectCommand extends Struct
Khronos Reference Page
Vulkan SpecificationDescribes an indirect indexed draw command.
Valid Usage
- For a given vertex buffer binding, any attribute data fetched must be entirely contained within the corresponding vertex buffer binding
- (
indexSize* (firstIndex+indexCount) +offset) must be less than or equal to the size of the currently bound index buffer, withindexSizebeing based on the type specified byindexType, where the index buffer,indexType, andoffsetare specified viaCmdBindIndexBuffer - If the drawIndirectFirstInstance feature is not enabled,
firstInstancemust be 0
Member documentation
indexCount– the number of vertices to drawinstanceCount– the number of instances to drawfirstIndex– the base index within the index buffervertexOffset– the value added to the vertex index before indexing into the vertex bufferfirstInstance– the instance ID of the first instance to draw
Layout
struct VkDrawIndexedIndirectCommand { uint32_t indexCount; uint32_t instanceCount; uint32_t firstIndex; int32_t vertexOffset; uint32_t firstInstance; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static classVkDrawIndexedIndirectCommand.BufferAn array ofVkDrawIndexedIndirectCommandstructs.-
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 VkDrawIndexedIndirectCommand(java.nio.ByteBuffer container)Creates aVkDrawIndexedIndirectCommandinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkDrawIndexedIndirectCommandcalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommand.Buffercalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc.static VkDrawIndexedIndirectCommandcallocStack()Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommand.BuffercallocStack(int capacity, MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommandcallocStack(MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static VkDrawIndexedIndirectCommandcreate()Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils.static VkDrawIndexedIndirectCommand.Buffercreate(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.static VkDrawIndexedIndirectCommandcreate(long address)Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address ornullif the address isNULL.static VkDrawIndexedIndirectCommand.Buffercreate(long address, int capacity)Create aVkDrawIndexedIndirectCommand.Bufferinstance at the specified memory.intfirstIndex()Returns the value of thefirstIndexfield.intfirstInstance()Returns the value of thefirstInstancefield.intindexCount()Returns the value of theindexCountfield.intinstanceCount()Returns the value of theinstanceCountfield.static VkDrawIndexedIndirectCommandmalloc()Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommand.Buffermalloc(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc.static VkDrawIndexedIndirectCommandmallocStack()Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStack.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.static VkDrawIndexedIndirectCommand.BuffermallocStack(int capacity, MemoryStack stack)Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.static VkDrawIndexedIndirectCommandmallocStack(MemoryStack stack)Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.intsizeof()Returns thesizeof(struct).intvertexOffset()Returns the value of thevertexOffsetfield.-
Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
-
Methods inherited from interface org.lwjgl.system.NativeResource
close
-
-
-
-
Constructor Detail
-
VkDrawIndexedIndirectCommand
public VkDrawIndexedIndirectCommand(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
Description copied from class:StructReturns thesizeof(struct).
-
indexCount
public int indexCount()
Returns the value of theindexCountfield.
-
instanceCount
public int instanceCount()
Returns the value of theinstanceCountfield.
-
firstIndex
public int firstIndex()
Returns the value of thefirstIndexfield.
-
vertexOffset
public int vertexOffset()
Returns the value of thevertexOffsetfield.
-
firstInstance
public int firstInstance()
Returns the value of thefirstInstancefield.
-
malloc
public static VkDrawIndexedIndirectCommand malloc()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static VkDrawIndexedIndirectCommand calloc()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static VkDrawIndexedIndirectCommand create()
Returns a newVkDrawIndexedIndirectCommandinstance allocated withBufferUtils.
-
create
public static VkDrawIndexedIndirectCommand create(long address)
Returns a newVkDrawIndexedIndirectCommandinstance for the specified memory address ornullif the address isNULL.
-
malloc
public static VkDrawIndexedIndirectCommand.Buffer malloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static VkDrawIndexedIndirectCommand.Buffer calloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(long address, int capacity)
Create aVkDrawIndexedIndirectCommand.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
mallocStack
public static VkDrawIndexedIndirectCommand mallocStack()
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStack.
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack()
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static VkDrawIndexedIndirectCommand mallocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommandinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
-