v1.64
v1.64: End of summer refactoring
See https://github.com/ocornut/imgui for the project homepage.
See https://github.com/ocornut/imgui/releases for earlier release notes.
See https://github.com/ocornut/imgui/wiki for language/framework bindings, links, 3rd parties helpers/extensions.
New users: go to https://discourse.dearimgui.org for technical support.
Update: the initial version of this release was missing an include that affected compilation on some systems (e.g. Linux, Visual Studio 2008, etc. The include has been added and the release has been retagged shortly after.
TL;DR
- If you don't have any modification to imgui.cpp you can update with no trouble.
- If you have ANY modification to imgui.cpp, or intend to make some, please read carefully.
- If your project/build system doesn't automatically grabs all the
*.cpp
file when building, addimgui_widgets.cpp
to your build list.
What? Didn't I release 1.63 exactly two days ago? Those who read the release note for 1.63 (everyone loves reading release notes, right?) saw it coming... This release has zero functional change but consist in a large refactor were many functions were moved around, a new file imgui_widgets.cpp
was added to the source code.
This was something I've been wanting to do for a long time, and in particular I wanted to do it before making the upcoming Docking branch public. The new layout is much saner as functions were all grouped by family and in saner chunks. The Viewport branch has also been updated (~4 hours of rebasing/merging fun).
Changes
- Moved README, CHANGELOG and TODO files to the docs/ folder.
If you are updating dear imgui by copying files, remember to delete the old files. - Added imgui_widgets.cpp file, extracted and moved widgets code out of imgui.cpp into imgui_widgets.cpp.
Re-ordered some of the code remaining in imgui.cpp.
FUNCTIONS HAVE NOT CHANGED. THE CODE IS SEMANTICALLY 100% IDENTICAL, BUT EVERY FUNCTIONS HAS BEEN MOVED.
Because of this, any local modifications to imgui.cpp will likely conflict when you update.
If you have any modifications to imgui.cpp, it is suggested that you first update to 1.63, then
isolate your patches. You can peak at imgui_widgets.cpp from 1.64 to get a sense of what is included in it,
then separate your changes into several patches that can more easily be applied to 1.64 on a per-file basis.
What I found worked nicely for me, was to open the diff of the old patches in an interactive merge/diff tool,
search for the corresponding function in the new code and apply the chunks manually. - As a reminder, if you have any change to imgui.cpp it is a good habit to discuss them on the github,
so a solution applicable on the Master branch can be found. If your company has changes that you cannot
disclose you may also contact me privately.
Argh
If you are have any issue feels to post/discuss in #2036, there's also a list of commits linked to this issue #.
The refactor has been split in several commits in order to make sure every commit consist of a neat "removed functions here / added functions here" in diff tools, instead of a single commit that would be impossible to decipher.
In addition, the split commits makes it easier to perform a full rebase on Master if you need to, as your conflicts will be isolated. Knowing that functions were only moved makes the manual conflict solving experience a little less painful.
CMake?
If you have any affinity with using CMake, there is a Pull Request #1713 by @podsvirov that implement CMake files to build both the library and examples. In particular, building/linking the examples has been tricky to maintain across all platforms and SDK/library versions so this is helpful. In the future I hope to transition examples/ to use project files generated by cmake and/or premake.