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 recordRepresents a pointer to / an array of null structure(s) in native memory. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final longstatic final StructLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionSDL_GPUIndirectDrawCommand(@NotNull MemorySegment segment) Creates an instance of aSDL_GPUIndirectDrawCommandrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SDL_GPUIndirectDrawCommandstatic SDL_GPUIndirectDrawCommandclone(Arena arena, SDL_GPUIndirectDrawCommand src) final booleanIndicates whether some other object is "equal to" this one.intfirst_instance(int value) intfirst_vertex(int value) final inthashCode()Returns a hash code value for this object.intnum_instances(int value) intnum_vertices(int value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.final StringtoString()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_GPUIndirectDrawCommandrecord class.- Parameters:
segment- the value for thesegmentrecord 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 thesegmentrecord component.
-