Enum cogl::MaterialFilter[][src]

#[non_exhaustive]
pub enum MaterialFilter {
    Nearest,
    Linear,
    NearestMipmapNearest,
    LinearMipmapNearest,
    NearestMipmapLinear,
    LinearMipmapLinear,
    // some variants omitted
}

Texture filtering is used whenever the current pixel maps either to more than one texture element (texel) or less than one. These filter enums correspond to different strategies used to come up with a pixel color, by possibly referring to multiple neighbouring texels and taking a weighted average or simply using the nearest texel.

Variants (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.
Nearest

Measuring in manhatten distance from the, current pixel center, use the nearest texture texel

Linear

Use the weighted average of the 4 texels nearest the current pixel center

NearestMipmapNearest

Select the mimap level whose texel size most closely matches the current pixel, and use the MaterialFilter::Nearest criterion

LinearMipmapNearest

Select the mimap level whose texel size most closely matches the current pixel, and use the MaterialFilter::Linear criterion

NearestMipmapLinear

Select the two mimap levels whose texel size most closely matches the current pixel, use the MaterialFilter::Nearest criterion on each one and take their weighted average

LinearMipmapLinear

Select the two mimap levels whose texel size most closely matches the current pixel, use the MaterialFilter::Linear criterion on each one and take their weighted average

Trait Implementations

impl Clone for MaterialFilter[src]

impl Copy for MaterialFilter[src]

impl Debug for MaterialFilter[src]

impl Display for MaterialFilter[src]

impl Eq for MaterialFilter[src]

impl<'a> FromValue<'a> for MaterialFilter[src]

impl<'a> FromValueOptional<'a> for MaterialFilter[src]

impl Hash for MaterialFilter[src]

impl Ord for MaterialFilter[src]

impl PartialEq<MaterialFilter> for MaterialFilter[src]

impl PartialOrd<MaterialFilter> for MaterialFilter[src]

impl SetValue for MaterialFilter[src]

impl StaticType for MaterialFilter[src]

impl StructuralEq for MaterialFilter[src]

impl StructuralPartialEq for MaterialFilter[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<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T> ToSendValue for T where
    T: SetValue + Send + ToValue + ?Sized
[src]

impl<T> ToString for T where
    T: Display + ?Sized
[src]

impl<T> ToValue for T where
    T: SetValue + ?Sized
[src]

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.