SDL 3.0
SDL_GPURasterizerState Struct Reference

#include <SDL_gpu.h>

Data Fields

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
 

Detailed 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.

Since
This struct is available since SDL 3.2.0.
See also
SDL_GPUGraphicsPipelineCreateInfo

Definition at line 1736 of file SDL_gpu.h.

Field Documentation

◆ cull_mode

SDL_GPUCullMode SDL_GPURasterizerState::cull_mode

The facing direction in which triangles will be culled.

Definition at line 1739 of file SDL_gpu.h.

◆ depth_bias_clamp

float SDL_GPURasterizerState::depth_bias_clamp

The maximum depth bias of a fragment.

Definition at line 1742 of file SDL_gpu.h.

◆ depth_bias_constant_factor

float SDL_GPURasterizerState::depth_bias_constant_factor

A scalar factor controlling the depth value added to each fragment.

Definition at line 1741 of file SDL_gpu.h.

◆ depth_bias_slope_factor

float SDL_GPURasterizerState::depth_bias_slope_factor

A scalar factor applied to a fragment's slope in depth calculations.

Definition at line 1743 of file SDL_gpu.h.

◆ enable_depth_bias

bool SDL_GPURasterizerState::enable_depth_bias

true to bias fragment depth values.

Definition at line 1744 of file SDL_gpu.h.

◆ enable_depth_clip

bool SDL_GPURasterizerState::enable_depth_clip

true to enable depth clip, false to enable depth clamp.

Definition at line 1745 of file SDL_gpu.h.

◆ fill_mode

SDL_GPUFillMode SDL_GPURasterizerState::fill_mode

Whether polygons will be filled in or drawn as lines.

Definition at line 1738 of file SDL_gpu.h.

◆ front_face

SDL_GPUFrontFace SDL_GPURasterizerState::front_face

The vertex winding that will cause a triangle to be determined as front-facing.

Definition at line 1740 of file SDL_gpu.h.

◆ padding1

Uint8 SDL_GPURasterizerState::padding1

Definition at line 1746 of file SDL_gpu.h.

◆ padding2

Uint8 SDL_GPURasterizerState::padding2

Definition at line 1747 of file SDL_gpu.h.


The documentation for this struct was generated from the following file: