1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

Fix sRGB blending and cleanup the relevant code (#2070)

* Fix sRGBA blending on Mac

* Clean up handling of sRGB support

* Assume sRGB support if any extension has sRGB in it

* improve logging very slightly
This commit is contained in:
Emil Ernerfeldt
2022-09-21 21:30:02 +02:00
committed by GitHub
parent 4aae638e15
commit 990a8c8b44
2 changed files with 54 additions and 44 deletions

View File

@@ -7,8 +7,14 @@ use std::convert::TryInto;
#[allow(dead_code)]
pub enum ShaderVersion {
Gl120,
/// OpenGL 1.4 or later
Gl140,
/// e.g. WebGL1
Es100,
/// e.g. WebGL2
Es300,
}
@@ -70,6 +76,13 @@ impl ShaderVersion {
Self::Es300 | Self::Gl140 => true,
}
}
pub fn is_embedded(&self) -> bool {
match self {
Self::Gl120 | Self::Gl140 => false,
Self::Es100 | Self::Es300 => true,
}
}
}
#[test]