#[non_exhaustive]
pub enum PipelineWrapMode {
Repeat,
MirroredRepeat,
ClampToEdge,
Automatic,
}
Expand description
Pipeline 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 PipelineFilter::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.
MirroredRepeat
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 PipelineWrapMode
impl Clone for PipelineWrapMode
sourcefn clone(&self) -> PipelineWrapMode
fn clone(&self) -> PipelineWrapMode
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 PipelineWrapMode
impl Debug for PipelineWrapMode
sourceimpl Display for PipelineWrapMode
impl Display for PipelineWrapMode
sourceimpl Hash for PipelineWrapMode
impl Hash for PipelineWrapMode
sourceimpl Ord for PipelineWrapMode
impl Ord for PipelineWrapMode
sourceimpl PartialEq<PipelineWrapMode> for PipelineWrapMode
impl PartialEq<PipelineWrapMode> for PipelineWrapMode
sourceimpl PartialOrd<PipelineWrapMode> for PipelineWrapMode
impl PartialOrd<PipelineWrapMode> for PipelineWrapMode
sourcefn partial_cmp(&self, other: &PipelineWrapMode) -> Option<Ordering>
fn partial_cmp(&self, other: &PipelineWrapMode) -> 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 PipelineWrapMode
impl Eq for PipelineWrapMode
impl StructuralEq for PipelineWrapMode
impl StructuralPartialEq for PipelineWrapMode
Auto Trait Implementations
impl RefUnwindSafe for PipelineWrapMode
impl Send for PipelineWrapMode
impl Sync for PipelineWrapMode
impl Unpin for PipelineWrapMode
impl UnwindSafe for PipelineWrapMode
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
.