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

Method createNewGraph

Source/Tools/RenderGraphEditor/RenderGraphEditor.cpp:482–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

480}
481
482void RenderGraphEditor::createNewGraph(const std::string& renderGraphName)
483{
484 std::string graphName = renderGraphName;
485 auto nameToIndexIt = mGraphNamesToIndex.find(graphName);
486 ref<RenderGraph> newGraph = RenderGraph::create(getDevice());
487
488 std::string tempGraphName = graphName;
489 while (mGraphNamesToIndex.find(tempGraphName) != mGraphNamesToIndex.end())
490 {
491 tempGraphName.append("_");
492 }
493 // Matt TODO can we put the GUI dropdown code in a shared function shared with 'loadFromFile'?
494 graphName = tempGraphName;
495 newGraph->setName(graphName);
496 mCurrentGraphIndex = mpGraphs.size();
497 mpGraphs.push_back(newGraph);
498 mRenderGraphUIs.push_back(RenderGraphUI(newGraph, graphName));
499
500 Gui::DropdownValue nextGraphID;
501 mGraphNamesToIndex.insert(std::make_pair(graphName, static_cast<uint32_t>(mCurrentGraphIndex)));
502 nextGraphID.value = static_cast<int32_t>(mOpenGraphNames.size());
503 nextGraphID.label = graphName;
504 mOpenGraphNames.push_back(nextGraphID);
505}
506
507void RenderGraphEditor::onFrameRender(RenderContext* pRenderContext, const ref<Fbo>& pTargetFbo)
508{

Callers

nothing calls this directly

Calls 9

RenderGraphUIClass · 0.85
createFunction · 0.50
getDeviceFunction · 0.50
endMethod · 0.45
appendMethod · 0.45
setNameMethod · 0.45
sizeMethod · 0.45
push_backMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected