I’m new to OpenGL, so I’m unsure if I’m just missing some dependency. I’m on Fedora 40 and I’m trying to implement a GLArea in my gtk4 application written with the gtk4-rs bindings, and I’m following the example provided in the gtk4-rs repo. When I run the example with
cargo run --bin glium_gl_area
I get the following error:
thread 'main' panicked at examples/glium_gl_area/glium_gl_area/imp.rs:90:10:
called `Result::unwrap()` on an `Err` value: NoVersion
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
I went to the glium codebase and I found that this error is thrown form the !program macro when is_glsl_version_supported() can’t find a supported version, but when I run glxinfo | grep OpenGL I get:
OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) UHD Graphics 620 (WHL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 24.0.5
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 24.0.5
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 24.0.5
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:
So I thought I’m just missing a dependency, so I installed OpenGL devel libraries according to this wiki article, which didn’t fix the issue of running the example. I ran some C++ code to see if it can see if GL_VERSION_1_4 was supported with the glewIsSupported() function from <GL/glew.h> which returned true… I’m unsure what to do next about resolving this issue. Any ideas?
Edit: I’m hesitant to open an Issue on GitHub for glium or gtk4-rs if it’s a simple dependency issue.
Edit 2: I am able to compile and run the demo here.