Skip to main content

SamplerDescriptor

Struct SamplerDescriptor 

Source
pub struct SamplerDescriptor {
Show 17 fields pub min_filter: usize, pub mag_filter: usize, pub mip_filter: usize, pub max_anisotropy: usize, pub s_address_mode: usize, pub t_address_mode: usize, pub r_address_mode: usize, pub border_color: usize, pub reduction_mode: usize, pub normalized_coordinates: bool, pub lod_min_clamp: f32, pub lod_max_clamp: f32, pub lod_average: bool, pub lod_bias: f32, pub compare_function: usize, pub support_argument_buffers: bool, pub label: Option<String>,
}
Expand description

Re-exports the Metal framework surface for this item. Rust description of MTLSamplerDescriptor.

Fields§

§min_filter: usize

Mirrors the Metal framework property for min_filter.

§mag_filter: usize

Mirrors the Metal framework property for mag_filter.

§mip_filter: usize

Mirrors the Metal framework property for mip_filter.

§max_anisotropy: usize

Mirrors the Metal framework property for max_anisotropy.

§s_address_mode: usize

Mirrors the Metal framework property for s_address_mode.

§t_address_mode: usize

Mirrors the Metal framework property for t_address_mode.

§r_address_mode: usize

Mirrors the Metal framework property for r_address_mode.

§border_color: usize

Mirrors the Metal framework property for border_color.

§reduction_mode: usize

Mirrors the Metal framework property for reduction_mode.

§normalized_coordinates: bool

Mirrors the Metal framework property for normalized_coordinates.

§lod_min_clamp: f32

Mirrors the Metal framework property for lod_min_clamp.

§lod_max_clamp: f32

Mirrors the Metal framework property for lod_max_clamp.

§lod_average: bool

Mirrors the Metal framework property for lod_average.

§lod_bias: f32

Mirrors the Metal framework property for lod_bias.

§compare_function: usize

Mirrors the Metal framework property for compare_function.

§support_argument_buffers: bool

Mirrors the Metal framework property for support_argument_buffers.

§label: Option<String>

Mirrors the Metal framework property for label.

Implementations§

Source§

impl SamplerDescriptor

Source

pub fn new() -> Self

Create a descriptor with Metal’s default sampling behavior.

Trait Implementations§

Source§

impl Clone for SamplerDescriptor

Source§

fn clone(&self) -> SamplerDescriptor

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for SamplerDescriptor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for SamplerDescriptor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. 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> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.