Struct piston_window::prelude::TextureSettings
source · pub struct TextureSettings { /* private fields */ }
Expand description
Texture creation parameters.
Implementations§
source§impl TextureSettings
impl TextureSettings
sourcepub fn new() -> TextureSettings
pub fn new() -> TextureSettings
Create default settings.
sourcepub fn get_convert_gamma(&self) -> bool
pub fn get_convert_gamma(&self) -> bool
Gets whether to convert gamma, treated as sRGB color space.
sourcepub fn set_convert_gamma(&mut self, val: bool)
pub fn set_convert_gamma(&mut self, val: bool)
Sets convert gamma.
sourcepub fn convert_gamma(self, val: bool) -> TextureSettings
pub fn convert_gamma(self, val: bool) -> TextureSettings
Sets convert gamma.
sourcepub fn get_compress(&self) -> bool
pub fn get_compress(&self) -> bool
Gets wheter compress on the GPU.
sourcepub fn set_compress(&mut self, val: bool)
pub fn set_compress(&mut self, val: bool)
Sets compress.
sourcepub fn compress(self, val: bool) -> TextureSettings
pub fn compress(self, val: bool) -> TextureSettings
Sets compress.
sourcepub fn get_generate_mipmap(&self) -> bool
pub fn get_generate_mipmap(&self) -> bool
Gets generate mipmap.
sourcepub fn set_generate_mipmap(&mut self, val: bool)
pub fn set_generate_mipmap(&mut self, val: bool)
Sets generate mipmap.
sourcepub fn generate_mipmap(self, val: bool) -> TextureSettings
pub fn generate_mipmap(self, val: bool) -> TextureSettings
Sets generate mipmap.
sourcepub fn min(self, val: Filter) -> TextureSettings
pub fn min(self, val: Filter) -> TextureSettings
Sets minify filter.
sourcepub fn mag(self, val: Filter) -> TextureSettings
pub fn mag(self, val: Filter) -> TextureSettings
Sets magnify filter
sourcepub fn get_mipmap(&self) -> Filter
pub fn get_mipmap(&self) -> Filter
Gets minify mipmap filter
sourcepub fn set_mipmap(&mut self, val: Filter)
pub fn set_mipmap(&mut self, val: Filter)
Sets magnify mipmap filter, and sets generate_mipmap to true.
sourcepub fn mipmap(self, val: Filter) -> TextureSettings
pub fn mipmap(self, val: Filter) -> TextureSettings
Sets magnify mipmap filter, and sets generate_mipmap to true
sourcepub fn get_filter(&self) -> (Filter, Filter)
pub fn get_filter(&self) -> (Filter, Filter)
Returns the min and mag filter
sourcepub fn set_filter(&mut self, val: Filter)
pub fn set_filter(&mut self, val: Filter)
Sets the min and mag filter
sourcepub fn filter(self, val: Filter) -> TextureSettings
pub fn filter(self, val: Filter) -> TextureSettings
Sets the min and mag filter
sourcepub fn get_wrap_u(&self) -> Wrap
pub fn get_wrap_u(&self) -> Wrap
Gets the wrapping mode for the u coordinate
sourcepub fn set_wrap_u(&mut self, val: Wrap)
pub fn set_wrap_u(&mut self, val: Wrap)
Sets the wrapping mode for the u coordinate
sourcepub fn wrap_u(self, val: Wrap) -> TextureSettings
pub fn wrap_u(self, val: Wrap) -> TextureSettings
Sets the wrapping mode for the u coordinate
sourcepub fn get_wrap_v(&self) -> Wrap
pub fn get_wrap_v(&self) -> Wrap
Gets the wrapping mode for the v coordinate
sourcepub fn set_wrap_v(&mut self, val: Wrap)
pub fn set_wrap_v(&mut self, val: Wrap)
Sets the wrapping mode for the v coordinate
sourcepub fn wrap_v(self, val: Wrap) -> TextureSettings
pub fn wrap_v(self, val: Wrap) -> TextureSettings
Sets the wrapping mode for the v coordinate
sourcepub fn get_border_color(&self) -> [f32; 4]
pub fn get_border_color(&self) -> [f32; 4]
Gets the border color
sourcepub fn set_border_color(&mut self, val: [f32; 4])
pub fn set_border_color(&mut self, val: [f32; 4])
Sets the border color
sourcepub fn border_color(self, val: [f32; 4]) -> TextureSettings
pub fn border_color(self, val: [f32; 4]) -> TextureSettings
Sets the border color
Trait Implementations§
source§impl Clone for TextureSettings
impl Clone for TextureSettings
source§fn clone(&self) -> TextureSettings
fn clone(&self) -> TextureSettings
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more