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
Unable to draw texture in gtk4-rs
application
#2106
Comments
I also encountered this exact same issue. I did notice something however, if I load the texture each time in the GTKs render loop (
Does not matter if I load the texture in init function or during the render itself, as long as you cache it (in other words, try and reuse texture between re-renders) the image will NOT be displayed. Interestingly, when trying to cache the texture (so when it does not work), OpenGL debug messages with print this
This is 100% related to the issue, but I don't have enough OpenGL knowledge to debug it. |
Yes, glium and gtk4 seem to compete for the global OpenGL state and overwrite each others' textures. I reported this issue to the |
I have been able to render OpenGL nicely in
GLArea
s in agtk4-rs
application in general. But using textures simply does not work for me. I reported this to gtk4-rs, but I figured the issue might be withglium
, so I report it here also.I get the image texture examples from
glium
to run just fine! But when I port that exact same glium code over to render in a GTK4 application, the textures simply don't show up. It's as if thetexture(...)
function in the fragment shader just returns transparent. The GL context hasDebugCallbackBehavior::DebugMessageOnError
and no errors or warnings are printed.I have created a single-file example of my problem (plus corresponding
Cargo.toml
). This example is initially based off of the gliumimage
example merged with the gtk4-rs OpenGL example.Cargo.toml
main.rs
And you of course also need an image to load. Grab any PNG and put in the
src/
directory.I also reported it to the small but nice helper library
gtk4-glium
: remcokranenburg/gtk4-glium#2This might be related to #2017 since the symptoms are similar. But I don't know.
The text was updated successfully, but these errors were encountered: