Skip to content
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

(Post-Tutorial Question) Drawing an image with ImGUI. #92

Closed
Wertuu opened this issue Aug 4, 2024 · 5 comments
Closed

(Post-Tutorial Question) Drawing an image with ImGUI. #92

Wertuu opened this issue Aug 4, 2024 · 5 comments

Comments

@Wertuu
Copy link

Wertuu commented Aug 4, 2024

Howdy,
It's been a little while since I finished this tutorial, and I was just wondering if you tried to draw an image into an ImGUI frame? I ran into some issues myself and I was just unsure if I was doing it wrong. In online forums, people have said that it's because it's designed for OpenGL when using LWJGL.

So I guess the question if you do run into ths is: would you recommend an alternative library or doing it without a libray?

@lwjglgamedev
Copy link
Owner

Hi, it should be possible to do that. I do not understand why they mention OpenGL. In any case, I will try to check an example to see how it can be done, You are trying to display a texture?

Another alternative should be nuklear, which, if I recall corectly, LWJGL has bindings for it.

@Wertuu
Copy link
Author

Wertuu commented Aug 7, 2024

Yes, specifically displaying a Vulkan texture into an ImGui frame. This is a related bug ticket link.

@lwjglgamedev
Copy link
Owner

Ok. This seems to be solved here. Now you can use longs as texture ids and use the descriptor set associated to the texture. Let's wait for a new release of imgui to be published.

In any case, I will leave this issue open to include a specific example. This will be done in the new version of the book, which uses Vulkan latest features (still in progress). Right now the GUI render class does not care about texture ids (and it should)

@lwjglgamedev
Copy link
Owner

I just saw that Imgui java port just uploaded a new version which seems to support longs for texture ids: https://github.com/SpaiR/imgui-java

@lwjglgamedev
Copy link
Owner

This is fixed in new version in the book. Right now is just code (no explanation text) in a private repo, I expect to set up a public branch soon (meaning weeks or a couple of months)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants