pub struct TextureOptions {
pub magnification: TextureFilter,
pub minification: TextureFilter,
pub wrap_mode: TextureWrapMode,
pub mipmap_mode: Option<TextureFilter>,
}Expand description
How the texture texels are filtered.
Fields§
§magnification: TextureFilterHow to filter when magnifying (when texels are larger than pixels).
minification: TextureFilterHow to filter when minifying (when texels are smaller than pixels).
wrap_mode: TextureWrapModeHow to wrap the texture when the texture coordinates are outside the [0, 1] range.
mipmap_mode: Option<TextureFilter>How to filter between texture mipmaps.
Mipmaps ensures textures look smooth even when the texture is very small and pixels are much larger than individual texels.
§Notes
- This may not be available on all backends (currently only
egui_glow).
Implementations§
Source§impl TextureOptions
impl TextureOptions
Sourcepub const LINEAR: TextureOptions
pub const LINEAR: TextureOptions
Linear magnification and minification.
Sourcepub const NEAREST: TextureOptions
pub const NEAREST: TextureOptions
Nearest magnification and minification.
Sourcepub const LINEAR_REPEAT: TextureOptions
pub const LINEAR_REPEAT: TextureOptions
Linear magnification and minification, but with the texture repeated.
Sourcepub const LINEAR_MIRRORED_REPEAT: TextureOptions
pub const LINEAR_MIRRORED_REPEAT: TextureOptions
Linear magnification and minification, but with the texture mirrored and repeated.
Sourcepub const NEAREST_REPEAT: TextureOptions
pub const NEAREST_REPEAT: TextureOptions
Nearest magnification and minification, but with the texture repeated.
Sourcepub const NEAREST_MIRRORED_REPEAT: TextureOptions
pub const NEAREST_MIRRORED_REPEAT: TextureOptions
Nearest magnification and minification, but with the texture mirrored and repeated.
pub const fn with_mipmap_mode( self, mipmap_mode: Option<TextureFilter>, ) -> TextureOptions
Trait Implementations§
Source§impl Clone for TextureOptions
impl Clone for TextureOptions
Source§fn clone(&self) -> TextureOptions
fn clone(&self) -> TextureOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for TextureOptions
Source§impl Debug for TextureOptions
impl Debug for TextureOptions
Source§impl Default for TextureOptions
impl Default for TextureOptions
Source§fn default() -> TextureOptions
fn default() -> TextureOptions
The default is linear for both magnification and minification.
impl Eq for TextureOptions
Source§impl Hash for TextureOptions
impl Hash for TextureOptions
Source§impl PartialEq for TextureOptions
impl PartialEq for TextureOptions
impl StructuralPartialEq for TextureOptions
Auto Trait Implementations§
impl Freeze for TextureOptions
impl RefUnwindSafe for TextureOptions
impl Send for TextureOptions
impl Sync for TextureOptions
impl Unpin for TextureOptions
impl UnsafeUnpin for TextureOptions
impl UnwindSafe for TextureOptions
Blanket Implementations§
impl<T> AsId for T
impl<T> AsIdSalt for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
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> ⓘ
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> ⓘ
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