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 @@
|
||||
if (TARGET ScopeGuard)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_ScopeGuard_SourceDir ${IMGUI_NODE_EDITOR_ROOT_DIR}/external/ScopeGuard)
|
||||
set(_ScopeGuard_BinaryDir ${CMAKE_BINARY_DIR}/external/ScopeGuard)
|
||||
|
||||
add_subdirectory(${_ScopeGuard_SourceDir} ${_ScopeGuard_BinaryDir})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
ScopeGuard
|
||||
REQUIRED_VARS
|
||||
_ScopeGuard_SourceDir
|
||||
)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
if (TARGET gl3w)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_gl3w_SourceDir ${IMGUI_NODE_EDITOR_ROOT_DIR}/external/gl3w)
|
||||
set(_gl3w_BinaryDir ${CMAKE_BINARY_DIR}/external/gl3w)
|
||||
|
||||
add_subdirectory(${_gl3w_SourceDir} ${_gl3w_BinaryDir})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
gl3w
|
||||
REQUIRED_VARS
|
||||
_gl3w_SourceDir
|
||||
)
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
if (TARGET imgui)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_imgui_SourceDir ${IMGUI_NODE_EDITOR_ROOT_DIR}/external/imgui)
|
||||
set(_imgui_BinaryDir ${CMAKE_BINARY_DIR}/external/imgui)
|
||||
|
||||
add_subdirectory(${_imgui_SourceDir} ${_imgui_BinaryDir})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
imgui
|
||||
REQUIRED_VARS
|
||||
_imgui_SourceDir
|
||||
)
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
if (TARGET imgui_node_editor)
|
||||
return()
|
||||
endif()
|
||||
|
||||
#set(_imgui_node_editor_SourceDir ${IMGUI_NODE_EDITOR_ROOT_DIR})
|
||||
#set(_imgui_node_editor_BinaryDir ${CMAKE_BINARY_DIR}/NodeEditor)
|
||||
|
||||
#add_subdirectory(${_imgui_node_editor_SourceDir} ${_imgui_node_editor_BinaryDir})
|
||||
|
||||
find_package(imgui REQUIRED)
|
||||
|
||||
set(_imgui_node_editor_Sources
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/crude_json.cpp
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/crude_json.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_bezier_math.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_bezier_math.inl
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_canvas.cpp
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_canvas.cpp
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_canvas.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_canvas.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_extra_math.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_extra_math.inl
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_node_editor_api.cpp
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_node_editor_internal.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_node_editor_internal.inl
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_node_editor.cpp
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/imgui_node_editor.h
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}/misc/imgui_node_editor.natvis
|
||||
)
|
||||
|
||||
add_library(imgui_node_editor STATIC
|
||||
${_imgui_node_editor_Sources}
|
||||
)
|
||||
|
||||
target_include_directories(imgui_node_editor PUBLIC
|
||||
${IMGUI_NODE_EDITOR_ROOT_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(imgui_node_editor PUBLIC imgui)
|
||||
|
||||
source_group(TREE ${IMGUI_NODE_EDITOR_ROOT_DIR} FILES ${_imgui_node_editor_Sources})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
imgui_node_editor
|
||||
REQUIRED_VARS
|
||||
IMGUI_NODE_EDITOR_ROOT_DIR
|
||||
)
|
||||
@@ -0,0 +1,17 @@
|
||||
if (TARGET stb_image)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(_stb_image_SourceDir ${IMGUI_NODE_EDITOR_ROOT_DIR}/external/stb_image)
|
||||
set(_stb_image_BinaryDir ${CMAKE_BINARY_DIR}/external/stb_image)
|
||||
|
||||
add_subdirectory(${_stb_image_SourceDir} ${_stb_image_BinaryDir})
|
||||
|
||||
include(${CMAKE_ROOT}/Modules/FindPackageHandleStandardArgs.cmake)
|
||||
|
||||
find_package_handle_standard_args(
|
||||
stb_image
|
||||
REQUIRED_VARS
|
||||
_stb_image_SourceDir
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user