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
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class VkDrawIndexedIndirectCommand extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Structure specifying a draw indexed indirect command.Description
The members of
VkDrawIndexedIndirectCommand
have the same meaning as the similarly named parameters ofCmdDrawIndexed
.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
(indexSize * (firstIndex + indexCount) offset)
must be less than or equal to the size of the bound index buffer, withindexSize
being based on the type specified byindexType
, where the index buffer,indexType
, andoffset
are specified viavkCmdBindIndexBuffer
- If the drawIndirectFirstInstance feature is not enabled,
firstInstance
must be 0
See Also
Member documentation
indexCount
– the number of vertices to draw.instanceCount
– the number of instances to draw.firstIndex
– the base index within the index buffer.vertexOffset
– the value added to the vertex index before indexing into the vertex buffer.firstInstance
– 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 Description static class
VkDrawIndexedIndirectCommand.Buffer
An array ofVkDrawIndexedIndirectCommand
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
FIRSTINDEX
FIRSTINSTANCE
INDEXCOUNT
INSTANCECOUNTThe struct member offsets.static int
SIZEOF
The struct size in bytes.static int
VERTEXOFFSET
The struct member offsets.
-
Constructor Summary
Constructors Constructor 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 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndexedIndirectCommand
callocStack(org.lwjgl.system.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.static VkDrawIndexedIndirectCommand.Buffer
create(long address, int capacity)
Create aVkDrawIndexedIndirectCommand.Buffer
instance at the specified memory.static VkDrawIndexedIndirectCommand
createSafe(long address)
static VkDrawIndexedIndirectCommand.Buffer
createSafe(long address, int capacity)
int
firstIndex()
Returns the value of thefirstIndex
field.VkDrawIndexedIndirectCommand
firstIndex(int value)
Sets the specified value to thefirstIndex
field.int
firstInstance()
Returns the value of thefirstInstance
field.VkDrawIndexedIndirectCommand
firstInstance(int value)
Sets the specified value to thefirstInstance
field.int
indexCount()
Returns the value of theindexCount
field.VkDrawIndexedIndirectCommand
indexCount(int value)
Sets the specified value to theindexCount
field.int
instanceCount()
Returns the value of theinstanceCount
field.VkDrawIndexedIndirectCommand
instanceCount(int value)
Sets the specified value to 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, org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
.static VkDrawIndexedIndirectCommand
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.static int
nfirstIndex(long struct)
Unsafe version offirstIndex()
.static void
nfirstIndex(long struct, int value)
Unsafe version offirstIndex
.static int
nfirstInstance(long struct)
Unsafe version offirstInstance()
.static void
nfirstInstance(long struct, int value)
Unsafe version offirstInstance
.static int
nindexCount(long struct)
Unsafe version ofindexCount()
.static void
nindexCount(long struct, int value)
Unsafe version ofindexCount
.static int
ninstanceCount(long struct)
Unsafe version ofinstanceCount()
.static void
ninstanceCount(long struct, int value)
Unsafe version ofinstanceCount
.static int
nvertexOffset(long struct)
Unsafe version ofvertexOffset()
.static void
nvertexOffset(long struct, int value)
Unsafe version ofvertexOffset
.VkDrawIndexedIndirectCommand
set(int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)
Initializes this struct with the specified values.VkDrawIndexedIndirectCommand
set(VkDrawIndexedIndirectCommand src)
Copies the specified struct data to this struct.int
sizeof()
int
vertexOffset()
Returns the value of thevertexOffset
field.VkDrawIndexedIndirectCommand
vertexOffset(int value)
Sets the specified value to thevertexOffset
field.
-
-
-
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()
- Specified by:
sizeof
in classorg.lwjgl.system.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.
-
indexCount
public VkDrawIndexedIndirectCommand indexCount(int value)
Sets the specified value to theindexCount
field.
-
instanceCount
public VkDrawIndexedIndirectCommand instanceCount(int value)
Sets the specified value to theinstanceCount
field.
-
firstIndex
public VkDrawIndexedIndirectCommand firstIndex(int value)
Sets the specified value to thefirstIndex
field.
-
vertexOffset
public VkDrawIndexedIndirectCommand vertexOffset(int value)
Sets the specified value to thevertexOffset
field.
-
firstInstance
public VkDrawIndexedIndirectCommand firstInstance(int value)
Sets the specified value to thefirstInstance
field.
-
set
public VkDrawIndexedIndirectCommand set(int indexCount, int instanceCount, int firstIndex, int vertexOffset, int firstInstance)
Initializes this struct with the specified values.
-
set
public VkDrawIndexedIndirectCommand set(VkDrawIndexedIndirectCommand src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
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.
-
createSafe
@Nullable public static VkDrawIndexedIndirectCommand createSafe(long address)
-
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
-
createSafe
@Nullable public static VkDrawIndexedIndirectCommand.Buffer createSafe(long address, int 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(org.lwjgl.system.MemoryStack stack)
Returns a newVkDrawIndexedIndirectCommand
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDrawIndexedIndirectCommand callocStack(org.lwjgl.system.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, org.lwjgl.system.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, org.lwjgl.system.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
-
nindexCount
public static int nindexCount(long struct)
Unsafe version ofindexCount()
.
-
ninstanceCount
public static int ninstanceCount(long struct)
Unsafe version ofinstanceCount()
.
-
nfirstIndex
public static int nfirstIndex(long struct)
Unsafe version offirstIndex()
.
-
nvertexOffset
public static int nvertexOffset(long struct)
Unsafe version ofvertexOffset()
.
-
nfirstInstance
public static int nfirstInstance(long struct)
Unsafe version offirstInstance()
.
-
nindexCount
public static void nindexCount(long struct, int value)
Unsafe version ofindexCount
.
-
ninstanceCount
public static void ninstanceCount(long struct, int value)
Unsafe version ofinstanceCount
.
-
nfirstIndex
public static void nfirstIndex(long struct, int value)
Unsafe version offirstIndex
.
-
nvertexOffset
public static void nvertexOffset(long struct, int value)
Unsafe version ofvertexOffset
.
-
nfirstInstance
public static void nfirstInstance(long struct, int value)
Unsafe version offirstInstance
.
-
-