mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-07-31 21:50:18 +02:00
Only dispatch the gravity thread if there is work to be done
The definition of when there is work to be done is more or less "when the input to the gravity process has changed"; this is about to be extended to cover some other situations by the next commit.
This commit is contained in:
@@ -232,9 +232,8 @@ void Gravity::Exchange(GravityOutput &gravOut, GravityInput &gravIn)
|
|||||||
{
|
{
|
||||||
fftGravity->copyGravOut = true;
|
fftGravity->copyGravOut = true;
|
||||||
std::swap(gravIn, fftGravity->gravIn);
|
std::swap(gravIn, fftGravity->gravIn);
|
||||||
|
fftGravity->Dispatch();
|
||||||
}
|
}
|
||||||
|
|
||||||
fftGravity->Dispatch();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
GravityPtr Gravity::Create()
|
GravityPtr Gravity::Create()
|
||||||
|
Reference in New Issue
Block a user