Record Class SDL_GPURasterizerState

java.lang.Object
java.lang.Record
club.doki7.sdl3.datatype.SDL_GPURasterizerState
All Implemented Interfaces:
IPointer, ISDL_GPURasterizerState

@ValueBasedCandidate @UnsafeConstructor public record SDL_GPURasterizerState(@NotNull MemorySegment segment) extends Record implements ISDL_GPURasterizerState

A structure specifying the parameters of the graphics pipeline rasterizer state.

Note that SDL_GPU_FILLMODE_LINE is not supported on many Android devices. For those devices, the fill mode will automatically fall back to FILL.

Also note that the D3D12 driver will enable depth clamping even if enable_depth_clip is true. If you need this clamp+clip behavior, consider enabling depth clip and then manually clamping depth in your fragment shaders on Metal and Vulkan.

Since: This struct is available since SDL 3.2.0.

See also:

  • SDL_GPUGraphicsPipelineCreateInfo

Structure

typedef struct SDL_GPURasterizerState {
    SDL_GPUFillMode fill_mode;
    SDL_GPUCullMode cull_mode;
    SDL_GPUFrontFace front_face;
    float depth_bias_constant_factor;
    float depth_bias_clamp;
    float depth_bias_slope_factor;
    bool enable_depth_bias;
    bool enable_depth_clip;
    Uint8 padding1;
    Uint8 padding2;
} SDL_GPURasterizerState;

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

      public static final MemoryLayout.PathElement PATH$fill_mode
    • PATH$cull_mode

      public static final MemoryLayout.PathElement PATH$cull_mode
    • PATH$front_face

      public static final MemoryLayout.PathElement PATH$front_face
    • PATH$depth_bias_constant_factor

      public static final MemoryLayout.PathElement PATH$depth_bias_constant_factor
    • PATH$depth_bias_clamp

      public static final MemoryLayout.PathElement PATH$depth_bias_clamp
    • PATH$depth_bias_slope_factor

      public static final MemoryLayout.PathElement PATH$depth_bias_slope_factor
    • PATH$enable_depth_bias

      public static final MemoryLayout.PathElement PATH$enable_depth_bias
    • PATH$enable_depth_clip

      public static final MemoryLayout.PathElement PATH$enable_depth_clip
    • PATH$padding1

      public static final MemoryLayout.PathElement PATH$padding1
    • PATH$padding2

      public static final MemoryLayout.PathElement PATH$padding2
    • LAYOUT$fill_mode

      public static final ValueLayout.OfInt LAYOUT$fill_mode
    • LAYOUT$cull_mode

      public static final ValueLayout.OfInt LAYOUT$cull_mode
    • LAYOUT$front_face

      public static final ValueLayout.OfInt LAYOUT$front_face
    • LAYOUT$depth_bias_constant_factor

      public static final ValueLayout.OfFloat LAYOUT$depth_bias_constant_factor
    • LAYOUT$depth_bias_clamp

      public static final ValueLayout.OfFloat LAYOUT$depth_bias_clamp
    • LAYOUT$depth_bias_slope_factor

      public static final ValueLayout.OfFloat LAYOUT$depth_bias_slope_factor
    • LAYOUT$enable_depth_bias

      public static final ValueLayout.OfBoolean LAYOUT$enable_depth_bias
    • LAYOUT$enable_depth_clip

      public static final ValueLayout.OfBoolean LAYOUT$enable_depth_clip
    • LAYOUT$padding1

      public static final ValueLayout.OfByte LAYOUT$padding1
    • LAYOUT$padding2

      public static final ValueLayout.OfByte LAYOUT$padding2
    • SIZE$fill_mode

      public static final long SIZE$fill_mode
    • SIZE$cull_mode

      public static final long SIZE$cull_mode
    • SIZE$front_face

      public static final long SIZE$front_face
    • SIZE$depth_bias_constant_factor

      public static final long SIZE$depth_bias_constant_factor
    • SIZE$depth_bias_clamp

      public static final long SIZE$depth_bias_clamp
    • SIZE$depth_bias_slope_factor

      public static final long SIZE$depth_bias_slope_factor
    • SIZE$enable_depth_bias

      public static final long SIZE$enable_depth_bias
    • SIZE$enable_depth_clip

      public static final long SIZE$enable_depth_clip
    • SIZE$padding1

      public static final long SIZE$padding1
    • SIZE$padding2

      public static final long SIZE$padding2
    • OFFSET$fill_mode

      public static final long OFFSET$fill_mode
    • OFFSET$cull_mode

      public static final long OFFSET$cull_mode
    • OFFSET$front_face

      public static final long OFFSET$front_face
    • OFFSET$depth_bias_constant_factor

      public static final long OFFSET$depth_bias_constant_factor
    • OFFSET$depth_bias_clamp

      public static final long OFFSET$depth_bias_clamp
    • OFFSET$depth_bias_slope_factor

      public static final long OFFSET$depth_bias_slope_factor
    • OFFSET$enable_depth_bias

      public static final long OFFSET$enable_depth_bias
    • OFFSET$enable_depth_clip

      public static final long OFFSET$enable_depth_clip
    • OFFSET$padding1

      public static final long OFFSET$padding1
    • OFFSET$padding2

      public static final long OFFSET$padding2
  • Constructor Details

    • SDL_GPURasterizerState

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