#[non_exhaustive]
#[repr(u32)]
pub enum CullMode {
None,
Front,
Back,
FrontAndBack,
}
Expand description
Specifies the culling mode.
This setting works in pair with front_face
. The front_face
setting tells the GPU whether
clockwise or counter-clockwise correspond to the front and the back of each triangle. Then
cull_mode
lets you specify whether front faces should be discarded, back faces should be
discarded, or none, or both.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
None
No culling.
Front
The faces facing the front of the screen (ie. facing the user) will be removed.
Back
The faces facing the back of the screen will be removed.
FrontAndBack
All faces will be removed.
Trait Implementations
sourceimpl From<CullMode> for CullModeFlags
impl From<CullMode> for CullModeFlags
sourceimpl TryFrom<CullModeFlags> for CullMode
impl TryFrom<CullModeFlags> for CullMode
impl Copy for CullMode
impl Eq for CullMode
impl StructuralEq for CullMode
impl StructuralPartialEq for CullMode
Auto Trait Implementations
impl RefUnwindSafe for CullMode
impl Send for CullMode
impl Sync for CullMode
impl Unpin for CullMode
impl UnwindSafe for CullMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more