Struct opengl_graphics::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) -> 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 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
sourceimpl Clone for TextureSettings
impl Clone for TextureSettings
sourcepub fn clone(&self) -> TextureSettings
pub 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 more
impl 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 T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Pointable for T
impl<T> Pointable for T
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more