Skip to main content

SamplerDescriptor

Struct SamplerDescriptor 

Source
pub struct SamplerDescriptor {
    pub mag_filter: Filter,
    pub min_filter: Filter,
    pub anisotropy_enable: bool,
    pub max_anisotropy: f32,
    pub address_mode_u: SamplerAddressMode,
    pub address_mode_v: SamplerAddressMode,
    pub address_mode_w: SamplerAddressMode,
    pub border_color: BorderColor,
    pub unnormalized_coordinates: bool,
    pub compare_enable: bool,
    pub mipmap_mode: SamplerMipmapMode,
}

Fields§

§mag_filter: Filter§min_filter: Filter§anisotropy_enable: bool§max_anisotropy: f32§address_mode_u: SamplerAddressMode§address_mode_v: SamplerAddressMode§address_mode_w: SamplerAddressMode§border_color: BorderColor§unnormalized_coordinates: bool§compare_enable: bool§mipmap_mode: SamplerMipmapMode

Implementations§

Source§

impl SamplerDescriptor

Source

pub fn default() -> Self

Source

pub fn with_address_modes( self, u: SamplerAddressMode, v: SamplerAddressMode, w: SamplerAddressMode, ) -> Self

Source

pub fn with_anisotropy(self, enable: bool, max_anisotropy: f32) -> Self

Source

pub fn with_filters(self, mag_filter: Filter, min_filter: Filter) -> Self

Source

pub fn with_border_color(self, border_color: BorderColor) -> Self

Source

pub fn with_unnormalized_coordinates(self, unnormalized: bool) -> Self

Source

pub fn with_compare_enable(self, compare_enable: bool) -> Self

Source

pub fn with_mipmap_mode(self, mipmap_mode: SamplerMipmapMode) -> Self

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.