MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Execute

Method Execute

Source/Engine/Particles/Particles.cpp:1749–1769  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1747}
1748
1749void ParticlesSystem::Execute(TaskGraph* graph)
1750{
1751 if (UpdateList.Count() == 0)
1752 return;
1753 Active = true;
1754
1755 // Ensure no particle assets can be reloaded/modified during async update
1756 Particles::SystemLocker.ReadLock();
1757
1758 // Setup data for async update
1759 const auto& tickData = Time::Update;
1760 DeltaTime = tickData.DeltaTime.GetTotalSeconds();
1761 UnscaledDeltaTime = tickData.UnscaledDeltaTime.GetTotalSeconds();
1762 Time = tickData.Time.GetTotalSeconds();
1763 UnscaledTime = tickData.UnscaledTime.GetTotalSeconds();
1764
1765 // Schedule work to update all particles in async
1766 Function<void(int32)> job;
1767 job.Bind<ParticlesSystem, &ParticlesSystem::Job>(this);
1768 graph->DispatchJob(job, UpdateList.Count());
1769}
1770
1771void ParticlesSystem::PostExecute(TaskGraph* graph)
1772{

Callers

nothing calls this directly

Calls 2

DispatchJobMethod · 0.80
CountMethod · 0.45

Tested by

no test coverage detected