Files
fn_registry/cpp/functions/gfx/dag_panel.md
T
egutierrez 5d83c11169 feat(shaders_lab): DAG pipeline mode with node catalog
- cpp/functions/gfx/dag_types: DagStep, DagNodeDef, DagControl (header-only)
- cpp/functions/gfx/dag_catalog: 10 hardcoded nodes (4 gen, 3 op, 3 blend) ported from shader-dag-blends.jsx
- cpp/functions/gfx/dag_compile: pipeline → GLSL 330 core with fan-in via source_id
- cpp/functions/gfx/dag_uniforms: upload u_params[16] via glUniform4fv
- cpp/functions/gfx/dag_panel: ImGui pipeline editor (add/remove/reorder/controls)
- main.cpp: Code/DAG mode toggle, per-mode compile path and uniforms
- gl_loader: +glUniform4fv
- rebuild Windows .exe

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-24 21:15:21 +02:00

1.9 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, framework, params, output
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path framework params output
dag_panel component cpp gfx 1.0.0 impure bool dag_panel(std::vector<DagStep>& pipeline) Panel ImGui para editar un pipeline DAG de shaders. Toolbar con Add Node (popup por kind) y Clear. Lista scrollable de pasos con CollapsingHeader coloreado por kind, selector de source para blends, widgets de control (Slider/XY/Color) y botones Move Up/Down/Delete. Devuelve true si la topologia cambio.
dag
shader
imgui
pipeline
editor
gfx
component
dag_catalog_cpp_gfx
dag_types_cpp_gfx
false error_go_core
dag_panel
dag_catalog
dag_types
imgui
algorithm
string
vector
false
cpp/functions/gfx/dag_panel.cpp imgui
name desc
pipeline Vector de DagStep modificado in-place. Add/Delete/Move cambian la topologia. Los sliders solo cambian params.
true si la topologia cambio (add/delete/move/source_id change). false si solo cambiaron valores de params (sliders). El caller usa este flag para decidir si recompilar el shader.

Estructura del panel

[+ Add Node]  [N/16 nodes]  [Clear]
─────────────────────────────────────
▼ #0 plasma [Gen]
    velocidad  [slider]
    escala     [slider]
    [Move Up(disabled)] [Move Down] [Delete]

▶ #1 blend_mix [Blend]
    ...

Colores por kind

  • Gen: azul (0.25, 0.55, 0.90)
  • Op: violeta (0.65, 0.40, 0.90)
  • Blend: ambar (0.90, 0.65, 0.15)

Notas

Los IDs de paso se generan con contador estatico s_next_id. Unicos dentro de la sesion. Al anadir un Blend, asigna automaticamente el source_id al paso de hace dos (o el primero si el pipeline tiene menos de 2 pasos). Las mutaciones (delete/move) se aplican al final del loop para no invalidar iteradores.