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
|
<html>
<head>
<title>NVIDIA(R) Blast(R) SDK 1.0 API Reference: Data Format Conversion Extension (NvBlastExtConverterLL)</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="pageextconverterll">Data Format Conversion Extension (NvBlastExtConverterLL) </a></h1>The low-level converter extension is a utility to convert <a class="el" href="struct_nv_blast_asset.html">NvBlastAsset</a> and <a class="el" href="struct_nv_blast_family.html">NvBlastFamily</a> data from one format to another.<p>
The format version of an asset may be obtained using the function<p>
<div class="fragment"><pre class="fragment">uint32_t assetVersion = <a class="code" href="_nv_blast_8h.html#fa3dbe442bf799bbee07eb98774340d4">NvBlastAssetGetFormatVersion</a>(asset, logFn);
</pre></div><p>
and likewise the format version of a family may be obtained using the function<p>
<div class="fragment"><pre class="fragment">uint32_t familyVersion = <a class="code" href="_nv_blast_8h.html#fa3dbe442bf799bbee07eb98774340d4">NvBlastAssetGetFormatVersion</a>(family, logFn);
</pre></div><p>
If the format version does not match the SDK's current version for one of these objects, the data may not be used with the current SDK. The NvBlastExtConverterLL extension will apply a chain of conversion functions to transform an asset or family from its stored version to any other version, provided that such a chain exists.<p>
To apply it, simply use the function convertDataBlock. For example, given an asset pointer,<p>
<div class="fragment"><pre class="fragment">vector<char> inBlock, outBlock;
inBlock.resize( <a class="code" href="_nv_blast_8h.html#d7ee1d97ad6e4f048eab694249fa2594">NvBlastAssetGetSize</a>(asset), logFn );
memcpy( inBlock.data(), asset, <a class="code" href="_nv_blast_8h.html#d7ee1d97ad6e4f048eab694249fa2594">NvBlastAssetGetSize</a>(asset) );
<span class="keywordflow">if</span> ( <a class="code" href="namespace_nv_1_1_blast.html#d4349b26be7c27cd32db69e831d2248f">convertDataBlock</a>(outBlock, inBlock) )
{
<a class="code" href="struct_nv_blast_asset.html">NvBlastAsset</a>* convertedAsset = outBlock.data();
<span class="comment">// Use convertedAsset here</span>
}
</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>
|