Lysa Nodes  0.0
Lysa Nodes — Scene Graph for the Lysa Engine
Project layout

Source tree

lysa_tutorial_nodes/
├── CMakeLists.txt
├── .env.cmake (user-supplied)
├── shaders/ (populated at build time)
└── src/
├── Main.cpp
├── MainWindow.ixx
└── RotatingAssetScene.ixx / .cpp

Engine and library integration

The Lysa engine and the Lysa Nodes library are both integrated as CMake subdirectories. The engine must be added before the nodes library because lysa_nodes depends on lysa_engine:

set(LYSA_ENGINE_TARGET "lysa_engine")
set(LYSA_ENGINE_TARGET_SHADERS "${LYSA_ENGINE_TARGET}_shaders")
set(LYSA_ENGINE_SHADERS_BUILD_DIR ${LYSA_ENGINE_PROJECT_DIR}/shaders)
add_subdirectory(${LYSA_ENGINE_PROJECT_DIR} external_lib_build/${LYSA_ENGINE_TARGET})
set(LYSA_NODES_TARGET "lysa_nodes")
add_subdirectory(${LYSA_NODES_PROJECT_DIR} external_lib_build/${LYSA_NODES_TARGET})

Several feature flags can be set before the add_subdirectory call to control which engine subsystems are compiled:

Variable Default Effect
LUA_BINDING OFF Lua scripting bindings
FORWARD_RENDERER ON Forward rendering pipeline
DEFERRED_RENDERER ON Deferred rendering pipeline
PHYSIC_ENGINE_JOLT OFF Jolt physics backend
PHYSIC_ENGINE_PHYSX OFF PhysX physics backend
DIRECTX_BACKEND ON (Windows only) DirectX 12 backend

Shader copy

Engine shaders are copied from the engine build directory into the project's shaders/ folder by the shaders_copy custom target, exactly as in the basic tutorial.

Application target

The build_target helper function now links against both lysa_nodes and lysa_engine. Because lysa_nodes is a CMake library target that already propagates lysa_engine as a dependency, explicitly listing lysa_engine is redundant but harmless:

function(build_target TARGET_NAME SRCS MODULES)
add_executable(${TARGET_NAME} ${SRCS})
target_sources(${TARGET_NAME}
PUBLIC FILE_SET CXX_MODULES FILES ${MODULES})
lysa_compile_options(${TARGET_NAME})
target_link_libraries(${TARGET_NAME} ${LYSA_NODES_TARGET} ${LYSA_ENGINE_TARGET})
add_dependencies(${TARGET_NAME} shaders_copy)
endfunction()

With Lysa Nodes the project source list shrinks from five files to two:

set(MY_TARGET_SRC
${SRC_DIR}/Main.cpp
${SRC_DIR}/RotatingAssetScene.cpp
)
set(MY_TARGET_MODULES
${SRC_DIR}/MainWindow.ixx
${SRC_DIR}/RotatingAssetScene.ixx
)
build_target(myapp "${MY_TARGET_SRC}" "${MY_TARGET_MODULES}")

Next : Engine context