-
Notifications
You must be signed in to change notification settings - Fork 41
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
How do I draw an imgui ImageButton? #65
Comments
Ugh. ImGui doesn't support textures on Vulkan. See ocornut/imgui#914. I think @ocornut has no plans of supporting them any time soon. That PR has gone unmerged for over four years. I guess my only hope is FreeType color fonts? Implementing my icons that way per ocornut/imgui#2641 (comment) ? Sigh...every solution, something is always missing. Such is the pain of being a programmer, I guess. Reclutch, no Mac support. Vulkan, no ImGui textures. |
Here it is, first build of Qglif using Vulkan. I have to say, I'm a bit disappointed, and building the ImGui font atlas is a bit slow. But, let's not whine, it is working sort of. I will not pout, just contribute how I can. :-) I had a very hard time building and getting this working and can't push it to my GitHub as-is though @aclysma . Are you available for a Discord chat perhaps? I have a lot of ideas. |
I would VERY much like to solve this but no one was able to give me a thorough and open explanation at the pros and cons of different solutions nor explain me the Vulkan jargon (I don’t even understand what a descriptor is, the many ways people use all this, their lifetime, their validity accross frames etc in various scenarios not just “my engine scenario”). No one seemingly had the patience to help dig and find a solid solution that fits all cases properly, so it is stalling forever despite potentially being a 10 lines patch :( I do believe a mechanism like ocornut/imgui#2697 may be the key answer to it. |
I'm sorry, this is my first Vulkan application @ocornut, so I doubt I can do any better. Sometimes, though, you just have to merge and see what problems users have and go from there. The patch obviously works well for a lot of people. I don't know if this case fits that, but it seems like it does to me. |
As is the problem is that it doesn’t build in 32-bits mode any more. Its tempting to drop 32-bits for dx12 and vulkan but also feels a bit arbitrary..
|
Conditional compilation might help :-) |
Update. I decided, sadly, for now, that I'm just going to make an icon font. @eliheuer made a nice icon font with different shades of gray, but it's a small price to pay for code sanity. I was throwing in a ton of It's working now. I still think it's quite unfortunate I can't get ImGui to draw Vulkan textures, but oh well. :-) See MFEK/glif#3 |
I'm going to close this as it seems to be more about imgui itself than the code that initializes it |
With Reclutch I'd just create a glium texture:
https://github.com/mfeq/Qglif/blob/534b6f62e09d89e45ddac96d9f65ac9e2114dfca/src/opengl/imgui/icons.rs#L56
What am I supposed to do with skulpin-imgui-plugin? :-)
The text was updated successfully, but these errors were encountered: