Struct texture::TextureSettings
source · pub struct TextureSettings { /* private fields */ }
Expand description
Texture creation parameters.
Implementations
sourceimpl 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) -> Self
pub fn convert_gamma(self, val: bool) -> Self
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 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) -> Self
pub fn generate_mipmap(self, val: bool) -> Self
Sets generate mipmap.
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) -> Self
pub fn mipmap(self, val: Filter) -> Self
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 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 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 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]) -> Self
pub fn border_color(self, val: [f32; 4]) -> Self
Sets the border color
Trait Implementations
sourceimpl Clone for TextureSettings
impl Clone for TextureSettings
sourcefn clone(&self) -> TextureSettings
fn clone(&self) -> TextureSettings
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreimpl Copy for TextureSettings
Auto Trait Implementations
impl RefUnwindSafe for TextureSettings
impl Send for TextureSettings
impl Sync for TextureSettings
impl Unpin for TextureSettings
impl UnwindSafe for TextureSettings
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more