File tree Expand file tree Collapse file tree 2 files changed +8
-3
lines changed
Expand file tree Collapse file tree 2 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -113,9 +113,12 @@ void Frame::renderFrame()
113113 auto *state = deviceState ();
114114 state->commitBuffer .flush ();
115115
116- const char *filename = " live_capture.tsd" ;
117- reportMessage (ANARI_SEVERITY_INFO, " exporting scene to '%s'" , filename);
118- tsd::io::save_Scene (state->scene , filename);
116+ if (m_lastCommitFlushOccured < state->commitBuffer .lastObjectFinalization ()) {
117+ m_lastCommitFlushOccured = state->commitBuffer .lastObjectFinalization ();
118+ const char *filename = " live_capture.tsd" ;
119+ reportMessage (ANARI_SEVERITY_INFO, " exporting scene to '%s'" , filename);
120+ tsd::io::save_Scene (state->scene , filename);
121+ }
119122
120123 anari::render (state->device , m_anariFrame);
121124}
Original file line number Diff line number Diff line change @@ -48,6 +48,8 @@ struct Frame : public helium::BaseFrame
4848 helium::IntrusivePtr<TSDObject> m_camera;
4949
5050 anari::Frame m_anariFrame{nullptr };
51+
52+ helium::TimeStamp m_lastCommitFlushOccured{0 };
5153};
5254
5355} // namespace tsd_device
You can’t perform that action at this time.
0 commit comments