3 ms·
> 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen. I think this would actually be
by flohofwoe 4y ago
> 1. It would be nice to have some built in image handling functions, i.e. to be able to allocate and draw images on the screen.
I think this would actually be fairly tricky to handle inside Dear ImGui, because the image object must be in a format that's understood by the rendering backend. The way ImGui handles image rendering via an opaque ImTextureID handle which is passed through to the renderer backend is actually quite elegant IMHO.
- taylorius 4y agoI can see what you mean - but I would think that an array of int32s representing RGBA would be fairly standard these days. ImGui already draws fonts using textures, if I recall.
- xyzzy_plugh 4y agoIf you're writing the ImGui backend already, don't you practically have to handle texture upload? Why not just upload the image yourself? I've never found this to be problematic. Long before ImGui even gets involved I've already got stb.h and a spinning textured cube.
- taylorius 4y agoI suspect that the majority of ImGui users use one of the included, ready-to-use backends. For example, I use the OpenGL one. I work around the lack of images, handling the textures myself, but it's always struck me as an odd omission.