Struct opengles_graphics::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