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

Update ImGui to v1.86 #170

Merged
merged 3 commits into from
May 15, 2022
Merged

Update ImGui to v1.86 #170

merged 3 commits into from
May 15, 2022

Conversation

mworchel
Copy link
Contributor

First of all, thanks for the great framework!

I noticed that the version of the ImGui dependency is rather dated (April 2020) and incompatible with some awesome libraries like ImPlot (https://github.com/epezent/implot).

So, this PR updates the ImGui submodule from v1.76 to v1.86.

These are the "major" changes:

  1. ImGui backends are now located under imgui/backends instead of imgui/examples
  2. ImGuiCol_ModalWindowDarkening was renamed to ImGuiCol_ModalWindowDimBg
  3. The Columns API is deprecated but still functional in the file imgui_tables.cpp
  4. The power argument to ImGui::SliderFloat/ImGui::DragFloat has been replaced by a flags argument (see API breaking change in 1.78: Slider/Drag final "float power = 1.0f" arg becomes flags ocornut/imgui#3361). I replaced all appearances of power > 1 with the flags ImGuiSliderFlags_Logarithmic | ImGuiSliderFlags_NoRoundToFormat, which I think results in natural behavior for the logarithmic sliders. Feel free to double check.

All tests are passing on my machine.

@nmwsharp
Copy link
Owner

Thank you!! This looks good to me once we can get the CI checks passing.

It looks like compilation with the openGL-less "mock" backend is failing (but only on OSX for some reason?). I just took a really quick glance, but it's not clear ot me what's going on. The failure is in imgui_impl_opengl3.cpp, but I don't think that file should even be built on the mock backend. Perhaps some CMake problems? Do you see the issue?

@mworchel
Copy link
Contributor Author

mworchel commented May 12, 2022

Hm, as far as I can tell, the workflow build compiles with both the mock backend and the glfw backend (https://github.com/nmwsharp/polyscope/blob/master/.github/workflows/macos.yml#L19). Is this intended?

Unfortunately, I don't have a MacOS system to check if this is only a CI problem or if the build also fails locally. Maybe it is an issue on imgui's side with the OpenGL 3 compatibility for MacOS? (Isn't OpenGL also deprecated on MacOS?)

@nmwsharp
Copy link
Owner

Ah you're totally right, I forgot that we build with both backends in CI but only test with mock.

I just tried on a local OSX machine, and sure enough it was broken there too. Turns out new imgui version changed how the IMGUI_IMPL_OPENGL_LOADER_CUSTOM define works somehow, but now the library seems to build without it, so I just removed it. I think it's related to the new glfw backend file.

Also, I noticed the source file list changes needed to be propagated to the mock backend as well, so I went ahead and did that. I'll merge once the build passes.

@nmwsharp nmwsharp merged commit 4c173af into nmwsharp:master May 15, 2022
@nmwsharp
Copy link
Owner

Merged. Thanks again for submitting!

@mworchel
Copy link
Contributor Author

Awesome! Thanks for looking into it and applying the required fixes. Glad everything works now :)

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

Successfully merging this pull request may close these issues.

2 participants