Record Class SDL_GPUVertexBufferDescription

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_GPUVertexBufferDescription
All Implemented Interfaces:
IPointer, ISDL_GPUVertexBufferDescription

@ValueBasedCandidate @UnsafeConstructor public record SDL_GPUVertexBufferDescription(@NotNull MemorySegment segment) extends Record implements ISDL_GPUVertexBufferDescription

A structure specifying the parameters of vertex buffers used in a graphics pipeline.

When you call SDL_BindGPUVertexBuffers, you specify the binding slots of the vertex buffers. For example if you called SDL_BindGPUVertexBuffers with a first_slot of 2 and num_bindings of 3, the binding slots 2, 3, 4 would be used by the vertex buffers you pass in.

Vertex attributes are linked to buffers via the buffer_slot field of SDL_GPUVertexAttribute. For example, if an attribute has a buffer_slot of 0, then that attribute belongs to the vertex buffer bound at slot 0.

Since: This struct is available since SDL 3.2.0.

See also:

  • SDL_GPUVertexAttribute
  • SDL_GPUVertexInputRate

Structure

typedef struct SDL_GPUVertexBufferDescription {
    Uint32 slot;
    Uint32 pitch;
    SDL_GPUVertexInputRate input_rate;
    Uint32 instance_step_rate;
} SDL_GPUVertexBufferDescription;

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.