1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
<html>
<head>
<title>NVIDIA(R) Blast(R) SDK 1.1 API Reference: BlastTk Serialization (NvBlastExtTkSerialization)</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<LINK HREF="NVIDIA.css" REL="stylesheet" TYPE="text/css">
</head>
<body bgcolor="#FFFFFF">
<div id="header">
<hr class="first">
<img alt="" src="blast_logo.png">
<br>
<center>
<a class="qindex" href="main.html">Main Page</a>
<!-- <a class="qindex" href="hierarchy.html">Class Hierarchy</a> //-->
<a class="qindex" href="annotated.html">Class List</a>
<a class="qindex" href="functions.html">Class Members</a>
</center>
<hr class="second">
</div>
<!-- Generated by Doxygen 1.5.8 -->
<div class="contents">
<h1><a class="anchor" name="pageexttkserialization">BlastTk Serialization (NvBlastExtTkSerialization) </a></h1>This extension contains serializers which can be loaded into the ExtSerialization manager defined in <a class="el" href="pageextserialization.html">Serialization (NvBlastExtSerialization)</a>.<p>
To use this extension, you must also load the ExtSerialization extension and create a serialization manager as described in <a class="el" href="pageextserialization.html">Serialization (NvBlastExtSerialization)</a>.<p>
We repeat this here (again, assuming we are in the <a class="el" href="namespace_nv_1_1_blast.html">Nv::Blast</a> namespace):<p>
<div class="fragment"><pre class="fragment">ExtSerialization* ser = <a class="code" href="_nv_blast_ext_serialization_8h.html#9dad7f69d7a72d402c99238ed3c34bfc">NvBlastExtSerializationCreate</a>();
</pre></div><p>
Then, call the function NvBlastExtTkSerializerLoadSet, declared in <b><a class="el" href="_nv_blast_ext_tk_serialization_8h.html">NvBlastExtTkSerialization.h</a></b>, passing in your TkFramework:<p>
<div class="fragment"><pre class="fragment">TkFramework* framework = ... <span class="comment">// We must have created a TkFramework</span>
<a class="code" href="_nv_blast_ext_tk_serialization_8h.html#3b56ccefec36904aed01309194c012c0">NvBlastExtTkSerializerLoadSet</a>(*framework, *ser);
</pre></div><p>
Now your serialization manager will have the serializers provided by this extension. Currently only TkAsset serializers exist, with object type ID given by<p>
<br>
<b>TkObjectTypeID::Asset</b> <br>
<p>
As with low-level assets, you can serialize using the serialization manager directly:<p>
<div class="fragment"><pre class="fragment"><span class="keyword">const</span> TkAsset* asset = ... <span class="comment">// Given pointer to an Nv::Blast::TkAsset</span>
<span class="keywordtype">void</span>* buffer;
uint64_t size = ser->serializeIntoBuffer(buffer, asset, TkObjectTypeID::Asset);
</pre></div><p>
or use the wrapper function defined in <b><a class="el" href="_nv_blast_ext_tk_serialization_8h.html">NvBlastExtTkSerialization.h</a></b>:<p>
<div class="fragment"><pre class="fragment"><span class="keywordtype">void</span>* buffer;
uint64_t size = <a class="code" href="_nv_blast_ext_tk_serialization_8h.html#c41dafd2d5ffd5a6131426755c477793">NvBlastExtSerializationSerializeTkAssetIntoBuffer</a>(buffer, *ser, asset);
</pre></div><p>
<br>
</div>
<!-- start footer part -->
<div class="footer">
Copyright © 2015-2017 NVIDIA Corporation, 2701 San Tomas Expressway, Santa Clara, CA 95050 U.S.A. All rights reserved. <a href="http://www.nvidia.com ">www.nvidia.com</a>
</div>
</body>
</html>
|