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.

  • Field Details

    • LAYOUT

      public static final StructLayout LAYOUT
    • BYTES

      public static final long BYTES
    • PATH$nextInChain

      public static final MemoryLayout.PathElement PATH$nextInChain
    • PATH$topology

      public static final MemoryLayout.PathElement PATH$topology
    • PATH$stripIndexFormat

      public static final MemoryLayout.PathElement PATH$stripIndexFormat
    • PATH$frontFace

      public static final MemoryLayout.PathElement PATH$frontFace
    • PATH$cullMode

      public static final MemoryLayout.PathElement PATH$cullMode
    • PATH$unclippedDepth

      public static final MemoryLayout.PathElement PATH$unclippedDepth
    • LAYOUT$nextInChain

      public static final AddressLayout LAYOUT$nextInChain
    • LAYOUT$topology

      public static final ValueLayout.OfInt LAYOUT$topology
    • LAYOUT$stripIndexFormat

      public static final ValueLayout.OfInt LAYOUT$stripIndexFormat
    • LAYOUT$frontFace

      public static final ValueLayout.OfInt LAYOUT$frontFace
    • LAYOUT$cullMode

      public static final ValueLayout.OfInt LAYOUT$cullMode
    • LAYOUT$unclippedDepth

      public static final ValueLayout.OfInt 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

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