[][src]Enum web_glitz::pipeline::graphics::CullingMode

pub enum CullingMode {
    None,
    Front,
    Back,
    Both,
}

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:

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

None
Front
Back
Both

Trait Implementations

impl Clone for CullingMode[src]

impl Copy for CullingMode[src]

impl Debug for CullingMode[src]

impl Hash for CullingMode[src]

impl PartialEq<CullingMode> for CullingMode[src]

impl StructuralPartialEq for CullingMode[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<D, T> IntoBuffer<T> for D where
    D: Borrow<T> + 'static,
    T: Copy + 'static, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.