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,
firstInstance
must 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 class
VkDrawIndirectCommand.Buffer
An array ofVkDrawIndirectCommand
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 VkDrawIndirectCommand(java.nio.ByteBuffer container)
Creates aVkDrawIndirectCommand
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 VkDrawIndirectCommand
calloc()
Returns a newVkDrawIndirectCommand
instance allocated withmemCalloc
.static VkDrawIndirectCommand.Buffer
calloc(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withmemCalloc
.static VkDrawIndirectCommand
callocStack()
Returns a newVkDrawIndirectCommand
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDrawIndirectCommand.Buffer
callocStack(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static VkDrawIndirectCommand.Buffer
callocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndirectCommand
callocStack(MemoryStack stack)
Returns a newVkDrawIndirectCommand
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static VkDrawIndirectCommand
create()
Returns a newVkDrawIndirectCommand
instance allocated withBufferUtils
.static VkDrawIndirectCommand.Buffer
create(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withBufferUtils
.static VkDrawIndirectCommand
create(long address)
Returns a newVkDrawIndirectCommand
instance for the specified memory address ornull
if the address isNULL
.static VkDrawIndirectCommand.Buffer
create(long address, int capacity)
Create aVkDrawIndirectCommand.Buffer
instance at the specified memory.int
firstInstance()
Returns the value of thefirstInstance
field.int
firstVertex()
Returns the value of thefirstVertex
field.int
instanceCount()
Returns the value of theinstanceCount
field.static VkDrawIndirectCommand
malloc()
Returns a newVkDrawIndirectCommand
instance allocated withmemAlloc
.static VkDrawIndirectCommand.Buffer
malloc(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withmemAlloc
.static VkDrawIndirectCommand
mallocStack()
Returns a newVkDrawIndirectCommand
instance allocated on the thread-localMemoryStack
.static VkDrawIndirectCommand.Buffer
mallocStack(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
.static VkDrawIndirectCommand.Buffer
mallocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated on the specifiedMemoryStack
.static VkDrawIndirectCommand
mallocStack(MemoryStack stack)
Returns a newVkDrawIndirectCommand
instance allocated on the specifiedMemoryStack
.int
sizeof()
Returns thesizeof(struct)
.int
vertexCount()
Returns the value of thevertexCount
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
-
VkDrawIndirectCommand
public VkDrawIndirectCommand(java.nio.ByteBuffer container)
Creates aVkDrawIndirectCommand
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)
.
-
vertexCount
public int vertexCount()
Returns the value of thevertexCount
field.
-
instanceCount
public int instanceCount()
Returns the value of theinstanceCount
field.
-
firstVertex
public int firstVertex()
Returns the value of thefirstVertex
field.
-
firstInstance
public int firstInstance()
Returns the value of thefirstInstance
field.
-
malloc
public static VkDrawIndirectCommand malloc()
Returns a newVkDrawIndirectCommand
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static VkDrawIndirectCommand calloc()
Returns a newVkDrawIndirectCommand
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static VkDrawIndirectCommand create()
Returns a newVkDrawIndirectCommand
instance allocated withBufferUtils
.
-
create
public static VkDrawIndirectCommand create(long address)
Returns a newVkDrawIndirectCommand
instance for the specified memory address ornull
if the address isNULL
.
-
malloc
public static VkDrawIndirectCommand.Buffer malloc(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static VkDrawIndirectCommand.Buffer calloc(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDrawIndirectCommand.Buffer create(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static VkDrawIndirectCommand.Buffer create(long address, int capacity)
Create aVkDrawIndirectCommand.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
mallocStack
public static VkDrawIndirectCommand mallocStack()
Returns a newVkDrawIndirectCommand
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static VkDrawIndirectCommand callocStack()
Returns a newVkDrawIndirectCommand
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static VkDrawIndirectCommand mallocStack(MemoryStack stack)
Returns a newVkDrawIndirectCommand
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static VkDrawIndirectCommand callocStack(MemoryStack stack)
Returns a newVkDrawIndirectCommand
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static VkDrawIndirectCommand.Buffer callocStack(int capacity)
Returns a newVkDrawIndirectCommand.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static VkDrawIndirectCommand.Buffer mallocStack(int capacity, MemoryStack stack)
Returns a newVkDrawIndirectCommand.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
-