| 161 | } |
| 162 | |
| 163 | void RuntimeWrapper::waitForNextRenderRequest() { |
| 164 | auto totalRenderCount = runtimeListener->numberOfRenders + 1; |
| 165 | auto str = fmt::format("Waiting for next render, total render count {}", totalRenderCount); |
| 166 | logger->log(Valdi::LogTypeInfo, str); |
| 167 | try { |
| 168 | mainQueue->runUntilTrue(str.c_str(), |
| 169 | [&]() -> bool { return runtimeListener->numberOfRenders == totalRenderCount; }); |
| 170 | } catch (const Valdi::Exception& exc) { |
| 171 | VALDI_ERROR( |
| 172 | *logger, "Failed to wait for {} renders, reached {}", totalRenderCount, runtimeListener->numberOfRenders); |
| 173 | throw exc; |
| 174 | } |
| 175 | } |
| 176 | |
| 177 | // Replace a resource from another existing resource to test hot reloading. |
| 178 | Result<Void> RuntimeWrapper::hotReload(const char* sourceResourcePath, const char* destResourcePath) { |
no test coverage detected