Since am debugging hard my determinism problems
I was wondering if it would be a good thing
to be able to serialize the scene to a text format.
The deserialization would be more complex obviously
but in a first time being able to serialize to a text format
to compare 2 scenes easily would be a really good debugging
tool.
Any thoughts ?
text format serialization ?
-
- Site Admin
- Posts: 4221
- Joined: Sun Jun 26, 2005 6:43 pm
- Location: California, USA
Re: text format serialization ?
There is text output in the console for debugging in the btBulletWorldImporter, make sure to enable verbose mode, and make sure that the .bullet file matches the current platform.
If the .bullet file was exported on a different platform (endianness/32bit/64bit etc) you can just export the .bullet again right after loading, and load the native .bullet file with full verbose mode:
Thanks,
Erwin
Code: Select all
m_fileLoader->setVerboseMode(true);
m_fileLoader->loadFile("testFile.bullet");
Code: Select all
{
btDefaultSerializer* serializer = new btDefaultSerializer(0);
m_dynamicsWorld->serialize(serializer);
FILE* f2 = fopen("testFile2.bullet","wb");
fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1,f2);
fclose(f2);
}
Thanks,
Erwin