[−][src]Enum web_glitz::pipeline::graphics::CullingMode
Enumerates the face-culling modes that may be used by a [Rasterizer].
A triangle is considered to have 2 sides or 'faces': a front-face and a back-face. Which face is considered to be the front-face and which face is considered to be the back-face, is determined by the WindingOrder (see the documentation for WindingOrder for details).
Triangles may be discarded based on their facing in a process known as face-culling. A triangle is considered front-facing if it is oriented such that the front-face is facing the 'camera'. A triangle is considered back-facing if it is oriented such that the back-face is facing the camera.
There are 4 possible culling modes:
- CullingMode::None: no faces will be culled, regardless or their facing.
- CullingMode::Both: all triangles will be culled, regardless of their facing.
- CullingMode::Front: front-facing triangles will be culled.
- CullingMode::Back: back-facing triangles will be culled.
Face culling is an optimization typically used when rendering closed surfaces. It allows the rasterizer to discard triangles that would not have been visible anyway, before the expensive rasterization and fragment shader operations are performed.
Variants
Trait Implementations
impl Clone for CullingMode[src]
fn clone(&self) -> CullingMode[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for CullingMode[src]
impl Debug for CullingMode[src]
impl Hash for CullingMode[src]
fn hash<__H: Hasher>(&self, state: &mut __H)[src]
fn hash_slice<H>(data: &[Self], state: &mut H) where
H: Hasher, 1.3.0[src]
H: Hasher,
impl PartialEq<CullingMode> for CullingMode[src]
fn eq(&self, other: &CullingMode) -> bool[src]
#[must_use]fn ne(&self, other: &Rhs) -> bool1.0.0[src]
impl StructuralPartialEq for CullingMode[src]
Auto Trait Implementations
impl RefUnwindSafe for CullingMode
impl Send for CullingMode
impl Sync for CullingMode
impl Unpin for CullingMode
impl UnwindSafe for CullingMode
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> From<T> for T[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<D, T> IntoBuffer<T> for D where
D: Borrow<T> + 'static,
T: Copy + 'static, [src]
D: Borrow<T> + 'static,
T: Copy + 'static,
fn into_buffer<Rc>(Self, &Rc, BufferId, UsageHint) -> Buffer<T> where
Rc: RenderingContext + Clone + 'static, [src]
Rc: RenderingContext + Clone + 'static,
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,