[][src]Struct web_glitz::image::sampler::Sampler

pub struct Sampler<Min, Mag> { /* fields omitted */ }

Samples texture values given texture coordinates texture coordinates.

A Sampler attempts to obtain texture values by mapping texture coordinates onto texels (texture pixels). However, a set of texture coordinates rarely corresponds to exactly 1 texel unambiguously. Instead there are often several candidate texels. The Sampler performs texture filtering and texture wrapping in order to obtain the most appropriate texture value.

See the documentation for RenderingContext::create_sampler for details on how to create a Sampler.

Implementations

impl<Min, Mag> Sampler<Min, Mag> where
    Min: MinificationFilter + Copy + 'static,
    Mag: MagnificationFilter + Copy + 'static, 
[src]

pub fn minification_filter(&self) -> Min[src]

The MinificationFilter used by this Sampler.

See MinificationFilter for details.

pub fn magnification_filter(&self) -> Mag[src]

The MagnificationFilter used by this Sampler.

See MagnificationFilter for details.

pub fn lod_range(&self) -> LODRange[src]

The LODRange used by this Sampler.

See LODRange for details.

pub fn wrap_s(&self) -> Wrap[src]

The wrapping method that this Sampler uses 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.

pub fn wrap_t(&self) -> Wrap[src]

The wrapping method that this Sampler uses 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.

pub fn wrap_r(&self) -> Wrap[src]

The wrapping method that this Sampler uses 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<F, Min, Mag> CompatibleSampler<F> for Sampler<Min, Mag> where
    Min: CompatibleFilter<F> + MinificationFilter,
    Mag: CompatibleFilter<F> + MagnificationFilter,
    F: TextureFormat
[src]

type Min = Min

type Mag = Mag

impl<Min, Mag> Hash for Sampler<Min, Mag>[src]

impl<Min, Mag> PartialEq<Sampler<Min, Mag>> for Sampler<Min, Mag>[src]

Auto Trait Implementations

impl<Min, Mag> !RefUnwindSafe for Sampler<Min, Mag>

impl<Min, Mag> !Send for Sampler<Min, Mag>

impl<Min, Mag> !Sync for Sampler<Min, Mag>

impl<Min, Mag> Unpin for Sampler<Min, Mag> where
    Mag: Unpin,
    Min: Unpin

impl<Min, Mag> !UnwindSafe for Sampler<Min, Mag>

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, 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.