|
@@ -14472,6 +14472,14 @@ void ImGui::DebugNodeColumns(ImGuiOldColumns* columns)
|
|
|
TreePop();
|
|
|
}
|
|
|
|
|
|
+static void FormatTextureIDForDebugDisplay(char* buf, int buf_size, const ImTextureID& tex_id)
|
|
|
+{
|
|
|
+ if (sizeof(tex_id) >= sizeof(void*))
|
|
|
+ ImFormatString(buf, buf_size, "0x%p", (void*)*(intptr_t*)(void*)&tex_id);
|
|
|
+ else
|
|
|
+ ImFormatString(buf, buf_size, "0x%04X", *(int*)(void*)&tex_id);
|
|
|
+}
|
|
|
+
|
|
|
// [DEBUG] Display contents of ImDrawList
|
|
|
void ImGui::DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, const ImDrawList* draw_list, const char* label)
|
|
|
{
|
|
@@ -14508,10 +14516,11 @@ void ImGui::DebugNodeDrawList(ImGuiWindow* window, ImGuiViewportP* viewport, con
|
|
|
continue;
|
|
|
}
|
|
|
|
|
|
+ char texid_desc[20];
|
|
|
+ FormatTextureIDForDebugDisplay(texid_desc, IM_ARRAYSIZE(texid_desc), pcmd->TextureId);
|
|
|
char buf[300];
|
|
|
- ImFormatString(buf, IM_ARRAYSIZE(buf), "DrawCmd:%5d tris, Tex 0x%p, ClipRect (%4.0f,%4.0f)-(%4.0f,%4.0f)",
|
|
|
- pcmd->ElemCount / 3, (void*)(intptr_t)pcmd->TextureId,
|
|
|
- pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w);
|
|
|
+ ImFormatString(buf, IM_ARRAYSIZE(buf), "DrawCmd:%5d tris, Tex %s, ClipRect (%4.0f,%4.0f)-(%4.0f,%4.0f)",
|
|
|
+ pcmd->ElemCount / 3, texid_desc, pcmd->ClipRect.x, pcmd->ClipRect.y, pcmd->ClipRect.z, pcmd->ClipRect.w);
|
|
|
bool pcmd_node_open = TreeNode((void*)(pcmd - draw_list->CmdBuffer.begin()), "%s", buf);
|
|
|
if (IsItemHovered() && (cfg->ShowDrawCmdMesh || cfg->ShowDrawCmdBoundingBoxes) && fg_draw_list)
|
|
|
DebugNodeDrawCmdShowMeshAndBoundingBox(fg_draw_list, draw_list, pcmd, cfg->ShowDrawCmdMesh, cfg->ShowDrawCmdBoundingBoxes);
|