[−][src]Struct web_glitz::image::sampler::Sampler
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]
Min: MinificationFilter + Copy + 'static,
Mag: MagnificationFilter + Copy + 'static,
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]
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]
Trait Implementations
impl<F, Min, Mag> CompatibleSampler<F> for Sampler<Min, Mag> where
Min: CompatibleFilter<F> + MinificationFilter,
Mag: CompatibleFilter<F> + MagnificationFilter,
F: TextureFormat, [src]
Min: CompatibleFilter<F> + MinificationFilter,
Mag: CompatibleFilter<F> + MagnificationFilter,
F: TextureFormat,
impl<Min, Mag> Hash for Sampler<Min, Mag>[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<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,
Mag: Unpin,
Min: Unpin,
impl<Min, Mag> !UnwindSafe for Sampler<Min, Mag>
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,
pub 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,
pub fn into_buffer<Rc>(Self, &Rc, BufferId, UsageHint) -> Buffer<T> where
Rc: RenderingContext + Clone + 'static, [src]
Rc: RenderingContext + Clone + 'static,
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.
pub 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>,