Skip to content

Commit 287517c

Browse files
committed
DPL GUI: do coarse culling of device graph
Makes it possible to run with large number of nodes, as long as they are scattered enough in the layout.
1 parent feb6a0e commit 287517c

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

Framework/Core/src/FrameworkGUIDevicesGraph.cxx

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,15 @@ void showTopologyNodeGraph(WorkspaceGUIState& state,
461461
ImVec2 node_rect_max = node_rect_min + node->Size;
462462
ImVec2 node_rect_title = node_rect_min + ImVec2(node->Size.x, 24);
463463

464+
if (node_rect_min.x > 20 + 2 * NODE_WINDOW_PADDING.x + state.leftPaneSize + graphSize.x) {
465+
ImGui::PopID();
466+
continue;
467+
}
468+
if (node_rect_min.y > 20 + 2 * NODE_WINDOW_PADDING.y + toolbarSize.y + graphSize.y) {
469+
ImGui::PopID();
470+
continue;
471+
}
472+
464473
// Display node box
465474
draw_list->ChannelsSetCurrent(backgroundLayer); // Background
466475
ImGui::SetCursorScreenPos(node_rect_min);

0 commit comments

Comments
 (0)