Skip to content

Add imgui support#55

Open
Retro52 wants to merge 2 commits into
zeux:masterfrom
Retro52:ao/imgui
Open

Add imgui support#55
Retro52 wants to merge 2 commits into
zeux:masterfrom
Retro52:ao/imgui

Conversation

@Retro52
Copy link
Copy Markdown
Contributor

@Retro52 Retro52 commented Feb 6, 2026

Hi!
This PR adds ImGui support to visualize application options. I've implemented it locally to debug some issues and found it quite useful, so I decided to submit it as a PR.
I've used the most recent docking branch; however, the multiviewports feature is disabled due to how ImGui implements synchronization (see ocornut/imgui#8795).

What for?:
I think it's nice to have a compact UI overlay that allows you to:

  1. See all the options the application supports
  2. Change them dynamically w/o requiring the user to look through the source code to find a keyboard button to tweak it

Since, in my humble opinion, this project is one of the best examples out there on how to use Vulkan in complex scenarios, it may be easier to familiarise yourself with ImGui controls rather than the somewhat hidden keyboard controls.
It also allows you to display more complex UIs in the future, if necessary, including displaying images and complex widgets.

Besides that, I've changed how shader reloads are handled (a bit): instead of calling ninja directly, I use CMake, which should allow people using different generators to use this feature as well. I also embed the path to the build folder in the application, so Niagara does not depend on a specific project structure - for instance, I usually use CLion, hence my ninja.build file is generated into cmake-build-XX folder. This has nothing to do with ImGui and could be merged separately if necessary.

niagara-imgui

This commit implements ImGui initialization/shutdown and implements a new way to change debugging options.
ImGui can be disabled by tweaking NIAGARA_ENABLE_IMGUI flag in niagara.cpp (1 by default).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant