Proposal: Optional zero-cost ImDrawList hooks for vector / alternative backends
Author: hotredmanCreated Sep 24, 2026Updated Sep 27, 2026
Labelsdrawing/drawlist
Hi,
I built a vector backend for Dear ImGui using ThorVG:
https://github.com/hotredman/omnigui
To render true vector shapes, I need to intercept primitives (AddRectFilled, AddText, etc.) at the ImDrawList level.
I added minimal hook macros in imgui_draw.cpp (zero runtime overhead when disabled, following the IMGUI_ENABLE_TEST_ENGINE pattern).
Only 2 small commits in my fork:
https://github.com/hotredman/imgui-hooked
Would you be open to a clean PR adding these optional hooks upstream?
Source: ocornut/imgui