feat(shaders_lab): visual node editor (imgui-node-editor) + multi-source
- cpp/vendor/imgui-node-editor: vendorized thedmd/imgui-node-editor v0.9.4 - cpp/functions/gfx/dag_node_editor: new visual pipeline editor replacing dag_panel - DagStep: source_ids[4] + editor_pos + editor_uid (multi-input support) - DagNodeDef: num_inputs explicit; circle reclassified as Op - dag_compile: N inputs per node, topological ordering preserved - main: use node editor; destroy on shutdown - patch imgui_extra_math.inl: guard operator*(float, ImVec2) for imgui >= 18955 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "gfx/dag_types.h"
|
||||
|
||||
namespace fn::gfx {
|
||||
|
||||
// Renders the visual node editor (imgui-node-editor) inside the current ImGui::Begin.
|
||||
// Modifies pipeline in-place: add/remove nodes, manage edges (source_ids).
|
||||
// Returns true if TOPOLOGY changed (nodes or edges added/removed).
|
||||
// Does not return true for position moves or slider changes.
|
||||
// Call once per frame. Maintains its own editor context (static singleton).
|
||||
bool dag_node_editor(std::vector<DagStep>& pipeline);
|
||||
|
||||
// Release editor resources. Call on shutdown.
|
||||
void dag_node_editor_destroy();
|
||||
|
||||
} // namespace fn::gfx
|
||||
Reference in New Issue
Block a user