Record Class SDL_GPUIndexedIndirectDrawCommand

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_GPUIndexedIndirectDrawCommand
All Implemented Interfaces:
IPointer, ISDL_GPUIndexedIndirectDrawCommand

@ValueBasedCandidate @UnsafeConstructor public record SDL_GPUIndexedIndirectDrawCommand(@NotNull MemorySegment segment) extends Record implements ISDL_GPUIndexedIndirectDrawCommand

A structure specifying the parameters of an indexed indirect draw command.

Note that the first_vertex and first_instance parameters are NOT compatible with built-in vertex/instance ID variables in shaders (for example, SV_VertexID); GPU APIs and shader languages do not define these built-in variables consistently, so if your shader depends on them, the only way to keep behavior consistent and portable is to always pass 0 for the correlating parameter in the draw calls.

Since: This struct is available since SDL 3.2.0.

See also:

  • SDL_DrawGPUIndexedPrimitivesIndirect

Structure

typedef struct SDL_GPUIndexedIndirectDrawCommand {
    Uint32 num_indices;
    Uint32 num_instances;
    Uint32 first_index;
    Sint32 vertex_offset;
    Uint32 first_instance;
} SDL_GPUIndexedIndirectDrawCommand;

Contracts

The property segment() should always be not-null (segment != NULL && !segment.equals(MemorySegment.NULL)), and properly aligned to LAYOUT.byteAlignment() bytes. To represent null pointer, you may use a Java null instead. See the documentation of IPointer.segment() for more details.

The constructor of this class is marked as UnsafeConstructor, because it does not perform any runtime check. The constructor can be useful for automatic code generators.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$num_indices

      public static final MemoryLayout.PathElement PATH$num_indices
    • PATH$num_instances

      public static final MemoryLayout.PathElement PATH$num_instances
    • PATH$first_index

      public static final MemoryLayout.PathElement PATH$first_index
    • PATH$vertex_offset

      public static final MemoryLayout.PathElement PATH$vertex_offset
    • PATH$first_instance

      public static final MemoryLayout.PathElement PATH$first_instance
    • LAYOUT$num_indices

      public static final ValueLayout.OfInt LAYOUT$num_indices
    • LAYOUT$num_instances

      public static final ValueLayout.OfInt LAYOUT$num_instances
    • LAYOUT$first_index

      public static final ValueLayout.OfInt LAYOUT$first_index
    • LAYOUT$vertex_offset

      public static final ValueLayout.OfInt LAYOUT$vertex_offset
    • LAYOUT$first_instance

      public static final ValueLayout.OfInt LAYOUT$first_instance
    • SIZE$num_indices

      public static final long SIZE$num_indices
    • SIZE$num_instances

      public static final long SIZE$num_instances
    • SIZE$first_index

      public static final long SIZE$first_index
    • SIZE$vertex_offset

      public static final long SIZE$vertex_offset
    • SIZE$first_instance

      public static final long SIZE$first_instance
    • OFFSET$num_indices

      public static final long OFFSET$num_indices
    • OFFSET$num_instances

      public static final long OFFSET$num_instances
    • OFFSET$first_index

      public static final long OFFSET$first_index
    • OFFSET$vertex_offset

      public static final long OFFSET$vertex_offset
    • OFFSET$first_instance

      public static final long OFFSET$first_instance
  • Constructor Details

    • SDL_GPUIndexedIndirectDrawCommand

      public SDL_GPUIndexedIndirectDrawCommand(@NotNull @NotNull MemorySegment segment)
      Creates an instance of a SDL_GPUIndexedIndirectDrawCommand record class.
      Parameters:
      segment - the value for the segment record component
  • Method Details