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

Method updateGraph

Source/Falcor/RenderGraph/RenderGraphUI.cpp:628–653  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

626}
627
628void RenderGraphUI::updateGraph(RenderContext* pRenderContext)
629{
630 if (!mShouldUpdate)
631 return;
632 std::string newCommands = mpIr->getIR();
633 mpIr = std::make_shared<RenderGraphIR>(mRenderGraphName, false); // reset
634 if (mLastCommand == newCommands)
635 return;
636
637 mLastCommand = newCommands;
638 if (mRecordUpdates)
639 mUpdateCommands += newCommands;
640
641 // update reference graph to check if valid before sending to next
642 // TODO: Rendergraph scripts should be executed in an isolated scripting context.
643 Scripting::getDefaultContext().setObject("g", mpRenderGraph);
644 Scripting::runScript(newCommands);
645 if (newCommands.size())
646 mLogString += newCommands;
647
648 // only send updates that we know are valid.
649 if (mpRenderGraph->compile(pRenderContext) == false)
650 mLogString += "Graph is currently invalid\n";
651 mShouldUpdate = false;
652 mRebuildDisplayData = true;
653}
654
655void RenderGraphUI::writeUpdateScriptToFile(RenderContext* pRenderContext, const std::filesystem::path& filePath, float lastFrameTime)
656{

Callers 1

onFrameRenderMethod · 0.80

Calls 5

runScriptFunction · 0.85
getIRMethod · 0.80
setObjectMethod · 0.80
sizeMethod · 0.45
compileMethod · 0.45

Tested by

no test coverage detected