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 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 AddressLayoutstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final ValueLayout.OfIntstatic final longstatic final longstatic final longstatic final longstatic final longstatic final longstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final MemoryLayout.PathElementstatic final longstatic final longstatic final longstatic final longstatic final longstatic final long -
Constructor Summary
ConstructorsConstructorDescriptionWGPUPrimitiveState(@NotNull MemorySegment segment) Creates an instance of aWGPUPrimitiveStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic WGPUPrimitiveStatestatic WGPUPrimitiveState.Ptrstatic WGPUPrimitiveStateclone(Arena arena, WGPUPrimitiveState src) intcullMode()cullMode(int value) final booleanIndicates whether some other object is "equal to" this one.intfrontFace(int value) final inthashCode()Returns a hash code value for this object.@Nullable WGPUChainedStructnextInChain(int assumedCount) nextInChain(@Nullable IWGPUChainedStruct value) @NotNull MemorySegmentvoidnextInChainRaw(@NotNull MemorySegment value) @NotNull MemorySegmentsegment()Returns the value of thesegmentrecord component.intstripIndexFormat(int value) inttopology()topology(int value) final StringtoString()Returns a string representation of this record class.intunclippedDepth(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 aWGPUPrimitiveStaterecord class.- Parameters:
segment- the value for thesegmentrecord 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 thesegmentrecord component.
-