pub struct SamplerDescriptor {
pub address_mode_u: AddressMode,
pub address_mode_v: AddressMode,
pub address_mode_w: AddressMode,
pub mag_filter: FilterMode,
pub min_filter: FilterMode,
pub mipmap_filter: MipmapFilterMode,
}Expand description
Descriptor for creating a sampler.
Fields§
§address_mode_u: AddressMode§address_mode_v: AddressMode§address_mode_w: AddressMode§mag_filter: FilterMode§min_filter: FilterMode§mipmap_filter: MipmapFilterModeImplementations§
Source§impl SamplerDescriptor
impl SamplerDescriptor
Sourcepub fn linear() -> SamplerDescriptor
pub fn linear() -> SamplerDescriptor
Creates a linear-filtered sampler with clamp-to-edge addressing.
Sourcepub fn nearest() -> SamplerDescriptor
pub fn nearest() -> SamplerDescriptor
Creates a nearest-neighbor filtered sampler for pixel art.
Sourcepub fn repeat() -> SamplerDescriptor
pub fn repeat() -> SamplerDescriptor
Creates a repeating sampler.
Trait Implementations§
Source§impl Clone for SamplerDescriptor
impl Clone for SamplerDescriptor
Source§fn clone(&self) -> SamplerDescriptor
fn clone(&self) -> SamplerDescriptor
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SamplerDescriptor
impl Debug for SamplerDescriptor
Source§impl Default for SamplerDescriptor
impl Default for SamplerDescriptor
Source§fn default() -> SamplerDescriptor
fn default() -> SamplerDescriptor
Returns the “default value” for a type. Read more
impl Copy for SamplerDescriptor
Auto Trait Implementations§
impl Freeze for SamplerDescriptor
impl RefUnwindSafe for SamplerDescriptor
impl Send for SamplerDescriptor
impl Sync for SamplerDescriptor
impl Unpin for SamplerDescriptor
impl UnsafeUnpin for SamplerDescriptor
impl UnwindSafe for SamplerDescriptor
Blanket Implementations§
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.