#[non_exhaustive]
pub enum MaterialWrapMode {
Repeat,
ClampToEdge,
Automatic,
}
Expand description
Material texture wrap mode
The wrap mode specifies what happens when texture coordinates
outside the range 0→1 are used. Note that if the filter mode is
anything but MaterialFilter::Nearest
then texels outside the
range 0→1 might be used even when the coordinate is exactly 0 or 1
because OpenGL will try to sample neighbouring pixels. For example
if you are trying to render the full texture then you may get
artifacts around the edges when the pixels from the other side are
merged in if the wrap mode is set to repeat.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Repeat
The texture will be repeated. This is useful for example to draw a tiled background.
ClampToEdge
The coordinates outside the range 0→1 will sample copies of the edge pixels of the texture. This is useful to avoid artifacts if only one copy of the texture is being rendered.
Automatic
will try to automatically
decide which of the above two to use. For rectangle
, it
will use repeat mode if any of the texture coordinates are
outside the range 0→1, otherwise it will use clamp to edge. For
polygon
it will always use repeat mode. For
vertex_buffer_draw
it will use repeat mode except for
layers that have point sprite coordinate generation enabled. This
is the default value.
Trait Implementations
sourceimpl Clone for MaterialWrapMode
impl Clone for MaterialWrapMode
sourcefn clone(&self) -> MaterialWrapMode
fn clone(&self) -> MaterialWrapMode
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl Debug for MaterialWrapMode
impl Debug for MaterialWrapMode
sourceimpl Display for MaterialWrapMode
impl Display for MaterialWrapMode
sourceimpl Hash for MaterialWrapMode
impl Hash for MaterialWrapMode
sourceimpl Ord for MaterialWrapMode
impl Ord for MaterialWrapMode
sourceimpl PartialEq<MaterialWrapMode> for MaterialWrapMode
impl PartialEq<MaterialWrapMode> for MaterialWrapMode
sourceimpl PartialOrd<MaterialWrapMode> for MaterialWrapMode
impl PartialOrd<MaterialWrapMode> for MaterialWrapMode
sourcefn partial_cmp(&self, other: &MaterialWrapMode) -> Option<Ordering>
fn partial_cmp(&self, other: &MaterialWrapMode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
fn lt(&self, other: &Rhs) -> bool
This method tests less than (for self
and other
) and is used by the <
operator. Read more
1.0.0 · sourcefn le(&self, other: &Rhs) -> bool
fn le(&self, other: &Rhs) -> bool
This method tests less than or equal to (for self
and other
) and is used by the <=
operator. Read more
impl Copy for MaterialWrapMode
impl Eq for MaterialWrapMode
impl StructuralEq for MaterialWrapMode
impl StructuralPartialEq for MaterialWrapMode
Auto Trait Implementations
impl RefUnwindSafe for MaterialWrapMode
impl Send for MaterialWrapMode
impl Sync for MaterialWrapMode
impl Unpin for MaterialWrapMode
impl UnwindSafe for MaterialWrapMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
impl<T> Clamp<T> for T where
T: PartialOrd<T>,
fn clamped(self, min: T, max: T) -> T
sourceimpl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
impl<Fr, To> IntoColor<To> for Fr where
To: FromColor<Fr>,
sourcefn into_color(self) -> To
fn into_color(self) -> To
Convert into color
impl<T> Pointable for T
impl<T> Pointable for T
impl<T> SetParameter for T
impl<T> SetParameter for T
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
T: Parameter<Self>,
Sets value
as a parameter of self
.