aboutsummaryrefslogtreecommitdiff
path: root/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp')
-rw-r--r--PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp b/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp
index f81da1b5..5a6682b1 100644
--- a/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp
+++ b/PhysX_3.4/Source/GeomUtils/src/mesh/GuBV32.cpp
@@ -114,10 +114,9 @@ void BV32Tree::importExtraData(PxDeserializationContext& context)
}
//~PX_SERIALIZATION
-bool BV32Tree::load(PxInputStream& stream, PxU32 meshVersion)
+bool BV32Tree::load(PxInputStream& stream, bool mismatch_)
{
PX_ASSERT(!mUserAllocated);
- PX_UNUSED(meshVersion);
release();
@@ -126,9 +125,9 @@ bool BV32Tree::load(PxInputStream& stream, PxU32 meshVersion)
if (a != 'B' || b != 'V' || c != '3' || d != '2')
return false;
- const PxU32 version = 1;
- const bool mismatch = (shdfnd::littleEndian() == 1);
- if (readDword(mismatch, stream) != version)
+ bool mismatch;
+ PxU32 fileVersion;
+ if(!readBigEndianVersionNumber(stream, mismatch_, fileVersion, mismatch))
return false;
mLocalBounds.mCenter.x = readFloat(mismatch, stream);