diff options
| author | WISH\AndyBuchanan <[email protected]> | 2018-08-14 16:06:02 +0100 |
|---|---|---|
| committer | WISH\AndyBuchanan <[email protected]> | 2018-08-14 16:06:02 +0100 |
| commit | 4bced2d73f61b440f81b3dff68e66cad5787d64d (patch) | |
| tree | fd14e7b7bddc70868ebd2e8c6178d0183a40b1a9 /examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs | |
| parent | Fixing line endings in buildtools/packman5/packman (diff) | |
| download | blast-4bced2d73f61b440f81b3dff68e66cad5787d64d.tar.xz blast-4bced2d73f61b440f81b3dff68e66cad5787d64d.zip | |
Fixes to UnitySample to make it build & run. ( In Unity 2018.2 )
Diffstat (limited to 'examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs')
| -rwxr-xr-x | examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs | 32 |
1 files changed, 23 insertions, 9 deletions
diff --git a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs index 94ca399..c902192 100755 --- a/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs +++ b/examples/UnityExample/Assets/Plugins/Blast/NvBlastExtUtilsWrapper.cs @@ -7,15 +7,29 @@ using UnityEngine; public static class NvBlastExtUtilsWrapper
{
- public const string DLL_NAME = "NvBlastExtUtils" + NvBlastWrapper.DLL_POSTFIX + "_" + NvBlastWrapper.DLL_PLATFORM;
+ //!AJB 20180809 Function was moved to a different plug in
+ public const string DLL_NAME = "NvBlast" + NvBlastWrapper.DLL_POSTFIX + "_" + NvBlastWrapper.DLL_PLATFORM; // NvBlastExtAssetUtils
- #region Dll
- [DllImport(DLL_NAME)]
- private static extern void NvBlastReorderAssetDescChunks([In, Out] NvBlastChunkDesc[] chunkDescs, uint chunkCount, [In, Out] NvBlastBondDesc[] bondDescs, uint bondCount, [In, Out] uint[] chunkReorderMap);
- #endregion
+ #region Dll
+ [DllImport(DLL_NAME)]
+ private static extern void NvBlastReorderAssetDescChunks
+ (
+ [In, Out] NvBlastChunkDesc[] chunkDescs,
+ UInt32 chunkCount,
+ [In, Out] NvBlastBondDesc[] bondDescs,
+ UInt32 bondCount,
+ UInt32[] chunkReorderMap,
+ bool keepBondNormalChunkOrder,
+ System.IntPtr scratch,
+ System.UIntPtr logFn // NvBlastLog, may be null
+ );
+ #endregion
- public static void ReorderAssetDescChunks(NvBlastAssetDesc assetDesc, uint[] chunkReorderMap)
+ public static void ReorderAssetDescChunks(NvBlastAssetDesc assetDesc, uint[] chunkReorderMap)
{
- NvBlastReorderAssetDescChunks(assetDesc.chunkDescs, assetDesc.chunkCount, assetDesc.bondDescs, assetDesc.bondCount, chunkReorderMap);
- }
-}
\ No newline at end of file + System.IntPtr scratchPtr = NvBlastWrapper.GetScratch( (int)( assetDesc.chunkCount * Marshal.SizeOf( typeof(NvBlastChunkDesc) ) ) );
+ NvBlastReorderAssetDescChunks(assetDesc.chunkDescs, assetDesc.chunkCount, assetDesc.bondDescs, assetDesc.bondCount, chunkReorderMap, true, scratchPtr, System.UIntPtr.Zero);
+ }
+}
+
+
|