Struct glium_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
Trait Implementations§
source§impl Clone for TextureSettings
impl Clone for TextureSettings
source§fn clone(&self) -> TextureSettings
fn clone(&self) -> TextureSettings
Returns a copy of the value. Read more
1.0.0 · source§fn 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§
source§impl<T> Content for Twhere
T: Copy,
impl<T> Content for Twhere
T: Copy,
source§fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
fn read<F, E>(size: usize, f: F) -> Result<T, E>where
F: FnOnce(&mut T) -> Result<(), E>,
Prepares an output buffer, then turns this buffer into an
Owned
.source§fn get_elements_size() -> usize
fn get_elements_size() -> usize
Returns the size of each element.
source§fn to_void_ptr(&self) -> *const ()
fn to_void_ptr(&self) -> *const ()
Produces a pointer to the data.
source§fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
fn ref_from_ptr<'a>(ptr: *mut (), size: usize) -> Option<*mut T>
Builds a pointer to this type from a raw pointer.
source§fn is_size_suitable(size: usize) -> bool
fn is_size_suitable(size: usize) -> bool
Returns true if the size is suitable to store a type like this.