Class VkDrawIndirectCommand

java.lang.Object
overrungl.struct.GroupType
overrungl.vulkan.struct.VkDrawIndirectCommand
All Implemented Interfaces:
Addressable
Direct Known Subclasses:
VkDrawIndirectCommand.Buffer

public sealed class VkDrawIndirectCommand extends GroupType permits VkDrawIndirectCommand.Buffer

Layout

struct VkDrawIndirectCommand {
    uint32_t vertexCount;
    uint32_t instanceCount;
    uint32_t firstVertex;
    uint32_t firstInstance;
};
  • Field Details

    • LAYOUT

      public static final GroupLayout LAYOUT
      The struct layout of VkDrawIndirectCommand.
    • OFFSET_vertexCount

      public static final long OFFSET_vertexCount
      The byte offset of vertexCount.
    • LAYOUT_vertexCount

      public static final MemoryLayout LAYOUT_vertexCount
      The memory layout of vertexCount.
    • VH_vertexCount

      public static final VarHandle VH_vertexCount
      The VarHandle of vertexCount of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_instanceCount

      public static final long OFFSET_instanceCount
      The byte offset of instanceCount.
    • LAYOUT_instanceCount

      public static final MemoryLayout LAYOUT_instanceCount
      The memory layout of instanceCount.
    • VH_instanceCount

      public static final VarHandle VH_instanceCount
      The VarHandle of instanceCount of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_firstVertex

      public static final long OFFSET_firstVertex
      The byte offset of firstVertex.
    • LAYOUT_firstVertex

      public static final MemoryLayout LAYOUT_firstVertex
      The memory layout of firstVertex.
    • VH_firstVertex

      public static final VarHandle VH_firstVertex
      The VarHandle of firstVertex of type (MemorySegment base, long baseOffset, long index)MemorySegment.
    • OFFSET_firstInstance

      public static final long OFFSET_firstInstance
      The byte offset of firstInstance.
    • LAYOUT_firstInstance

      public static final MemoryLayout LAYOUT_firstInstance
      The memory layout of firstInstance.
    • VH_firstInstance

      public static final VarHandle VH_firstInstance
      The VarHandle of firstInstance of type (MemorySegment base, long baseOffset, long index)MemorySegment.
  • Constructor Details

    • VkDrawIndirectCommand

      public VkDrawIndirectCommand(MemorySegment segment)
      Creates VkDrawIndirectCommand with the given segment.
      Parameters:
      segment - the memory segment
  • Method Details

    • of

      public static VkDrawIndirectCommand.Buffer of(MemorySegment segment)
      Creates VkDrawIndirectCommand with the given segment.
      Parameters:
      segment - the memory segment
      Returns:
      the created instance or null if the segment is NULL
    • ofNative

      public static VkDrawIndirectCommand ofNative(MemorySegment segment)

      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 is NULL
    • ofNative

      public static VkDrawIndirectCommand.Buffer ofNative(MemorySegment segment, long count)

      Creates VkDrawIndirectCommand with the given segment.

      Reinterprets the segment if zero-length.

      Parameters:
      segment - the memory segment
      count - the count of the buffer
      Returns:
      the created instance or null if the segment is NULL
    • alloc

      public static VkDrawIndirectCommand alloc(SegmentAllocator allocator)
      Allocates a VkDrawIndirectCommand with the given segment allocator.
      Parameters:
      allocator - the segment allocator
      Returns:
      the allocated VkDrawIndirectCommand
    • alloc

      public static VkDrawIndirectCommand.Buffer alloc(SegmentAllocator allocator, long count)
      Allocates a VkDrawIndirectCommand with the given segment allocator and count.
      Parameters:
      allocator - the segment allocator
      count - the count
      Returns:
      the allocated VkDrawIndirectCommand
    • copyFrom

      Copies from the given source.
      Parameters:
      src - the source
      Returns:
      this
    • asBuffer

      public VkDrawIndirectCommand.Buffer asBuffer()
      Converts this instance to a buffer.
      Returns:
      the buffer
    • vertexCount

      public static int vertexCount(MemorySegment segment, long index)
      Returns vertexCount at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      vertexCount at the given index
    • vertexCount

      public int vertexCount()
      Returns vertexCount.
      Returns:
      vertexCount
    • vertexCount

      public static void vertexCount(MemorySegment segment, long index, int value)
      Sets vertexCount with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • vertexCount

      public VkDrawIndirectCommand vertexCount(int value)
      Sets vertexCount with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • instanceCount

      public static int instanceCount(MemorySegment segment, long index)
      Returns instanceCount at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      instanceCount at the given index
    • instanceCount

      public int instanceCount()
      Returns instanceCount.
      Returns:
      instanceCount
    • instanceCount

      public static void instanceCount(MemorySegment segment, long index, int value)
      Sets instanceCount with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • instanceCount

      public VkDrawIndirectCommand instanceCount(int value)
      Sets instanceCount with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • firstVertex

      public static int firstVertex(MemorySegment segment, long index)
      Returns firstVertex at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      firstVertex at the given index
    • firstVertex

      public int firstVertex()
      Returns firstVertex.
      Returns:
      firstVertex
    • firstVertex

      public static void firstVertex(MemorySegment segment, long index, int value)
      Sets firstVertex with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • firstVertex

      public VkDrawIndirectCommand firstVertex(int value)
      Sets firstVertex with the given value.
      Parameters:
      value - the value
      Returns:
      this
    • firstInstance

      public static int firstInstance(MemorySegment segment, long index)
      Returns firstInstance at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      Returns:
      firstInstance at the given index
    • firstInstance

      public int firstInstance()
      Returns firstInstance.
      Returns:
      firstInstance
    • firstInstance

      public static void firstInstance(MemorySegment segment, long index, int value)
      Sets firstInstance with the given value at the given index.
      Parameters:
      segment - the segment of the struct
      index - the index of the struct buffer
      value - the value
    • firstInstance

      public VkDrawIndirectCommand firstInstance(int value)
      Sets firstInstance with the given value.
      Parameters:
      value - the value
      Returns:
      this