Record Class WGPUPrimitiveState
java.lang.Object
java.lang.Record
club.doki7.webgpu.datatype.WGPUPrimitiveState
- All Implemented Interfaces:
IPointer
,IWGPUPrimitiveState
@ValueBasedCandidate
@UnsafeConstructor
public record WGPUPrimitiveState(@NotNull MemorySegment segment)
extends Record
implements IWGPUPrimitiveState
Represents a pointer to a WGPUPrimitiveState
structure in native memory.
Structure
typedef struct WGPUPrimitiveState {
WGPUChainedStruct
const* nextInChain
; // optional
WGPUPrimitiveTopology
topology
;
WGPUIndexFormat
stripIndexFormat
;
WGPUFrontFace
frontFace
;
WGPUCullMode
cullMode
;
WGPUBool unclippedDepth
;
} WGPUPrimitiveState;
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 AddressLayout
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 long
static final long
static final MemoryLayout.PathElement
static final MemoryLayout.PathElement
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
static final long
static final long
-
Constructor Summary
ConstructorsConstructorDescriptionWGPUPrimitiveState
(@NotNull MemorySegment segment) Creates an instance of aWGPUPrimitiveState
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUPrimitiveState
static WGPUPrimitiveState.Ptr
static WGPUPrimitiveState
clone
(Arena arena, WGPUPrimitiveState src) int
cullMode()
cullMode
(int value) final boolean
Indicates whether some other object is "equal to" this one.int
frontFace
(int value) final int
hashCode()
Returns a hash code value for this object.@Nullable WGPUChainedStruct
nextInChain
(int assumedCount) nextInChain
(@Nullable IWGPUChainedStruct value) @NotNull MemorySegment
void
nextInChainRaw
(@NotNull MemorySegment value) @NotNull MemorySegment
segment()
Returns the value of thesegment
record component.int
stripIndexFormat
(int value) int
topology()
topology
(int value) final String
toString()
Returns a string representation of this record class.int
unclippedDepth
(int value)
-
Field Details
-
LAYOUT
-
BYTES
public static final long BYTES -
PATH$nextInChain
-
PATH$topology
-
PATH$stripIndexFormat
-
PATH$frontFace
-
PATH$cullMode
-
PATH$unclippedDepth
-
LAYOUT$nextInChain
-
LAYOUT$topology
-
LAYOUT$stripIndexFormat
-
LAYOUT$frontFace
-
LAYOUT$cullMode
-
LAYOUT$unclippedDepth
-
SIZE$nextInChain
public static final long SIZE$nextInChain -
SIZE$topology
public static final long SIZE$topology -
SIZE$stripIndexFormat
public static final long SIZE$stripIndexFormat -
SIZE$frontFace
public static final long SIZE$frontFace -
SIZE$cullMode
public static final long SIZE$cullMode -
SIZE$unclippedDepth
public static final long SIZE$unclippedDepth -
OFFSET$nextInChain
public static final long OFFSET$nextInChain -
OFFSET$topology
public static final long OFFSET$topology -
OFFSET$stripIndexFormat
public static final long OFFSET$stripIndexFormat -
OFFSET$frontFace
public static final long OFFSET$frontFace -
OFFSET$cullMode
public static final long OFFSET$cullMode -
OFFSET$unclippedDepth
public static final long OFFSET$unclippedDepth
-
-
Constructor Details
-
WGPUPrimitiveState
Creates an instance of aWGPUPrimitiveState
record class.- Parameters:
segment
- the value for thesegment
record component
-
-
Method Details
-
allocate
-
allocate
-
clone
-
nextInChain
-
nextInChain
-
nextInChain
-
nextInChainRaw
-
nextInChainRaw
public void nextInChainRaw(@Pointer(target=WGPUChainedStruct.class) @NotNull @NotNull MemorySegment value) -
topology
-
topology
-
stripIndexFormat
-
stripIndexFormat
-
frontFace
-
frontFace
-
cullMode
-
cullMode
-
unclippedDepth
-
unclippedDepth
-
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.
-