Add NvCloth for Linux

This commit is contained in:
Wojtek Figat
2023-07-17 18:22:40 +02:00
parent de8613e223
commit 5012d4432e
4 changed files with 14 additions and 0 deletions

View File

@@ -724,6 +724,7 @@ void Cloth::CalculateInvMasses(Array<float>& invMasses)
void Cloth::OnPreUpdate()
{
#if WITH_CLOTH
// Get current skinned mesh pose for the simulation of the non-kinematic vertices
if (auto* animatedModel = Cast<AnimatedModel>(GetParent()))
{
@@ -806,6 +807,7 @@ void Cloth::OnPreUpdate()
PhysicsBackend::UnlockClothParticles(_cloth);
}
#endif
}
void Cloth::OnPostUpdate()

BIN
Source/Platforms/Linux/Binaries/ThirdParty/x64/libNvCloth.a (Stored with Git LFS) vendored Normal file

Binary file not shown.

View File

@@ -37,6 +37,7 @@ public class NvCloth : DepsModule
case TargetPlatform.Android:
case TargetPlatform.Mac:
case TargetPlatform.iOS:
case TargetPlatform.Linux:
libName = "NvCloth";
break;
case TargetPlatform.Switch:

View File

@@ -89,6 +89,9 @@ namespace Flax.Deps.Dependencies
case TargetPlatform.iOS:
Build(options, platform, TargetArchitecture.ARM64);
break;
case TargetPlatform.Linux:
Build(options, platform, TargetArchitecture.x64);
break;
}
}
@@ -157,6 +160,11 @@ namespace Flax.Deps.Dependencies
cmakeName = "ios";
binariesPrefix = "lib";
break;
case TargetPlatform.Linux:
cmakeArgs += " -DTARGET_BUILD_PLATFORM=linux";
cmakeName = "linux";
binariesPrefix = "lib";
break;
default: throw new InvalidPlatformException(platform);
}
var cmakeFolder = Path.Combine(nvCloth, "compiler", "cmake", cmakeName);