Struct gfx::device::tex::SamplerInfo [] [src]

pub struct SamplerInfo {
    pub filtering: FilterMethod,
    pub wrap_mode: (WrapMode, WrapMode, WrapMode),
    pub lod_bias: f32,
    pub lod_range: (f32, f32),
    pub comparison: Option<Comparison>,
}

Specifies how to sample from a texture.

Fields

filtering: FilterMethod

Filter method to use.

wrap_mode: (WrapMode, WrapMode, WrapMode)

Wrapping mode for each of the U, V, and W axis (S, T, and R in OpenGL speak)

lod_bias: f32

This bias is added to every computed mipmap level (N + lod_bias). For example, if it would select mipmap level 2 and lod_bias is 1, it will use mipmap level 3.

lod_range: (f32, f32)

This range is used to clamp LOD level used for sampling

comparison: Option<Comparison>

comparison mode, used primary for a shadow map

Methods

impl SamplerInfo
[src]

fn new(filtering: FilterMethod, wrap: WrapMode) -> SamplerInfo

Create a new sampler description with a given filter method and wrapping mode, using no LOD modifications.

Trait Implementations

impl Debug for SamplerInfo
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.

impl Copy for SamplerInfo
[src]

impl Clone for SamplerInfo
[src]

fn clone(&self) -> SamplerInfo

Returns a copy of the value. Read more

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

Performs copy-assignment from source. Read more

impl PartialOrd for SamplerInfo
[src]

fn partial_cmp(&self, __arg_0: &SamplerInfo) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more

fn lt(&self, __arg_0: &SamplerInfo) -> bool

This method tests less than (for self and other) and is used by the < operator. Read more

fn le(&self, __arg_0: &SamplerInfo) -> bool

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

fn gt(&self, __arg_0: &SamplerInfo) -> bool

This method tests greater than (for self and other) and is used by the > operator. Read more

fn ge(&self, __arg_0: &SamplerInfo) -> bool

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl PartialEq for SamplerInfo
[src]

fn eq(&self, __arg_0: &SamplerInfo) -> bool

This method tests for self and other values to be equal, and is used by ==. Read more

fn ne(&self, __arg_0: &SamplerInfo) -> bool

This method tests for !=.