[][src]Struct web_glitz::sampler::SamplerDescriptor

pub struct SamplerDescriptor {
    pub minification_filter: MinificationFilter,
    pub magnification_filter: MagnificationFilter,
    pub lod_range: LODRange,
    pub wrap_s: Wrap,
    pub wrap_t: Wrap,
    pub wrap_r: Wrap,
}

Provides the information necessary for the creation of a Sampler.

See RenderingContext::create_sampler for details.

Can be instantiated with default values through Default:

use web_glitz::sampler::{
    SamplerDescriptor, MinificationFilter, MagnificationFilter, LODRange, Wrap
};

assert_eq!(SamplerDescriptor::default(), SamplerDescriptor {
    minification_filter: MinificationFilter::NearestMipmapLinear,
    magnification_filter: MagnificationFilter::Linear,
    lod_range: LODRange::default(),
    wrap_s: Wrap::Repeat,
    wrap_t: Wrap::Repeat,
    wrap_r: Wrap::Repeat,
});

Fields

minification_filter: MinificationFilter

The MinificationFilter that a sampler created from this descriptor will use.

See MinificationFilter for details.

magnification_filter: MagnificationFilter

The MagnificationFilter that a sampler created from this descriptor will use.

See MagnificationFilter for details.

lod_range: LODRange

The LODRange that a sampler created from this descriptor will use.

See LODRange for details.

wrap_s: Wrap

The wrapping method that a sampler created from this descriptor will use when sampling a value at coordinates outside the range 0.0..=1.0 in the S ("width") direction in texture space.

See Wrap for details.

wrap_t: Wrap

The wrapping method that a sampler created from this descriptor will use when sampling a value at coordinates outside the range 0.0..=1.0 in the T ("height") direction in texture space.

See Wrap for details.

wrap_r: Wrap

The wrapping algorithm that a sampler created from this descriptor will use when sampling a value at coordinates outside the range 0.0..=1.0 in the R ("depth") direction in texture space.

See Wrap for details.

Trait Implementations

impl Default for SamplerDescriptor[src]

impl Clone for SamplerDescriptor[src]

impl PartialEq<SamplerDescriptor> for SamplerDescriptor[src]

impl Debug for SamplerDescriptor[src]

Auto Trait Implementations

Blanket Implementations

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> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[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.

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

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

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