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:
@@ -11,11 +11,13 @@ add_imgui_app(shaders_lab
|
||||
${CMAKE_SOURCE_DIR}/functions/gfx/dag_compile.cpp
|
||||
${CMAKE_SOURCE_DIR}/functions/gfx/dag_uniforms.cpp
|
||||
${CMAKE_SOURCE_DIR}/functions/gfx/dag_panel.cpp
|
||||
${CMAKE_SOURCE_DIR}/functions/gfx/dag_node_editor.cpp
|
||||
${CMAKE_SOURCE_DIR}/functions/core/fps_overlay.cpp
|
||||
)
|
||||
target_include_directories(shaders_lab PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_link_libraries(shaders_lab PRIVATE imgui_node_editor)
|
||||
|
||||
if(WIN32)
|
||||
# GUI app: sin consola al lanzar (subsystem:windows / -mwindows)
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "gfx/dag_compile.h"
|
||||
#include "gfx/dag_uniforms.h"
|
||||
#include "gfx/dag_panel.h"
|
||||
#include "gfx/dag_node_editor.h"
|
||||
#include "core/fps_overlay.h"
|
||||
#include "seed_shaders.h"
|
||||
|
||||
@@ -142,7 +143,7 @@ static void render() {
|
||||
|
||||
// --- DAG Pipeline window ---
|
||||
if (ImGui::Begin("DAG Pipeline")) {
|
||||
if (fn::gfx::dag_panel(g_pipeline)) {
|
||||
if (fn::gfx::dag_node_editor(g_pipeline)) {
|
||||
g_dag_dirty = true;
|
||||
}
|
||||
draw_err(g_dag_err, g_dag_err_line);
|
||||
@@ -205,5 +206,6 @@ int main() {
|
||||
int rc = fn::run_app(cfg, render);
|
||||
fn::gfx::canvas_destroy(g_canvas_code);
|
||||
fn::gfx::canvas_destroy(g_canvas_dag);
|
||||
fn::gfx::dag_node_editor_destroy();
|
||||
return rc;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user