Skip to content

Commit 36cd408

Browse files
author
devsh
committed
typo in IGeometryLoader and forgot to compute ranges and hashes in CSerializedLoader
1 parent 047dea4 commit 36cd408

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

include/nbl/asset/interchange/IGeometryLoader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class IGeometryLoader : public IAssetLoader
4747
if (data)
4848
{
4949
CGeometryManipulator::recomputeContentHash(retval);
50-
CGeometryManipulator::computeRange(retval);
50+
CGeometryManipulator::recomputeRange(retval);
5151
}
5252
return retval;
5353
}
@@ -87,7 +87,7 @@ class IGeometryLoader : public IAssetLoader
8787
if (success)
8888
{
8989
CGeometryManipulator::recomputeContentHash(view);
90-
CGeometryManipulator::computeRange(view);
90+
CGeometryManipulator::recomputeRange(view);
9191
return view;
9292
}
9393
}

src/nbl/ext/MitsubaLoader/CSerializedLoader.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,8 @@ asset::SAssetBundle CSerializedLoader::loadAsset(system::IFile* _file, const ass
245245
std::for_each_n(core::execution::seq,reinterpret_cast<const hlsl::float64_t3*>(ptr),vertexCount,readNormal);
246246
else
247247
std::for_each_n(core::execution::seq,reinterpret_cast<const hlsl::float32_t3*>(ptr),vertexCount,readNormal);
248+
CGeometryManipulator::recomputeRange(view);
249+
CGeometryManipulator::recomputeContentHash(view);
248250
geo->setNormalView(std::move(view));
249251
}
250252
ptr += vertexCount*typeSize*3;
@@ -262,6 +264,8 @@ asset::SAssetBundle CSerializedLoader::loadAsset(system::IFile* _file, const ass
262264
else
263265
std::for_each_n(core::execution::seq,reinterpret_cast<const hlsl::float32_t2*>(ptr),vertexCount,readUV);
264266
ptr += vertexCount*typeSize*2;
267+
CGeometryManipulator::recomputeRange(view);
268+
CGeometryManipulator::recomputeContentHash(view);
265269
auxViews->push_back(std::move(view));
266270
}
267271
using color_t = hlsl::float16_t4;
@@ -274,6 +278,8 @@ asset::SAssetBundle CSerializedLoader::loadAsset(system::IFile* _file, const ass
274278
else
275279
std::for_each_n(core::execution::seq,reinterpret_cast<const hlsl::float32_t4*>(ptr),vertexCount,readColor);
276280
ptr += vertexCount*typeSize*4;
281+
CGeometryManipulator::recomputeRange(view);
282+
CGeometryManipulator::recomputeContentHash(view);
277283
auxViews->push_back(std::move(view));
278284
}
279285

0 commit comments

Comments
 (0)