[][src]Struct nannou::vk::SamplerBuilder

pub struct SamplerBuilder {
    pub mag_filter: Option<Filter>,
    pub min_filter: Option<Filter>,
    pub mipmap_mode: Option<MipmapMode>,
    pub address_u: Option<SamplerAddressMode>,
    pub address_v: Option<SamplerAddressMode>,
    pub address_w: Option<SamplerAddressMode>,
    pub mip_lod_bias: Option<f32>,
    pub max_anisotropy: Option<f32>,
    pub min_lod: Option<f32>,
    pub max_lod: Option<f32>,
}

A builder struct that makes the process of building a Sampler more modular.

Fields

mag_filter: Option<Filter>min_filter: Option<Filter>mipmap_mode: Option<MipmapMode>address_u: Option<SamplerAddressMode>address_v: Option<SamplerAddressMode>address_w: Option<SamplerAddressMode>mip_lod_bias: Option<f32>max_anisotropy: Option<f32>min_lod: Option<f32>max_lod: Option<f32>

Methods

impl SamplerBuilder[src]

pub const DEFAULT_MAG_FILTER: Filter[src]

pub const DEFAULT_MIN_FILTER: Filter[src]

pub const DEFAULT_MIPMAP_MODE: MipmapMode[src]

pub const DEFAULT_ADDRESS_U: SamplerAddressMode[src]

pub const DEFAULT_ADDRESS_V: SamplerAddressMode[src]

pub const DEFAULT_ADDRESS_W: SamplerAddressMode[src]

pub const DEFAULT_MIP_LOD_BIAS: f32[src]

pub const DEFAULT_MAX_ANISOTROPY: f32[src]

pub const DEFAULT_MIN_LOD: f32[src]

pub const DEFAULT_MAX_LOD: f32[src]

pub fn new() -> Self[src]

Begin building a new vulkan Sampler.

pub fn mag_filter(self, filter: Filter) -> Self[src]

How the implementation should sample from the image when it is respectively larger than the original.

pub fn min_filter(self, filter: Filter) -> Self[src]

How the implementation should sample from the image when it is respectively smaller than the original.

pub fn mipmap_mode(self, mode: MipmapMode) -> Self[src]

How the implementation should choose which mipmap to use.

pub fn address_u(self, mode: SamplerAddressMode) -> Self[src]

How the implementation should behave when sampling outside of the texture coordinates range [0.0, 1.0].

pub fn address_v(self, mode: SamplerAddressMode) -> Self[src]

How the implementation should behave when sampling outside of the texture coordinates range [0.0, 1.0].

pub fn address_w(self, mode: SamplerAddressMode) -> Self[src]

How the implementation should behave when sampling outside of the texture coordinates range [0.0, 1.0].

pub fn mip_lod_bias(self, bias: f32) -> Self[src]

Level of detail bias.

pub fn max_anisotropy(self, max: f32) -> Self[src]

Must be greater than oro equal to 1.0.

If greater than 1.0, the implementation will use anisotropic filtering. Using a value greater than 1.0 requires the sampler_anisotropy feature to be enabled when creating the device.

pub fn min_lod(self, lod: f32) -> Self[src]

The minimum mipmap level to use.

pub fn max_lod(self, lod: f32) -> Self[src]

The maximum mipmap level to use.

pub fn build(
    self,
    device: Arc<Device>
) -> Result<Arc<Sampler>, SamplerCreationError>
[src]

Build the sampler with the givenn behaviour.

Trait Implementations

impl PartialEq<SamplerBuilder> for SamplerBuilder[src]

impl Clone for SamplerBuilder[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

impl Default for SamplerBuilder[src]

impl Debug for SamplerBuilder[src]

Auto Trait Implementations

Blanket Implementations

impl<T> From<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Style for T where
    T: Any + Debug + PartialEq<T>, 
[src]

impl<T> Content for T[src]

impl<T> SafeBorrow<T> for T[src]

impl<T> Erased for T

impl<S> FromSample<S> for S[src]

impl<T, U> ToSample<U> for T where
    U: FromSample<T>, 
[src]

impl<S, T> Duplex<S> for T where
    T: FromSample<S> + ToSample<S>, 
[src]

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.

impl<T> SetParameter for T

fn set<T>(&mut self, value: T) -> <T as Parameter<Self>>::Result where
    T: Parameter<Self>, 

Sets value as a parameter of self.