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
Auto Trait Implementations§
impl Freeze for TextureSettings
impl RefUnwindSafe for TextureSettings
impl Send for TextureSettings
impl Sync for TextureSettings
impl Unpin for TextureSettings
impl UnwindSafe for TextureSettings
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more