hints for docking branch: update imgui-cpp submodule to 505f19e3b00 (docking, ocornut 2022-04-05) #274
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Note: this PR cannot be merged to the docking branch, as of now (since the docking branch which should match the commit: ocornut/imgui@2565945 from 15 March 2021). However it could help later, when the imgui docking branch is updated. It reflects some API change in the cpp code.
1. Adaptations done inside pyimgui:
setup.py:
common_flags = ['-std=c++11']
added toextra_compile_args
(required since imgui started to use constexpr)
IsClippedEx
new signature:=> impacts one line in AnsiTextColored.cpp
GetContentRegionAvailWidth()
replaced byGetContentRegionAvail().x
=> remove declaration in cimgui.pxd and impl in core.pyx,
adapt one commented line in testwindow.py,
ImGuiColorEditFlags__OptionsDefault
renamed toImGuiColorEditFlags_DefaultOptions_
=> one line changed in core.pyx and enums.pxd
ImGuiNavMoveFlags_ScrollToEdge
renamed toImGuiNavMoveFlags_ScrollToEdgeY
=> renamed
NAV_MOVE_SCROLL_TO_EDGE
toNAV_MOVE_SCROLL_TO_EDGE_Y
inside internal.pyx and enums_internal.pxd,
2. Merged latest version of the branch dev/version-2.0
3. (Incomplete - advice needed) Corrected tests
In the tests, calls to
imgui.new_frame()
fail is no backend is initialized, we get the error below:So, I tried to add `dummy_glfw_init.py, which provides only one function: create_dummy_glfw_renderer()
that will instantiate a glfw renderer backend.
With that, the tests work on my side. However they fail in CI (when loading OpenGL).
I don't know if that is a correct solution, or if we should try to trick imgui into thinking that a backend was initialized, even though it was not.