-
Notifications
You must be signed in to change notification settings - Fork 205
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
Update ImGui to 1.90.4 #260
Conversation
This update would be really handy! @nmwsharp : any downsides to updating ImGui in Polyscope with this now or is it an easy merge? |
Hi @jdumas and @DannyKaufman, thanks for filing this! I'm happy to update ImGUI to latest, just have a few questions to resolve about the PR (inline questions above and one more below). |
Can you try running the tests locally?
on my machine this is failing. Unfortunately this is not caught by the CI tests, since they run on headless servers they use a 'mock' backend that doesn't actually initialize imgui, the tests need to actually be run locally. I suspect there may be issues with the ImGui Context, possibly related to this change https://github.com/nmwsharp/polyscope/pull/260/files#diff-edffb23854079d0270fd0602f55895fb564f6bead31f7b88458e8e9c0f6a6c32R2328. Polyscope does some "hacky" imgui tricks storing contexts on a stack which you can see here. This complexity is to support the case of "nested show" where:
It seems that ImGui isn't really meant to support this workflow, and the current (seemingly-working) setup was found by some trial & error & inspecting ImGui internals. It's pretty likely that any change to ImGui context handling (or even just a version bump of ImGui) might break this. |
Hi @nmwsharp, thanks for the review! Regarding the nested ImGui context, it looks like a combination of two issues:
(I suggest squashing this PR when you merge it into the main branch btw...) |
I made one more small change (pushed above) to just add the imgui obsolete check in our test & demo apps (personal preference, to avoid introducing a new cmake variable). |
I was about to merge this, however I locally built and tested the demo app ( I spent a while debugging but couldn't figure out what the problem is. Unfortunately I'm out of time to look at this tonight, can you reproduce the same behavior / do you have any idea what the cause might be? |
Good call, that's probably a better fix if we want to catch this via the CI/CD anyway.
Indeed. I tried to push a different fix. Tested locally on both the docking + master branch with both the polyscope-demo app and the unit tests. I can also test on my Windows machine tomorrow for good measure. |
Thanks for the fix! That also resolved the unresponsiveness on my end. A final round of local testing revealed one more problem: scroll inputs weren't getting processed. After some debugging, it seems that ImGui has changed the order of input event processing. We need to read the input events while the frame is active or they would be cleared before reading. I moved the |
merged! thanks for the PR |
Thanks for testing on Windows, I probably should have but it's always an awful lot of work to boot up my Windows machine. That bug is indeed likely unrelated, there is some stubborn low-level bug that occasionally crops up in Windows which I have not been able to find yet. It also causes a hang in some unit tests which are currently skipped. You can see some of my efforts to debug here https://github.com/nmwsharp/polyscope/compare/test_windows_mesh_hang . One day I will get to it.... (or maybe someone else will debug it in the meantime 😄 ) |
Ahah. I keep mine permanently turned on at the office, and just remote desktop into it. It's honestly not that bad :D Anyhow, it's been a while since I've done any OpenGL so not sure I'll be able to help on this one. But I'll keep an eye out to see if it causes any inconvenience... |
No description provided.