pub struct DepthStencilState {
pub format: GpuTextureFormat,
pub depth_write_enabled: bool,
pub depth_compare: CompareFunction,
}Expand description
The pipeline’s depth-stencil state: whether depth is written, and the test fragments must pass.
Fields§
§format: GpuTextureFormatThe format of the pipeline’s depth-stencil attachment. It must match the attachment’s own format.
depth_write_enabled: boolWhether a fragment that passes the test updates the depth buffer.
false is correct for a pipeline that only reads depth, such as a
transparent overlay drawn after the opaque pass.
depth_compare: CompareFunctionThe comparison performed between the fragment’s depth and the stored depth.
Implementations§
Source§impl DepthStencilState
Named constructors for the pipeline state structs.
impl DepthStencilState
Named constructors for the pipeline state structs.
Sourcepub fn writing_depth(format: GpuTextureFormat) -> Self
pub fn writing_depth(format: GpuTextureFormat) -> Self
Source§impl DepthStencilState
impl DepthStencilState
pub fn get_format(&self) -> GpuTextureFormat
pub fn get_depth_write_enabled(&self) -> bool
pub fn get_depth_compare(&self) -> CompareFunction
Trait Implementations§
Source§impl Clone for DepthStencilState
impl Clone for DepthStencilState
impl Copy for DepthStencilState
Source§impl Debug for DepthStencilState
impl Debug for DepthStencilState
Auto Trait Implementations§
impl Freeze for DepthStencilState
impl RefUnwindSafe for DepthStencilState
impl Send for DepthStencilState
impl Sync for DepthStencilState
impl Unpin for DepthStencilState
impl UnsafeUnpin for DepthStencilState
impl UnwindSafe for DepthStencilState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more