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

Method selectNextGraph

Source/Mogwai/MogwaiSettings.cpp:170–189  ·  view source on GitHub ↗

DEMO21 Opera

Source from the content-addressed store, hash-verified

168
169 // DEMO21 Opera
170 void MogwaiSettings::selectNextGraph()
171 {
172 if (mpRenderer->mGraphs.size() < 2)
173 {
174 return;
175 }
176 // Get the index of the current graph
177 const RenderGraph* curGraph = mpRenderer->getActiveGraph();
178 uint32_t curIdx = 0;
179 while (curIdx < mpRenderer->mGraphs.size())
180 {
181 if (mpRenderer->mGraphs[curIdx].pGraph.get() == curGraph)
182 {
183 break;
184 }
185 ++curIdx;
186 }
187 assert(curIdx < mpRenderer->mGraphs.size());
188 mpRenderer->setActiveGraph((curIdx + 1) % mpRenderer->mGraphs.size());
189 }
190
191 void MogwaiSettings::renderGraphs(Gui* pGui)
192 {

Callers

nothing calls this directly

Calls 5

assertFunction · 0.85
getActiveGraphMethod · 0.80
setActiveGraphMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected