pub enum WrapMode {
Repeat,
ClampToEdge,
ClampToBorder,
MirroredRepeat,
MirrorClampToEdge,
}Expand description
Defines a law of texture coordinate modification.
Variants§
Repeat
Causes the integer part of a coordinate to be ignored; GPU uses only the fractional part, thereby creating a repeating pattern.
ClampToEdge
Causes a coordinates to be clamped to the range, where N is the size of the texture in the direction of clamping
ClampToBorder
Evaluates a coordinates in a similar manner to ClampToEdge. However, in cases where clamping would have occurred in ClampToEdge mode, the fetched texel data is substituted with the values specified by border color.
MirroredRepeat
Causes the coordinate to be set to the fractional part of the texture coordinate if the integer part of coordinate is even; if the integer part of coordinate is odd, then the coordinate texture coordinate is set to 1-frac, where frac represents the fractional part of coordinate.
MirrorClampToEdge
Causes a coordinate to be repeated as for MirroredRepeat for one repetition of the texture, at which point the coordinate to be clamped as in ClampToEdge.
Trait Implementations§
impl Copy for WrapMode
impl Eq for WrapMode
impl StructuralPartialEq for WrapMode
Auto Trait Implementations§
impl Freeze for WrapMode
impl RefUnwindSafe for WrapMode
impl Send for WrapMode
impl Sync for WrapMode
impl Unpin for WrapMode
impl UnsafeUnpin for WrapMode
impl UnwindSafe for WrapMode
Blanket Implementations§
Source§impl<T> AsyncTaskResult for T
impl<T> AsyncTaskResult for T
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
impl<T, U> ObjectOrVariant<T> for Uwhere
PhantomData<U>: ObjectOrVariantHelper<T, U>,
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.