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:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user