pub struct TextureSettings { /* private fields */ }
Expand description

Texture creation parameters.

Implementations§

source§

impl TextureSettings

source

pub fn new() -> TextureSettings

Create default settings.

source

pub fn get_convert_gamma(&self) -> bool

Gets whether to convert gamma, treated as sRGB color space.

source

pub fn set_convert_gamma(&mut self, val: bool)

Sets convert gamma.

source

pub fn convert_gamma(self, val: bool) -> TextureSettings

Sets convert gamma.

source

pub fn get_compress(&self) -> bool

Gets wheter compress on the GPU.

source

pub fn set_compress(&mut self, val: bool)

Sets compress.

source

pub fn compress(self, val: bool) -> TextureSettings

Sets compress.

source

pub fn get_generate_mipmap(&self) -> bool

Gets generate mipmap.

source

pub fn set_generate_mipmap(&mut self, val: bool)

Sets generate mipmap.

source

pub fn generate_mipmap(self, val: bool) -> TextureSettings

Sets generate mipmap.

source

pub fn get_min(&self) -> Filter

Gets minify filter.

source

pub fn set_min(&mut self, val: Filter)

Sets minify filter.

source

pub fn min(self, val: Filter) -> TextureSettings

Sets minify filter.

source

pub fn get_mag(&self) -> Filter

Gets magnify filter

source

pub fn set_mag(&mut self, val: Filter)

Sets magnify filter

source

pub fn mag(self, val: Filter) -> TextureSettings

Sets magnify filter

source

pub fn get_mipmap(&self) -> Filter

Gets minify mipmap filter

source

pub fn set_mipmap(&mut self, val: Filter)

Sets magnify mipmap filter, and sets generate_mipmap to true.

source

pub fn mipmap(self, val: Filter) -> TextureSettings

Sets magnify mipmap filter, and sets generate_mipmap to true

source

pub fn get_filter(&self) -> (Filter, Filter)

Returns the min and mag filter

source

pub fn set_filter(&mut self, val: Filter)

Sets the min and mag filter

source

pub fn filter(self, val: Filter) -> TextureSettings

Sets the min and mag filter

source

pub fn get_wrap_u(&self) -> Wrap

Gets the wrapping mode for the u coordinate

source

pub fn set_wrap_u(&mut self, val: Wrap)

Sets the wrapping mode for the u coordinate

source

pub fn wrap_u(self, val: Wrap) -> TextureSettings

Sets the wrapping mode for the u coordinate

source

pub fn get_wrap_v(&self) -> Wrap

Gets the wrapping mode for the v coordinate

source

pub fn set_wrap_v(&mut self, val: Wrap)

Sets the wrapping mode for the v coordinate

source

pub fn wrap_v(self, val: Wrap) -> TextureSettings

Sets the wrapping mode for the v coordinate

source

pub fn get_border_color(&self) -> [f32; 4]

Gets the border color

source

pub fn set_border_color(&mut self, val: [f32; 4])

Sets the border color

source

pub fn border_color(self, val: [f32; 4]) -> TextureSettings

Sets the border color

Trait Implementations§

source§

impl Clone for TextureSettings

source§

fn clone(&self) -> TextureSettings

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Copy for TextureSettings

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.