Add imgui support#55
Open
Retro52 wants to merge 2 commits into
Open
Conversation
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).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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.buildfile is generated intocmake-build-XX folder. This has nothing to do with ImGui and could be merged separately if necessary.