MCPcopy Create free account
hub / github.com/NVIDIA-RTX/RTXPT / CaptureScriptManager

Method CaptureScriptManager

Rtxpt/SampleCommon/CaptureScriptManager.cpp:26–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24using namespace donut::engine;
25
26CaptureScriptManager::CaptureScriptManager(Sample & sample, SampleUIData & sampleUI, const CommandLineOptions & cmdLine)
27 : m_app(sample), m_ui(sampleUI), m_cmdLine(cmdLine)
28{
29 if (m_cmdLine.capturePath != "")
30 {
31 m_screenshotFileName = m_cmdLine.capturePath;
32
33 if (m_cmdLine.captureSimple)
34 {
35 m_type = 0;
36 m_start = true;
37 m_resetAndWarmup = true;
38 m_exitAfterCapture = true;
39 }
40
41 if (m_cmdLine.captureSequence && m_cmdLine.sequenceFPS > 0 && m_cmdLine.sequenceFrameCount > 0)
42 {
43 m_type = 1;
44 m_start = true;
45 assert( m_cmdLine.sequenceWarmupStart >= 0 );
46 assert( m_cmdLine.sequenceWarmupStart < m_cmdLine.sequenceRecordStart );
47 assert( m_cmdLine.sequenceFPS >= 1 && m_cmdLine.sequenceFPS <= 1000 );
48 m_sequenceDeltaTime = 1.0 / m_cmdLine.sequenceFPS;
49 m_sequenceBeginTime = m_cmdLine.sequenceWarmupStart;
50 m_sequenceRecordStartTime = m_cmdLine.sequenceRecordStart;
51
52 m_resetAndWarmupFrames = (int)((m_cmdLine.sequenceRecordStart - m_cmdLine.sequenceWarmupStart) / m_sequenceDeltaTime + 1e-6);
53 m_resetAndWarmup = true;
54 m_sequenceRecordFrames = m_cmdLine.sequenceFrameCount;
55 m_exitAfterCapture = true;
56 assert( !m_cmdLine.stopAnimations ); // doesn't really make sense
57 }
58 }
59}
60
61CaptureScriptManager::~CaptureScriptManager()
62{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected