aboutsummaryrefslogtreecommitdiff
path: root/NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h
diff options
context:
space:
mode:
authorBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
committerBryan Galdrikian <[email protected]>2017-02-21 12:07:59 -0800
commit446ce137c6823ba9eff273bdafdaf266287c7c98 (patch)
treed20aab3e2ed08d7b3ca71c2f40db6a93ea00c459 /NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h
downloadblast-1.0.0-beta.tar.xz
blast-1.0.0-beta.zip
first commitv1.0.0-beta
Diffstat (limited to 'NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h')
-rw-r--r--NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h b/NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h
new file mode 100644
index 0000000..d21c7ca
--- /dev/null
+++ b/NvBlast/sdk/extensions/serialization/include/NvBlastExtSerializationLLInterface.h
@@ -0,0 +1,43 @@
+/*
+* Copyright (c) 2017, NVIDIA CORPORATION. All rights reserved.
+*
+* NVIDIA CORPORATION and its licensors retain all intellectual property
+* and proprietary rights in and to this software, related documentation
+* and any modifications thereto. Any use, reproduction, disclosure or
+* distribution of this software and related documentation without an express
+* license agreement from NVIDIA CORPORATION is strictly prohibited.
+*/
+
+/*
+Include this file to access the C API for serialization, for Low Level assets only.
+
+For Serialization of Tk and Ext assets, include only NvBlastExtSerializationInterface.h, which will include this file as well.
+
+*/
+#pragma once
+#include <ostream>
+#include "NvBlastPreprocessor.h"
+#include "NvBlastTypes.h"
+
+#include "NvBlastExtGlobals.h"
+
+/*
+ Set a global NvBlastAlloc signature allocation function that the deserialization will use when required.
+
+ NOTE: This will NOT be used when using the combined serialization library, as it will use the TkFramework's allocation and logging
+*/
+NVBLAST_API void setAllocator(NvBlastExtAlloc alloc);
+
+/*
+ Set a global NvBlastLog signature allocation function that the library will use when required.
+
+ NOTE: This will NOT be used when using the combined serialization library, as it will use the TkFramework's allocation and logging
+*/
+NVBLAST_API void setLog(NvBlastLog log);
+
+
+NVBLAST_API NvBlastAsset* deserializeAsset(const unsigned char* input, uint32_t size);
+NVBLAST_API NvBlastAsset* deserializeAssetFromStream(std::istream &inputStream);
+NVBLAST_API bool serializeAssetIntoStream(const NvBlastAsset *asset, std::ostream &outputStream);
+NVBLAST_API bool serializeAssetIntoNewBuffer(const NvBlastAsset *asset, unsigned char **outBuffer, uint32_t &outSize);
+NVBLAST_API bool serializeAssetIntoExistingBuffer(const NvBlastAsset *asset, unsigned char *buffer, uint32_t maxSize, uint32_t &usedSize);