Record Class WGPUVertexBufferLayout

java.lang.Object
java.lang.Record
club.doki7.webgpu.datatype.WGPUVertexBufferLayout
All Implemented Interfaces:
IPointer, IWGPUVertexBufferLayout

@ValueBasedCandidate @UnsafeConstructor public record WGPUVertexBufferLayout(@NotNull MemorySegment segment) extends Record implements IWGPUVertexBufferLayout

Represents a pointer to a WGPUVertexBufferLayout structure in native memory.

Structure

typedef struct WGPUVertexBufferLayout {
    WGPUVertexStepMode stepMode;
    uint64_t arrayStride;
    size_t attributeCount;
    WGPUVertexAttribute const* attributes;
} WGPUVertexBufferLayout;

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$stepMode

      public static final MemoryLayout.PathElement PATH$stepMode
    • PATH$arrayStride

      public static final MemoryLayout.PathElement PATH$arrayStride
    • PATH$attributeCount

      public static final MemoryLayout.PathElement PATH$attributeCount
    • PATH$attributes

      public static final MemoryLayout.PathElement PATH$attributes
    • LAYOUT$stepMode

      public static final ValueLayout.OfInt LAYOUT$stepMode
    • LAYOUT$arrayStride

      public static final ValueLayout.OfLong LAYOUT$arrayStride
    • LAYOUT$attributes

      public static final AddressLayout LAYOUT$attributes
    • SIZE$stepMode

      public static final long SIZE$stepMode
    • SIZE$arrayStride

      public static final long SIZE$arrayStride
    • SIZE$attributeCount

      public static final long SIZE$attributeCount
    • SIZE$attributes

      public static final long SIZE$attributes
    • OFFSET$stepMode

      public static final long OFFSET$stepMode
    • OFFSET$arrayStride

      public static final long OFFSET$arrayStride
    • OFFSET$attributeCount

      public static final long OFFSET$attributeCount
    • OFFSET$attributes

      public static final long OFFSET$attributes
  • Constructor Details

    • WGPUVertexBufferLayout

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