Adia Robbie
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
8 additions and
1 deletions
-
crates/egui_glow/src/painter.rs
-
crates/egui_glow/src/vao.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) { |
|
|
|
|
|
@ -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 |
|
|
|
} |
|
|
|