MCPcopy Create free account
hub / github.com/NVIDIAGameWorks/Falcor / onGuiRender

Method onGuiRender

Source/Samples/Visualization2D/Visualization2D.cpp:80–116  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void Visualization2D::onGuiRender(Gui* pGui)
81{
82 Gui::Window w(pGui, "Visualization 2D", {700, 900}, {10, 10});
83 bool changed = w.dropdown("Scene selection", kModeList, reinterpret_cast<uint32_t&>(mSelectedScene));
84 if (changed)
85 {
86 createRenderPass();
87 }
88 bool paused = getGlobalClock().isPaused();
89 changed = w.checkbox("Pause time", paused);
90 if (changed)
91 {
92 if (paused)
93 {
94 getGlobalClock().pause();
95 }
96 else
97 {
98 getGlobalClock().play();
99 }
100 }
101
102 renderGlobalUI(pGui);
103 if (mSelectedScene == Scene::MarkerDemo)
104 {
105 w.text("Left-click and move mouse...");
106 }
107 else if (mSelectedScene == Scene::VoxelNormals)
108 {
109 w.text("Left-click and move mouse in the left boxes to display the normal there.");
110 w.checkbox("Show normal field", mVoxelNormalsGUI.showNormalField, false);
111 w.checkbox("Show boxes", mVoxelNormalsGUI.showBoxes, false);
112 w.checkbox("Show box diagonals", mVoxelNormalsGUI.showBoxDiagonals, false);
113 w.checkbox("Show border lines", mVoxelNormalsGUI.showBorderLines, false);
114 w.checkbox("Show box around point", mVoxelNormalsGUI.showBoxAroundPoint, false);
115 }
116}
117
118bool Visualization2D::onKeyEvent(const KeyboardEvent& keyEvent)
119{

Callers

nothing calls this directly

Calls 4

dropdownMethod · 0.80
checkboxMethod · 0.80
textMethod · 0.80
pauseMethod · 0.45

Tested by

no test coverage detected