| 653 | } |
| 654 | |
| 655 | void RenderGraphUI::writeUpdateScriptToFile(RenderContext* pRenderContext, const std::filesystem::path& filePath, float lastFrameTime) |
| 656 | { |
| 657 | if ((mTimeSinceLastUpdate += lastFrameTime) < kUpdateTimeInterval) |
| 658 | return; |
| 659 | mTimeSinceLastUpdate = 0.0f; |
| 660 | if (!mUpdateCommands.size()) |
| 661 | return; |
| 662 | |
| 663 | // only send delta of updates once the graph is valid |
| 664 | if (mpRenderGraph->compile(pRenderContext) == false) |
| 665 | return; |
| 666 | std::ofstream outputFileStream(filePath, std::ios_base::out); |
| 667 | outputFileStream << mUpdateCommands; |
| 668 | mUpdateCommands.clear(); |
| 669 | } |
| 670 | |
| 671 | RenderGraphUI::RenderGraphUI() : mNewNodeStartPosition(-40.0f, 100.0f) |
| 672 | { |
no test coverage detected