-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
srgb unsupported on Vivante openGL (embedded) #1991
Comments
In order to narrow down the cause,
screen shots might help :) |
Totally dark. As in it looks like nothing is drawn to twhe window (using eframe)
Had to change it up a bit due to shader version but yeah, triangles draw fine. Same is true for the basic hello-triangle in glium examples.
A quick shader adjustment to fill the BG with blue instead to verify, yeah, that runs fine. Same is true for glium
Gonna have to be photos. But I'll see if I can get remote display working. This is what glow tells me in dbg:
weston log:
so, |
what does egui-glow output when running with egui debugs shader version + srgb support etc.. |
Related to #1982 |
Debug output is:
|
Looks like it's a feature detection issue. |
Okay so I got it working, these are the changes I needed to make for diff --git a/crates/egui_glow/src/painter.rs b/crates/egui_glow/src/painter.rs
index 5a383562..f4c918df 100644
--- a/crates/egui_glow/src/painter.rs
+++ b/crates/egui_glow/src/painter.rs
@@ -117,6 +117,7 @@ impl Painter {
let header = shader_version.version_declaration();
tracing::debug!("Shader header: {:?}.", header);
let srgb_support = gl.supported_extensions().contains("EXT_sRGB");
+ tracing::debug!("SRGB Support: {:?}.", srgb_support);
let (post_process, srgb_support_define) = match (shader_version, srgb_support) {
// WebGL2 support sRGB default
@@ -591,6 +592,8 @@ impl Painter {
glow::RGBA
};
(format, format)
+ } else if !self.srgb_support {
+ (glow::RGBA8, glow::RGBA)
} else {
(glow::SRGB8_ALPHA8, glow::RGBA)
};
diff --git a/crates/egui_glow/src/vao.rs b/crates/egui_glow/src/vao.rs
index 0a6e53d3..0e0439e1 100644
--- a/crates/egui_glow/src/vao.rs
+++ b/crates/egui_glow/src/vao.rs
@@ -147,6 +147,7 @@ fn supports_vao(gl: &glow::Context) -> bool {
let supported_extensions = gl.supported_extensions();
tracing::debug!("Supported OpenGL extensions: {:?}", supported_extensions);
supported_extensions.contains("ARB_vertex_array_object")
+ || supported_extensions.contains("GL_ARB_vertex_array_object")
} else {
true
} I don't think it is realistic to set everyone to |
The Vivante GPU on many STM32MP1 based boards does not support sRGB as an internal format. Introduce a check for sRGB support and default to `RGBA8` internal format if not supported. Additionally the STM32MP1 needs to be checked for `GL_ARB_vertex_array_object` Closes emilk#1991
The Vivante GPU on many STM32MP1 based boards does not support sRGB as an internal format. Introduce a check for sRGB support and default to `RGBA8` internal format if not supported. Additionally the STM32MP1 needs to be checked for `GL_ARB_vertex_array_object` Closes #1991
I'm trying to prototype use of egui on an STM32MP1 based board here at work to try and move off QT and C++. I notice that in many cases egui defaults to use of SRGB format - for example in the
egui_glium
crate, painter usesSrgbFormat
.If I try to use other integrations such as glow or eframe I get a blank window (except for shader path), which I'm assuming is due to this.
The following is a dump of info:
GL version = 2.0
I'm willing to put in the work, I'm just unsure where to start.
The text was updated successfully, but these errors were encountered: