STAGE_KEEP_RENDERING = 1 << 1, ///< - Stage::KeepRendering() is being used
ANIMATIONS_RUNNING = 1 << 2, ///< - Animations are ongoing
MONITORING_PERFORMANCE = 1 << 3, ///< - The --enable-performance-monitor option is being used
- RENDER_TASK_SYNC = 1 << 4 ///< - A render task is waiting for render sync
+ RENDER_TASK_SYNC = 1 << 4, ///< - A render task is waiting for render sync
+ FRAME_UPDATE_CALLBACK = 1 << 5 ///< - Some FrameUpdateCallback return true.
};
}
uint32_t keepUpdating = 0;
bool keepRendererRendering = false;
+ bool keepRendererRenderingByFrameUpdateCallback = false;
+
mImpl->renderingRequired = false;
// Although the scene-graph may not require an update, we still need to synchronize double-buffered
// Call the frame-callback-processor if set
if(mImpl->frameCallbackProcessor)
{
- keepRendererRendering |= mImpl->frameCallbackProcessor->Update(bufferIndex, elapsedSeconds);
+ keepRendererRenderingByFrameUpdateCallback |= mImpl->frameCallbackProcessor->Update(bufferIndex, elapsedSeconds);
}
// Update node hierarchy, apply constraints,
keepUpdating |= KeepUpdating::STAGE_KEEP_RENDERING;
}
- if(keepUpdating & KeepUpdating::STAGE_KEEP_RENDERING)
+ if(keepRendererRenderingByFrameUpdateCallback)
+ {
+ keepUpdating |= KeepUpdating::FRAME_UPDATE_CALLBACK;
+ }
+
+ if(keepUpdating & (KeepUpdating::STAGE_KEEP_RENDERING | KeepUpdating::FRAME_UPDATE_CALLBACK))
{
// Set dirty flags for next frame to continue rendering
mImpl->nodeDirtyFlags |= RenderableUpdateFlags;