You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Loading an image within a program's main loop will cause visual artifacts to appear in the elements rendered by ImGui. Here is an example using a 256x256 image:
imgui = "0.0.7-pre" // also reproducible with 0.0.6 from crates.io
image = "0.0.7"
glium = "0.13"
This line causes the problem: glium::texture::Texture2d::new(&display, image).unwrap()
I've tested images of 256x256 and 512x512 and it is reproducible with all of them.
I suspect that the texture used by ImGui was accidentally freed, and this image is overwriting it -- but I'm not exactly sure. I don't know of a workaround at this point other than to frontload all textures, or reinitialize ImGui at runtime, both of which are less than ideal.
Any insight would be greatly appreciated!
The text was updated successfully, but these errors were encountered:
Hmm, I think I've seen this too at some point. No clue about why it happens 😢
I trust Glium, so it's probably something in the unsafe parts of core imgui-rs, the glium renderer, or the shaders.
I'll look into it when I have some time.
Oh boy, this was tough to debug. Due to a simple naming error, the font atlas texture was never bound before use, but if no other textures were used, the atlas texture stayed as the "current texture" after creation and everything worked by accident.
Loading an image within a program's main loop will cause visual artifacts to appear in the elements rendered by ImGui. Here is an example using a 256x256 image:
Here is the isolated test case:
using versions:
This line causes the problem:
glium::texture::Texture2d::new(&display, image).unwrap()
I've tested images of 256x256 and 512x512 and it is reproducible with all of them.
I suspect that the texture used by ImGui was accidentally freed, and this image is overwriting it -- but I'm not exactly sure. I don't know of a workaround at this point other than to frontload all textures, or reinitialize ImGui at runtime, both of which are less than ideal.
Any insight would be greatly appreciated!
The text was updated successfully, but these errors were encountered: