#[repr(u32)]
pub enum UnnormalizedSamplerAddressMode {
ClampToEdge,
ClampToBorder(BorderColor),
}
Expand description
How the sampler should behave when it needs to access a pixel that is out of range of the texture.
Variants
ClampToEdge
The coordinates are clamped to the valid range. Coordinates below 0 have the same value as coordinate 0. Coordinates over size of texture have the same value as coordinate size of texture.
ClampToBorder(BorderColor)
Any pixel out of range is considered to be part of the “border” of the image, which has a specific color of your choice.
Note that if you use ClampToBorder
multiple times, they must all have the same border
color.
Trait Implementations
sourceimpl Clone for UnnormalizedSamplerAddressMode
impl Clone for UnnormalizedSamplerAddressMode
sourcefn clone(&self) -> UnnormalizedSamplerAddressMode
fn clone(&self) -> UnnormalizedSamplerAddressMode
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 moresourceimpl Hash for UnnormalizedSamplerAddressMode
impl Hash for UnnormalizedSamplerAddressMode
sourceimpl PartialEq<UnnormalizedSamplerAddressMode> for UnnormalizedSamplerAddressMode
impl PartialEq<UnnormalizedSamplerAddressMode> for UnnormalizedSamplerAddressMode
sourcefn eq(&self, other: &UnnormalizedSamplerAddressMode) -> bool
fn eq(&self, other: &UnnormalizedSamplerAddressMode) -> bool
impl Copy for UnnormalizedSamplerAddressMode
impl Eq for UnnormalizedSamplerAddressMode
impl StructuralEq for UnnormalizedSamplerAddressMode
impl StructuralPartialEq for UnnormalizedSamplerAddressMode
Auto Trait Implementations
impl RefUnwindSafe for UnnormalizedSamplerAddressMode
impl Send for UnnormalizedSamplerAddressMode
impl Sync for UnnormalizedSamplerAddressMode
impl Unpin for UnnormalizedSamplerAddressMode
impl UnwindSafe for UnnormalizedSamplerAddressMode
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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
sourceimpl<T> Content for T
impl<T> Content for T
sourcefn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut c_void, size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
sourcefn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.
sourcefn indiv_size() -> usize
fn indiv_size() -> usize
Returns the size of an individual element.