Don't redundantly call notify on every frame.

pull/593/head
madsbuvi 4 years ago
parent 5b9a2b73b0
commit f3e17e7c52

@ -44,7 +44,7 @@ namespace MWRender
void operator () (osg::RenderInfo& renderInfo) const override void operator () (osg::RenderInfo& renderInfo) const override
{ {
std::lock_guard<std::mutex> lock(mMutex); std::lock_guard<std::mutex> lock(mMutex);
if (renderInfo.getState()->getFrameStamp()->getFrameNumber() >= mFrame) if (renderInfo.getState()->getFrameStamp()->getFrameNumber() >= mFrame && !mDone)
{ {
mDone = true; mDone = true;
mCondition.notify_one(); mCondition.notify_one();

Loading…
Cancel
Save