From a082716fe2d793723839e98f729621c747c485bc Mon Sep 17 00:00:00 2001 From: "erwin.coumans" Date: Thu, 28 Jan 2010 00:22:26 +0000 Subject: [PATCH] SerializeDemo only loads the testFile.bullet by default (making it a handy .bullet file viewer) Also note that pressing the '=' key while running any of the demos will create/serialize a physics snapshot to testFile.bullet --- Demos/SerializeDemo/SerializeDemo.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Demos/SerializeDemo/SerializeDemo.cpp b/Demos/SerializeDemo/SerializeDemo.cpp index 521b960d2..8538784f8 100644 --- a/Demos/SerializeDemo/SerializeDemo.cpp +++ b/Demos/SerializeDemo/SerializeDemo.cpp @@ -15,6 +15,7 @@ subject to the following restrictions: #define TEST_SERIALIZATION 1 +//#define CREATE_NEW_BULLETFILE 1 ///create 125 (5x5x5) dynamic object #define ARRAY_SIZE_X 5 @@ -215,6 +216,7 @@ void SerializeDemo::initPhysics() #ifdef TEST_SERIALIZATION //test serializing this +#ifdef CREATE_NEW_BULLETFILE int maxSerializeBufferSize = 1024*1024*5; btDefaultSerializer* serializer = new btDefaultSerializer(maxSerializeBufferSize); @@ -223,6 +225,7 @@ void SerializeDemo::initPhysics() FILE* f2 = fopen("testFile.bullet","wb"); fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1,f2); fclose(f2); +#endif //CREATE_NEW_BULLETFILE exitPhysics();