mirror of
https://github.com/emilk/egui.git
synced 2026-06-28 07:23:13 -04:00
Add texture filters to changelogs and improve docs
This commit is contained in:
@@ -136,11 +136,20 @@ pub struct TextureMeta {
|
||||
pub filter: TextureFilter,
|
||||
}
|
||||
|
||||
/// How the texture texels are filtered.
|
||||
#[derive(Copy, Clone, Debug, PartialEq)]
|
||||
#[cfg_attr(feature = "serde", derive(serde::Deserialize, serde::Serialize))]
|
||||
pub enum TextureFilter {
|
||||
Linear,
|
||||
/// Show the nearest pixel value.
|
||||
///
|
||||
/// When zooming in you will get sharp, square pixels/texels.
|
||||
/// When zooming out you will get a very crisp (and aliased) look.
|
||||
Nearest,
|
||||
|
||||
/// Linearly interpolate the nearest neighbors, creating a smoother look when zooming in and out.
|
||||
///
|
||||
/// This is the default.
|
||||
Linear,
|
||||
}
|
||||
|
||||
impl Default for TextureFilter {
|
||||
|
||||
Reference in New Issue
Block a user