Improve the loading of serialized Bullet files, so that
after 'loadFileFromMemory' you can save the existing memory back to disk converted to native architecture endianness. Fixed a bug that prevented big endian machines to load cloth data (due to wrong endian swap of pointer array) Also improved the 'preswap' so that you can swap endianness on big endian machines (to little endian)
This commit is contained in:
@@ -42,12 +42,15 @@ bool btBulletWorldImporter::loadFile( const char* fileName, const char* preSwapF
|
||||
bParse::btBulletFile* bulletFile2 = new bParse::btBulletFile(fileName);
|
||||
|
||||
|
||||
|
||||
|
||||
bool result = loadFileFromMemory(bulletFile2);
|
||||
|
||||
//now you could save the file in 'native' format using
|
||||
//bulletFile2->writeFile("native.bullet");
|
||||
|
||||
if (preSwapFilenameOut)
|
||||
bulletFile2->preSwap(preSwapFilenameOut);
|
||||
{
|
||||
bulletFile2->preSwap();
|
||||
bulletFile2->writeFile(preSwapFilenameOut);
|
||||
}
|
||||
|
||||
delete bulletFile2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user