Record Class SDL_GPUIndirectDrawCommand
- All Implemented Interfaces:
IPointer
,ISDL_GPUIndirectDrawCommand
A structure specifying the parameters of an 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_DrawGPUPrimitivesIndirect
Structure
typedef struct SDL_GPUIndirectDrawCommand {
Uint32 num_vertices
;
Uint32 num_instances
;
Uint32 first_vertex
;
Uint32 first_instance
;
} SDL_GPUIndirectDrawCommand;
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final record
Represents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final long
static final StructLayout
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final ValueLayout.OfInt
static final long
static final long
static final long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
static final long
static final long
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUIndirectDrawCommand
(@NotNull MemorySegment segment) Creates an instance of aSDL_GPUIndirectDrawCommand
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUIndirectDrawCommand
static SDL_GPUIndirectDrawCommand
clone
(Arena arena, SDL_GPUIndirectDrawCommand src) final boolean
Indicates whether some other object is "equal to" this one.int
first_instance
(int value) int
first_vertex
(int value) final int
hashCode()
Returns a hash code value for this object.int
num_instances
(int value) int
num_vertices
(int value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$num_vertices
-
PATH$num_instances
-
PATH$first_vertex
-
PATH$first_instance
-
LAYOUT$num_vertices
-
LAYOUT$num_instances
-
LAYOUT$first_vertex
-
LAYOUT$first_instance
-
SIZE$num_vertices
public static final long SIZE$num_vertices -
SIZE$num_instances
public static final long SIZE$num_instances -
SIZE$first_vertex
public static final long SIZE$first_vertex -
SIZE$first_instance
public static final long SIZE$first_instance -
OFFSET$num_vertices
public static final long OFFSET$num_vertices -
OFFSET$num_instances
public static final long OFFSET$num_instances -
OFFSET$first_vertex
public static final long OFFSET$first_vertex -
OFFSET$first_instance
public static final long OFFSET$first_instance
-
-
Constructor Details
-
SDL_GPUIndirectDrawCommand
Creates an instance of aSDL_GPUIndirectDrawCommand
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
num_vertices
-
num_vertices
-
num_instances
-
num_instances
-
first_vertex
-
first_vertex
-
first_instance
-
first_instance
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
segment
Returns the value of thesegment
record component.
-