mirror of
https://github.com/ocornut/imgui.git
synced 2026-10-29 07:54:40 +00:00
Proposal: Optional zero-cost ImDrawList hooks for vector / alternative backends #9556
Labels
No labels
accidentally closed
android
backends
bug
building
clipper
coloredit
color spaces
cplusplus
data types
demo
disabled
doc
docking
dpi
drag drop
drawing/drawlist
dropped
dx12
enhancement
focus
font/text
gallery
help wanted
idle/power saving
ime
in progress
inputs
inputtext
internals
label/id and id stack
language bindings
layout
linux/bsd
menus
multi-contexts
multi-threading
multi-viewports
nav
news/info
opengl
optimization
osx/ios
overlap
plot/graph
popups
question
scrolling
selection
settings
sliders/drags
style
tables/columns
tabs
test wanted
tools
tooltips
tree
tricks & tips
useful widgets
vulkan
web
window pos/depth
window sizing
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
ocornut/imgui#9556
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Hi,
I built a vector backend for Dear ImGui using ThorVG:
https://github.com/hotredman/imthorgui
To render true vector shapes, I need to intercept primitives (
AddRectFilled,AddText, etc.) at theImDrawListlevel.I added minimal hook macros in
imgui_draw.cpp(zero runtime overhead when disabled, following theIMGUI_ENABLE_TEST_ENGINEpattern).Only 2 small commits in my fork:
https://github.com/hotredman/imgui/commits/drawlist-hooks
Would you be open to a clean PR adding these optional hooks upstream?
I'm generally supportive of those efforts but I feel the hooks could be added on your side for a while.
If there's a proven lasting interest in the feature and your solution we can consider adding the hooks but for now they seem pretty simple to add on your side?
May I ask - wouldn't it simpler to add a define to remove the
ImDrawListimplementation, and let you compile with your own?I'm generally supportive of those efforts but I feel the hooks could be added on your side for a while.
If there's a proven lasting interest in the feature and your solution we can consider adding the hooks but for now they seem pretty simple to add on your side?
May I ask - wouldn't it simpler to add a define to remove the
ImDrawListimplementation, and let you compile with your own?