Skip to content

Fix for ImGui 1.92.8: AddRect/PathStroke arg swap#339

Open
pthom wants to merge 1 commit into
thedmd:masterfrom
pthom:fix_imgui_v1.92.8
Open

Fix for ImGui 1.92.8: AddRect/PathStroke arg swap#339
pthom wants to merge 1 commit into
thedmd:masterfrom
pthom:fix_imgui_v1.92.8

Conversation

@pthom
Copy link
Copy Markdown

@pthom pthom commented May 12, 2026

See https://github.com/ocornut/imgui/releases/tag/v1.92.8

There is a breaking change: "DrawList: swapped the last two arguments of AddRect(), AddPolyline(), PathStroke()"

Gate the 4 affected call sites (1 PathStroke + 3 AddRect) on IMGUI_VERSION_NUM < 19276

Note:

The change below in imgui_node_editor.cpp deserves some attention:

#if IMGUI_VERSION_NUM < 19276
        drawList->PathStroke(color, true, strokeThickness);
#else
        drawList->PathStroke(color, strokeThickness, ImDrawFlags_Closed);
#endif

Because the old call

drawList->PathStroke(color, true, strokeThickness);

was passing "true" as a flag. This was changed to ImDrawFlags_Closed (which is always equal to 1).

Gate the 4 affected call sites (1 PathStroke + 3 AddRect) on
IMGUI_VERSION_NUM < 19276 — last two args (flags, thickness) were
swapped to (thickness, flags) in ocornut/imgui v1.92.8.
@ocornut ocornut mentioned this pull request May 13, 2026
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.

1 participant