-
Notifications
You must be signed in to change notification settings - Fork 32
Description
Trying to update to 1.92.x and keep hitting more edge cases.
ImDrawListSharedData struct is defined in imgui_internal.h while being used all throughout imgui.h. However, since normally only imgui.h is included when processing imgui.h, what ends up happening is that dear_bindings never knows nothing about ImDrawListSharedData except for the mere fact it exists, so the type is silently emitted as empty, with no fields:
{
"name": "ImDrawListSharedData",
"original_fully_qualified_name": "ImDrawListSharedData",
"kind": "struct",
"by_value": false,
"has_placement_constructor": false,
"forward_declaration": true,
"is_anonymous": false,
"fields": [],
"comments": {
"attached": "// Data shared among multiple draw lists (typically owned by parent ImGui context, but you may create one yourself)"
},
"is_internal": false,
"source_location": {
"filename": "imgui.h",
"line": 171
}
},
Honestly, not sure if this just wasn't noticed before, or it is a result of recent-ish changes, but the way dear_bindings works, it expects ImDrawListSharedData to be fully defined in imgui.h.
Possible solutions/workarounds:
- ImDrawListSharedData's definition is moved from
imgui_internal.htoimgui.hin dear imgui itself - Include
imgui_internal.heven if only intending to generate a wrapper forimgui.h. EDIT: this should work, but somehow doesn't. ImDrawListSharedData is still empty in every generated file
Are there any other types that behave weirdly like that? Are we able to detect those cases and throw an error instead of silently outputting invalid output?