MCPcopy Create free account
hub / github.com/LuxCoreRender/LuxCore / SaveSerialized

Method SaveSerialized

src/slg/renderstate.cpp:56–76  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56void RenderState::SaveSerialized(const std::string &fileName) {
57 SLG_LOG("Saving render state: " << fileName);
58
59 SerializationOutputFile sof(fileName);
60
61 // The following line is a workaround to a clang bug
62 RenderState *state = this;
63 sof.GetArchive() << state;
64
65 if (!sof.IsGood())
66 throw runtime_error("Error while saving serialized render state: " + fileName);
67
68 sof.Flush();
69
70 const streamoff size = sof.GetPosition();
71 if (size < 1024) {
72 SLG_LOG("Render state saved: " << size << " bytes");
73 } else {
74 SLG_LOG("Render state saved: " << (size / 1024) << " Kbytes");
75 }
76}

Callers

nothing calls this directly

Calls 3

IsGoodMethod · 0.80
FlushMethod · 0.80
GetPositionMethod · 0.80

Tested by

no test coverage detected