Add multi-threaded scene rendering with Job System
This commit is contained in:
@@ -369,3 +369,12 @@ void JobSystem::SetJobStartingOnDispatch(bool value)
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
int32 JobSystem::GetThreadsCount()
|
||||
{
|
||||
#if JOB_SYSTEM_ENABLED
|
||||
return ThreadsCount;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -41,4 +41,9 @@ API_CLASS(Static) class FLAXENGINE_API JobSystem
|
||||
/// Sets whether automatically start jobs execution on Dispatch. If disabled jobs won't be executed until it gets re-enabled. Can be used to optimize execution of multiple dispatches that should overlap.
|
||||
/// </summary>
|
||||
API_FUNCTION() static void SetJobStartingOnDispatch(bool value);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the amount of job system threads.
|
||||
/// </summary>
|
||||
API_PROPERTY() static int32 GetThreadsCount();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user