Closed katotetsuro closed 5 years ago
hey @katotetsuro , thanks I am looking to use more than one ofxImGui instance around the classes of my ofApp. Can this branch use the contexts you made to do this? Do you know if it should work with today current master branch/ImGui version?
I didn't test, but theoretically it should work for your case. Because this PR make each ofxImGui instance holds ImGuiContext.
Do you know if it should work with today current master branch/ImGui version?
Sorry, I don't know about it.
BTW, this repository doesn't seem to be active, so I'll close this PR.
hey @katotetsuro , thanks for your branch and PR! has been very helpful to me.
I tested your branch into my current project and it works! so is up to date enough to make a push...
I tried too with more instances (in other classes) in same window and works fine! When using an instance only or two, do not crash on exit. (your multi window examples crashes here too in macOS)
(@jordiexvision, I see you was looking for this in another issue..)
@jvcleave , this could be maybe a good improvement... not only the multi window support (that crashes) but also the multiple instances too. So we can use ImGui as gui for different classes.
Hi @moebiussurfing , thank you for detailed report. I'm glad to help you!!
If request would come, I'll reopen this PR soon.
hey @katotetsuro , https://github.com/jvcleave/ofxImGui now has been updated to
latest ImGui: 1.77 WIP. Docking function is available. #104
I still missing the feature of your fork because of that multi-context, that allows me to use many classes with his own independent ImGui.
Do you think it's easy to update? Can you make some tip to do it myself?
Cheers
hey sorry, I did it myself. I looked at your code it was very simple, just like 4 lines. https://github.com/katotetsuro/ofxImGui/commit/c8e9c8668419c3a191a2442c9eb04593ed832e90 It compiles fine. But it seems my addons are colliding when more than one ImGui is opened. I must check better... Thanks again, it's being helpful here.
Summary
I modified ImGui's context handling so that I can handle multi window app which has ofxImGui at each windows. In current master, there are several problems at multi window situation.
About test app
I added small app named 'example-multiwindow'.
I think you can check by following steps.
Tested env
'example-multiwindow' might be unnecessary for master, I can rebase or remove that before merge.
Thank you for your great addon, any feedback is very welcome.!