diff --git a/crates/egui_glow/src/painter.rs b/crates/egui_glow/src/painter.rs index 224dff856..dd5e6013a 100644 --- a/crates/egui_glow/src/painter.rs +++ b/crates/egui_glow/src/painter.rs @@ -116,7 +116,12 @@ impl Painter { let is_webgl_1 = shader == ShaderVersion::Es100; let header = shader.version_declaration(); tracing::debug!("Shader header: {:?}.", header); - let srgb_support = gl.supported_extensions().contains("EXT_sRGB"); + // Previously checking srgb_support on WebGL only, now we have to check on other GL | ES as well. + let srgb_support = gl.supported_extensions().contains("EXT_sRGB") + || gl.supported_extensions().contains("GL_EXT_sRGB") + || gl + .supported_extensions() + .contains("GL_ARB_framebuffer_sRGB"); tracing::debug!("SRGB Support: {:?}.", srgb_support); let (post_process, srgb_support_define) = match (shader, srgb_support) { diff --git a/crates/egui_glow/src/vao.rs b/crates/egui_glow/src/vao.rs index c533468e6..ac87053b6 100644 --- a/crates/egui_glow/src/vao.rs +++ b/crates/egui_glow/src/vao.rs @@ -126,6 +126,7 @@ fn supports_vao(gl: &glow::Context) -> bool { let supported_extensions = gl.supported_extensions(); tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions); supported_extensions.contains("OES_vertex_array_object") + || supported_extensions.contains("GL_OES_vertex_array_object") } else { true } @@ -136,6 +137,7 @@ fn supports_vao(gl: &glow::Context) -> bool { let supported_extensions = gl.supported_extensions(); tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions); supported_extensions.contains("OES_vertex_array_object") + || supported_extensions.contains("GL_OES_vertex_array_object") } else { true }