pub struct GlDepthState { /* private fields */ }Expand description
The depth-test state of one draw.
WebGL splits “test” from “write” into two independent calls
(DEPTH_TEST plus depthFunc, and depthMask), whereas WebGPU’s
DepthStencilState derives both from depth_write_enabled plus the
presence of an attachment. Keeping the two axes separate here is what
lets a transparent overlay bind a depth buffer it must read but must
not write.
Implementations§
Source§impl GlDepthState
impl GlDepthState
pub fn get_enabled(&self) -> &bool
pub fn get_mut_enabled(&mut self) -> &mut bool
pub fn set_enabled(&mut self, val: bool) -> &mut Self
pub fn get_compare(&self) -> &CompareFunction
pub fn get_mut_compare(&mut self) -> &mut CompareFunction
pub fn set_compare(&mut self, val: CompareFunction) -> &mut Self
pub fn get_write_enabled(&self) -> &bool
pub fn get_mut_write_enabled(&mut self) -> &mut bool
pub fn set_write_enabled(&mut self, val: bool) -> &mut Self
Trait Implementations§
Source§impl Clone for GlDepthState
impl Clone for GlDepthState
impl Copy for GlDepthState
Source§impl Debug for GlDepthState
impl Debug for GlDepthState
Source§impl PartialEq for GlDepthState
impl PartialEq for GlDepthState
impl StructuralPartialEq for GlDepthState
Auto Trait Implementations§
impl Freeze for GlDepthState
impl RefUnwindSafe for GlDepthState
impl Send for GlDepthState
impl Sync for GlDepthState
impl Unpin for GlDepthState
impl UnsafeUnpin for GlDepthState
impl UnwindSafe for GlDepthState
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