#[repr(C)]pub struct SDL_GPURasterizerState {
pub fill_mode: SDL_GPUFillMode,
pub cull_mode: SDL_GPUCullMode,
pub front_face: SDL_GPUFrontFace,
pub depth_bias_constant_factor: c_float,
pub depth_bias_clamp: c_float,
pub depth_bias_slope_factor: c_float,
pub enable_depth_bias: bool,
pub enable_depth_clip: bool,
pub padding1: Uint8,
pub padding2: Uint8,
}Expand description
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.
§Availability
This struct is available since SDL 3.2.0.
§See also
§Notes for sdl3-sys
This struct has padding fields which shouldn’t be accessed directly; use struct update syntax with e.g. ..Default::default() for manual construction.
Fields§
§fill_mode: SDL_GPUFillModeWhether polygons will be filled in or drawn as lines.
cull_mode: SDL_GPUCullModeThe facing direction in which triangles will be culled.
front_face: SDL_GPUFrontFaceThe vertex winding that will cause a triangle to be determined as front-facing.
depth_bias_constant_factor: c_floatA scalar factor controlling the depth value added to each fragment.
depth_bias_clamp: c_floatThe maximum depth bias of a fragment.
depth_bias_slope_factor: c_floatA scalar factor applied to a fragment’s slope in depth calculations.
enable_depth_bias: booltrue to bias fragment depth values.
enable_depth_clip: booltrue to enable depth clip, false to enable depth clamp.
padding1: Uint8..Default::default()padding2: Uint8..Default::default()Trait Implementations§
Source§impl Clone for SDL_GPURasterizerState
impl Clone for SDL_GPURasterizerState
Source§fn clone(&self) -> SDL_GPURasterizerState
fn clone(&self) -> SDL_GPURasterizerState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more