Class VkDrawIndirectCommand
java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkDrawIndirectCommand
- All Implemented Interfaces:
Addressable
Represents VkDrawIndirectCommand.
Layout
struct VkDrawIndirectCommand {
uint32_t vertexCount;
uint32_t instanceCount;
uint32_t firstVertex;
uint32_t firstInstance;
};
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StructLayoutThe struct layout ofVkDrawIndirectCommand.static final MemoryLayoutThe memory layout offirstInstance.static final MemoryLayoutThe memory layout offirstVertex.static final MemoryLayoutThe memory layout ofinstanceCount.static final MemoryLayoutThe memory layout ofvertexCount.static final longThe byte offset offirstInstance.static final longThe byte offset offirstVertex.static final longThe byte offset ofinstanceCount.static final longThe byte offset ofvertexCount.static final VarHandleTheVarHandleoffirstInstanceof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandleTheVarHandleoffirstVertexof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandleTheVarHandleofinstanceCountof type(MemorySegment base, long baseOffset, long index)MemorySegment.static final VarHandleTheVarHandleofvertexCountof type(MemorySegment base, long baseOffset, long index)MemorySegment. -
Constructor Summary
ConstructorsConstructorDescriptionVkDrawIndirectCommand(MemorySegment segment, long elementCount) CreatesVkDrawIndirectCommandwith the given segment. -
Method Summary
Modifier and TypeMethodDescriptionstatic VkDrawIndirectCommandalloc(SegmentAllocator allocator) Allocates aVkDrawIndirectCommandwith the given segment allocator.static VkDrawIndirectCommandalloc(SegmentAllocator allocator, long count) Allocates aVkDrawIndirectCommandwith 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) VisitsVkDrawIndirectCommandbuffer at the given index.Copies from the given source.intReturnsfirstInstance.firstInstance(int value) SetsfirstInstancewith the given value.static intfirstInstance(MemorySegment segment, long index) ReturnsfirstInstanceat the given index.static voidfirstInstance(MemorySegment segment, long index, int value) SetsfirstInstancewith the given value at the given index.intfirstInstanceAt(long index) ReturnsfirstInstanceat the given index.firstInstanceAt(long index, int value) SetsfirstInstancewith the given value at the given index.intReturnsfirstVertex.firstVertex(int value) SetsfirstVertexwith the given value.static intfirstVertex(MemorySegment segment, long index) ReturnsfirstVertexat the given index.static voidfirstVertex(MemorySegment segment, long index, int value) SetsfirstVertexwith the given value at the given index.intfirstVertexAt(long index) ReturnsfirstVertexat the given index.firstVertexAt(long index, int value) SetsfirstVertexwith the given value at the given index.intReturnsinstanceCount.instanceCount(int value) SetsinstanceCountwith the given value.static intinstanceCount(MemorySegment segment, long index) ReturnsinstanceCountat the given index.static voidinstanceCount(MemorySegment segment, long index, int value) SetsinstanceCountwith the given value at the given index.intinstanceCountAt(long index) ReturnsinstanceCountat the given index.instanceCountAt(long index, int value) SetsinstanceCountwith the given value at the given index.static VkDrawIndirectCommandof(MemorySegment segment) CreatesVkDrawIndirectCommandwith the given segment.static VkDrawIndirectCommandofNative(MemorySegment segment) CreatesVkDrawIndirectCommandwith the given segment.static VkDrawIndirectCommandofNative(MemorySegment segment, long count) CreatesVkDrawIndirectCommandwith the given segment.reinterpret(long count) Reinterprets this buffer with the given count.intReturnsvertexCount.vertexCount(int value) SetsvertexCountwith the given value.static intvertexCount(MemorySegment segment, long index) ReturnsvertexCountat the given index.static voidvertexCount(MemorySegment segment, long index, int value) SetsvertexCountwith the given value at the given index.intvertexCountAt(long index) ReturnsvertexCountat the given index.vertexCountAt(long index, int value) SetsvertexCountwith the given value at the given index.Methods inherited from class 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
CreatesVkDrawIndirectCommandwith the given segment.- Parameters:
segment- the memory segmentelementCount- the element count of this struct buffer
-
-
Method Details
-
of
CreatesVkDrawIndirectCommandwith the given segment.- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
VkDrawIndirectCommandwith the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segment- Returns:
- the created instance or
nullif the segment isNULL
-
ofNative
Creates
VkDrawIndirectCommandwith the given segment.Reinterprets the segment if zero-length.
- Parameters:
segment- the memory segmentcount- the count of the buffer- Returns:
- the created instance or
nullif the segment isNULL
-
alloc
Allocates aVkDrawIndirectCommandwith the given segment allocator.- Parameters:
allocator- the segment allocator- Returns:
- the allocated
VkDrawIndirectCommand
-
alloc
Allocates aVkDrawIndirectCommandwith 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
ReturnsvertexCountat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
vertexCountat the given index
-
vertexCount
public int vertexCount()ReturnsvertexCount.- Returns:
vertexCount
-
vertexCount
SetsvertexCountwith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
vertexCount
SetsvertexCountwith the given value.- Parameters:
value- the value- Returns:
this
-
instanceCount
ReturnsinstanceCountat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
instanceCountat the given index
-
instanceCount
public int instanceCount()ReturnsinstanceCount.- Returns:
instanceCount
-
instanceCount
SetsinstanceCountwith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
instanceCount
SetsinstanceCountwith the given value.- Parameters:
value- the value- Returns:
this
-
firstVertex
ReturnsfirstVertexat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
firstVertexat the given index
-
firstVertex
public int firstVertex()ReturnsfirstVertex.- Returns:
firstVertex
-
firstVertex
SetsfirstVertexwith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
firstVertex
SetsfirstVertexwith the given value.- Parameters:
value- the value- Returns:
this
-
firstInstance
ReturnsfirstInstanceat the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffer- Returns:
firstInstanceat the given index
-
firstInstance
public int firstInstance()ReturnsfirstInstance.- Returns:
firstInstance
-
firstInstance
SetsfirstInstancewith the given value at the given index.- Parameters:
segment- the segment of the structindex- the index of the struct buffervalue- the value
-
firstInstance
SetsfirstInstancewith 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
VisitsVkDrawIndirectCommandbuffer 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) ReturnsvertexCountat the given index.- Parameters:
index- the index of the struct buffer- Returns:
vertexCountat the given index
-
vertexCountAt
SetsvertexCountwith 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) ReturnsinstanceCountat the given index.- Parameters:
index- the index of the struct buffer- Returns:
instanceCountat the given index
-
instanceCountAt
SetsinstanceCountwith 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) ReturnsfirstVertexat the given index.- Parameters:
index- the index of the struct buffer- Returns:
firstVertexat the given index
-
firstVertexAt
SetsfirstVertexwith 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) ReturnsfirstInstanceat the given index.- Parameters:
index- the index of the struct buffer- Returns:
firstInstanceat the given index
-
firstInstanceAt
SetsfirstInstancewith the given value at the given index.- Parameters:
index- the index of the struct buffervalue- the value- Returns:
this
-