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

Method beginFrame

Source/Mogwai/Extensions/Capture/CaptureTrigger.cpp:94–119  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

92 }
93
94 void CaptureTrigger::beginFrame(RenderContext* pRenderContext, const ref<Fbo>& pTargetFbo)
95 {
96 RenderGraph* pGraph = mpRenderer->getActiveGraph();
97 if (!pGraph) return;
98 uint64_t frameId = mpRenderer->getGlobalClock().getFrame();
99 if (mGraphRanges.find(pGraph) == mGraphRanges.end()) return;
100 const auto& ranges = mGraphRanges.at(pGraph);
101
102 if (mCurrent.pGraph)
103 {
104 FALCOR_ASSERT(pGraph == mCurrent.pGraph);
105 return;
106 }
107
108 // Check if we need to start a range
109 for (auto& r : ranges)
110 {
111 if (r.first == frameId)
112 {
113 mCurrent.pGraph = pGraph;
114 mCurrent.range = r;
115 beginRange(pGraph, r);
116 break;
117 }
118 }
119 }
120
121 void CaptureTrigger::endFrame(RenderContext* pRenderContext, const ref<Fbo>& pTargetFbo)
122 {

Callers

nothing calls this directly

Calls 2

getActiveGraphMethod · 0.80
endMethod · 0.45

Tested by

no test coverage detected