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: Some backend APIs (D3D11/12) will enable depth clamping even if enable_depth_clip is true. If you rely on 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.1.3
See also
SDL_GPUGraphicsPipelineCreateInfo

Definition at line 1707 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 1710 of file SDL_gpu.h.

◆ depth_bias_clamp

float SDL_GPURasterizerState::depth_bias_clamp

The maximum depth bias of a fragment.

Definition at line 1713 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 1712 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 1714 of file SDL_gpu.h.

◆ enable_depth_bias

bool SDL_GPURasterizerState::enable_depth_bias

true to bias fragment depth values.

Definition at line 1715 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 1716 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 1709 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 1711 of file SDL_gpu.h.

◆ padding1

Uint8 SDL_GPURasterizerState::padding1

Definition at line 1717 of file SDL_gpu.h.

◆ padding2

Uint8 SDL_GPURasterizerState::padding2

Definition at line 1718 of file SDL_gpu.h.


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