Add support for running engine with a single-thread only (content, jobs, drawing, physics)

This commit is contained in:
Wojtek Figat
2026-02-16 16:10:31 +01:00
parent 6f13a33be2
commit d1557e5292
6 changed files with 123 additions and 12 deletions

View File

@@ -88,6 +88,7 @@ void SceneRendering::Draw(RenderContextBatch& renderContextBatch, DrawCategory c
// Draw all visual components
_drawListIndex = -1;
#if PLATFORM_THREADS_LIMIT > 1
if (_drawListSize >= 64 && category == SceneDrawAsync && renderContextBatch.EnableAsync)
{
// Run in async via Job System
@@ -97,6 +98,7 @@ void SceneRendering::Draw(RenderContextBatch& renderContextBatch, DrawCategory c
renderContextBatch.WaitLabels.Add(waitLabel);
}
else
#endif
{
// Scene is small so draw on a main-thread
DrawActorsJob(0);