Adding a visual node editor
Like in the previous chapters, we will use an open-source tool to build our visual node editor instead of building our own solutions by hand. There are several ImGui-based node editors available. You can find a curated list in the Additional resources section.
In this chapter, we will use the extension called imnodes by Johann “Nelarius” Muszynski. The source code for imnodes is available on GitHub:
https://github.com/Nelarius/imnodes
Like in the previous chapters, we will use CMake to fetch imnodes for us.
Integrating imnodes by using CMake
To let CMake manage imnodes as a dependency, add a new FetchContent
block to the file CMakeLists.txt
in the project root between the FetchContent
block for stbi
and the WIN32
-only area:
FetchContent_Declare(
imnodes
GIT_REPOSITORY https://github.com/Nelarius/imnodes
GIT_TAG v0.5
)
We will use the Git tag v0.5
here to avoid problems introduced by new commits to the master...