SpaiR / imgui-java

JNI based binding for Dear ImGui
MIT License
587 stars 90 forks source link

Implementing ImGUI in an already existing LWJGL3 enviroment #177

Closed Caue-Aron closed 1 year ago

Caue-Aron commented 1 year ago

I couldn't find any example showing how to do exactly this. I'd like to just put some gui in an app i already am working on, without having to extend from Application. If possible how can i do that? Im sorry but i didnt find any resources on that.

SpaiR commented 1 year ago

Yes. You can basically take ImGuiImplGlfw and ImGuiImplGl3 (or even copy-paste code from them) and "attach" them to your application. Window.java class shows how exactly you can do that, just follow the code.

Caue-Aron commented 1 year ago

I'm now trying to implement ImGui to this project tutorial: https://www.youtube.com/watch?v=f6gVind3jFQ

Although the code is quite complex to deal with, im getting memory errors everytime and i cant get things to show on screen. This is how the project is setup: https://github.com/Caue-Aron/LowPM_TEST

SpaiR commented 1 year ago

There is a pretty good video about how you can add imgui-java to your project: https://www.youtube.com/watch?v=Xq-eVcNtUbw It's a little bit outdated in terms of used version, but you can pretty easily refer to it.