Class VkDrawIndirectCommand
java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkDrawIndirectCommand
- All Implemented Interfaces:
Addressable
Layout
struct VkDrawIndirectCommand {
uint32_t vertexCount;
uint32_t instanceCount;
uint32_t firstVertex;
uint32_t firstInstance;
};
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final GroupLayout
The struct layout ofVkDrawIndirectCommand
.static final MemoryLayout
The memory layout offirstInstance
.static final MemoryLayout
The memory layout offirstVertex
.static final MemoryLayout
The memory layout ofinstanceCount
.static final MemoryLayout
The memory layout ofvertexCount
.static final long
The byte offset offirstInstance
.static final long
The byte offset offirstVertex
.static final long
The byte offset ofinstanceCount
.static final long
The byte offset ofvertexCount
.static final VarHandle
TheVarHandle
offirstInstance
of type(MemorySegment base, long baseOffset, long index)MemorySegment
.static final VarHandle
TheVarHandle
offirstVertex
of type(MemorySegment base, long baseOffset, long index)MemorySegment
.static final VarHandle
TheVarHandle
ofinstanceCount
of type(MemorySegment base, long baseOffset, long index)MemorySegment
.static final VarHandle
TheVarHandle
ofvertexCount
of type(MemorySegment base, long baseOffset, long index)MemorySegment
. -
Constructor Summary
ConstructorsConstructorDescriptionVkDrawIndirectCommand
(MemorySegment segment, long elementCount) CreatesVkDrawIndirectCommand
with the given segment. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkDrawIndirectCommand
alloc
(SegmentAllocator allocator) Allocates aVkDrawIndirectCommand
with the given segment allocator.static VkDrawIndirectCommand
alloc
(SegmentAllocator allocator, long count) Allocates aVkDrawIndirectCommand
with the given segment allocator and count.asSlice
(long index) Creates a slice ofVkDrawIndirectCommand
.asSlice
(long index, long count) Creates a slice ofVkDrawIndirectCommand
.at
(long index, Consumer<VkDrawIndirectCommand> func) VisitsVkDrawIndirectCommand
buffer at the given index.Copies from the given source.int
ReturnsfirstInstance
.firstInstance
(int value) SetsfirstInstance
with the given value.static int
firstInstance
(MemorySegment segment, long index) ReturnsfirstInstance
at the given index.static void
firstInstance
(MemorySegment segment, long index, int value) SetsfirstInstance
with the given value at the given index.int
firstInstanceAt
(long index) ReturnsfirstInstance
at the given index.firstInstanceAt
(long index, int value) SetsfirstInstance
with the given value at the given index.int
ReturnsfirstVertex
.firstVertex
(int value) SetsfirstVertex
with the given value.static int
firstVertex
(MemorySegment segment, long index) ReturnsfirstVertex
at the given index.static void
firstVertex
(MemorySegment segment, long index, int value) SetsfirstVertex
with the given value at the given index.int
firstVertexAt
(long index) ReturnsfirstVertex
at the given index.firstVertexAt
(long index, int value) SetsfirstVertex
with the given value at the given index.int
ReturnsinstanceCount
.instanceCount
(int value) SetsinstanceCount
with the given value.static int
instanceCount
(MemorySegment segment, long index) ReturnsinstanceCount
at the given index.static void
instanceCount
(MemorySegment segment, long index, int value) SetsinstanceCount
with the given value at the given index.int
instanceCountAt
(long index) ReturnsinstanceCount
at the given index.instanceCountAt
(long index, int value) SetsinstanceCount
with the given value at the given index.static VkDrawIndirectCommand
of
(MemorySegment segment) CreatesVkDrawIndirectCommand
with the given segment.static VkDrawIndirectCommand
ofNative
(MemorySegment segment) CreatesVkDrawIndirectCommand
with the given segment.static VkDrawIndirectCommand
ofNative
(MemorySegment segment, long count) CreatesVkDrawIndirectCommand
with the given segment.reinterpret
(long count) Reinterprets this buffer with the given count.int
ReturnsvertexCount
.vertexCount
(int value) SetsvertexCount
with the given value.static int
vertexCount
(MemorySegment segment, long index) ReturnsvertexCount
at the given index.static void
vertexCount
(MemorySegment segment, long index, int value) SetsvertexCount
with the given value at the given index.int
vertexCountAt
(long index) ReturnsvertexCount
at the given index.vertexCountAt
(long index, int value) SetsvertexCount
with the given value at the given index.Methods inherited from class overrungl.struct.GroupType
estimateCount, estimateCount, groupLayout, segment
-
Field Details
-
LAYOUT
The struct layout ofVkDrawIndirectCommand
. -
OFFSET_vertexCount
public static final long OFFSET_vertexCountThe byte offset ofvertexCount
. -
LAYOUT_vertexCount
The memory layout ofvertexCount
. -
VH_vertexCount
-
OFFSET_instanceCount
public static final long OFFSET_instanceCountThe byte offset ofinstanceCount
. -
LAYOUT_instanceCount
The memory layout ofinstanceCount
. -
VH_instanceCount
-
OFFSET_firstVertex
public static final long OFFSET_firstVertexThe byte offset offirstVertex
. -
LAYOUT_firstVertex
The memory layout offirstVertex
. -
VH_firstVertex
-
OFFSET_firstInstance
public static final long OFFSET_firstInstanceThe byte offset offirstInstance
. -
LAYOUT_firstInstance
The memory layout offirstInstance
. -
VH_firstInstance
-
-
Constructor Details
-
VkDrawIndirectCommand
CreatesVkDrawIndirectCommand
with the given segment.- Parameters:
segment
- the memory segmentelementCount
- the element count of this struct buffer
-
-
Method Details
-
of
CreatesVkDrawIndirectCommand
with the given segment.- Parameters:
segment
- the memory segment- Returns:
- the created instance or
null
if the segment isNULL
-
ofNative
Creates
VkDrawIndirectCommand
with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment
- the memory segment- Returns:
- the created instance or
null
if the segment isNULL
-
ofNative
Creates
VkDrawIndirectCommand
with the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment
- the memory segmentcount
- the count of the buffer- Returns:
- the created instance or
null
if the segment isNULL
-
alloc
Allocates aVkDrawIndirectCommand
with the given segment allocator.- Parameters:
allocator
- the segment allocator- Returns:
- the allocated
VkDrawIndirectCommand
-
alloc
Allocates aVkDrawIndirectCommand
with the given segment allocator and count.- Parameters:
allocator
- the segment allocatorcount
- the count- Returns:
- the allocated
VkDrawIndirectCommand
-
copyFrom
Copies from the given source.- Parameters:
src
- the source- Returns:
this
-
reinterpret
Reinterprets this buffer with the given count.- Parameters:
count
- the new count- Returns:
- the reinterpreted buffer
-
vertexCount
ReturnsvertexCount
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
vertexCount
at the given index
-
vertexCount
public int vertexCount()ReturnsvertexCount
.- Returns:
vertexCount
-
vertexCount
SetsvertexCount
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
vertexCount
SetsvertexCount
with the given value.- Parameters:
value
- the value- Returns:
this
-
instanceCount
ReturnsinstanceCount
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
instanceCount
at the given index
-
instanceCount
public int instanceCount()ReturnsinstanceCount
.- Returns:
instanceCount
-
instanceCount
SetsinstanceCount
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
instanceCount
SetsinstanceCount
with the given value.- Parameters:
value
- the value- Returns:
this
-
firstVertex
ReturnsfirstVertex
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
firstVertex
at the given index
-
firstVertex
public int firstVertex()ReturnsfirstVertex
.- Returns:
firstVertex
-
firstVertex
SetsfirstVertex
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
firstVertex
SetsfirstVertex
with the given value.- Parameters:
value
- the value- Returns:
this
-
firstInstance
ReturnsfirstInstance
at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffer- Returns:
firstInstance
at the given index
-
firstInstance
public int firstInstance()ReturnsfirstInstance
.- Returns:
firstInstance
-
firstInstance
SetsfirstInstance
with the given value at the given index.- Parameters:
segment
- the segment of the structindex
- the index of the struct buffervalue
- the value
-
firstInstance
SetsfirstInstance
with the given value.- Parameters:
value
- the value- Returns:
this
-
asSlice
Creates a slice ofVkDrawIndirectCommand
.- Parameters:
index
- the index of the struct buffer- Returns:
- the slice of
VkDrawIndirectCommand
-
asSlice
Creates a slice ofVkDrawIndirectCommand
.- Parameters:
index
- the index of the struct buffercount
- the count- Returns:
- the slice of
VkDrawIndirectCommand
-
at
VisitsVkDrawIndirectCommand
buffer at the given index.- Parameters:
index
- the index of this bufferfunc
- the function to run with the slice of this buffer- Returns:
this
-
vertexCountAt
public int vertexCountAt(long index) ReturnsvertexCount
at the given index.- Parameters:
index
- the index of the struct buffer- Returns:
vertexCount
at the given index
-
vertexCountAt
SetsvertexCount
with the given value at the given index.- Parameters:
index
- the index of the struct buffervalue
- the value- Returns:
this
-
instanceCountAt
public int instanceCountAt(long index) ReturnsinstanceCount
at the given index.- Parameters:
index
- the index of the struct buffer- Returns:
instanceCount
at the given index
-
instanceCountAt
SetsinstanceCount
with the given value at the given index.- Parameters:
index
- the index of the struct buffervalue
- the value- Returns:
this
-
firstVertexAt
public int firstVertexAt(long index) ReturnsfirstVertex
at the given index.- Parameters:
index
- the index of the struct buffer- Returns:
firstVertex
at the given index
-
firstVertexAt
SetsfirstVertex
with the given value at the given index.- Parameters:
index
- the index of the struct buffervalue
- the value- Returns:
this
-
firstInstanceAt
public int firstInstanceAt(long index) ReturnsfirstInstance
at the given index.- Parameters:
index
- the index of the struct buffer- Returns:
firstInstance
at the given index
-
firstInstanceAt
SetsfirstInstance
with the given value at the given index.- Parameters:
index
- the index of the struct buffervalue
- the value- Returns:
this
-