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, withindexSize
being based on the type specified byindexType
, where the index buffer,indexType
, andoffset
are specified viaCmdBindIndexBuffer
- If the drawIndirectFirstInstance feature is not enabled,
firstInstance
must 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 class
VkDrawIndexedIndirectCommand.Buffer
An array ofVkDrawIndexedIndirectCommand
structs.-
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The 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 aVkDrawIndexedIndirectCommand
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static VkDrawIndexedIndirectCommand
calloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemCalloc
.static VkDrawIndexedIndirectCommand.Buffer
calloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemCalloc
.static VkDrawIndexedIndirectCommand
callocStack()
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand.Buffer
callocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand
callocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand
create()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withBufferUtils
.static VkDrawIndexedIndirectCommand.Buffer
create(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withBufferUtils
.static VkDrawIndexedIndirectCommand
create(long address)
Returns a newVkDrawIndexedIndirectCommand
instance for the specified memory address ornull
if the address isNULL
.static VkDrawIndexedIndirectCommand.Buffer
create(long address, int capacity)
Create aVkDrawIndexedIndirectCommand.Buffer
instance at the specified memory.int
firstIndex()
Returns the value of thefirstIndex
field.int
firstInstance()
Returns the value of thefirstInstance
field.int
indexCount()
Returns the value of theindexCount
field.int
instanceCount()
Returns the value of theinstanceCount
field.static VkDrawIndexedIndirectCommand
malloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemAlloc
.static VkDrawIndexedIndirectCommand.Buffer
malloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemAlloc
.static VkDrawIndexedIndirectCommand
mallocStack()
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the thread-localMemoryStack
.static VkDrawIndexedIndirectCommand.Buffer
mallocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
.static VkDrawIndexedIndirectCommand.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
.static VkDrawIndexedIndirectCommand
mallocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.int
sizeof()
Returns thesizeof(struct)
.int
vertexOffset()
Returns the value of thevertexOffset
field.-
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 aVkDrawIndexedIndirectCommand
instance at the current position of the specifiedByteBuffer
container. 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:Struct
Returns thesizeof(struct)
.
-
indexCount
public int indexCount()
Returns the value of theindexCount
field.
-
instanceCount
public int instanceCount()
Returns the value of theinstanceCount
field.
-
firstIndex
public int firstIndex()
Returns the value of thefirstIndex
field.
-
vertexOffset
public int vertexOffset()
Returns the value of thevertexOffset
field.
-
firstInstance
public int firstInstance()
Returns the value of thefirstInstance
field.
-
malloc
public static VkDrawIndexedIndirectCommand malloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDrawIndexedIndirectCommand calloc()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDrawIndexedIndirectCommand create()
Returns a newVkDrawIndexedIndirectCommand
instance allocated withBufferUtils
.
-
create
public static VkDrawIndexedIndirectCommand create(long address)
Returns a newVkDrawIndexedIndirectCommand
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkDrawIndexedIndirectCommand.Buffer malloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDrawIndexedIndirectCommand.Buffer calloc(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDrawIndexedIndirectCommand.Buffer create(long address, int capacity)
Create aVkDrawIndexedIndirectCommand.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkDrawIndexedIndirectCommand mallocStack()
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack()
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDrawIndexedIndirectCommand mallocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack(MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDrawIndexedIndirectCommand.Buffer callocStack(int capacity)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDrawIndexedIndirectCommand.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-