fix btCompoundShaps serialization of child shapes
added ConcaveDemo to cmake added LinearMath/btSerializer.h to btBulletCollisionCommon.h
This commit is contained in:
@@ -28,7 +28,7 @@ subject to the following restrictions:
|
||||
#include "GL_ShapeDrawer.h"
|
||||
#include "LinearMath/btQuickprof.h"
|
||||
#include "LinearMath/btDefaultMotionState.h"
|
||||
|
||||
#include "LinearMath/btSerializer.h"
|
||||
#include "GLDebugFont.h"
|
||||
|
||||
|
||||
@@ -369,6 +369,19 @@ void DemoApplication::keyboardCallback(unsigned char key, int x, int y)
|
||||
m_debugMode |= btIDebugDraw::DBG_ProfileTimings;
|
||||
break;
|
||||
|
||||
case '=':
|
||||
{
|
||||
int maxSerializeBufferSize = 1024*1024*5;
|
||||
btDefaultSerializer* serializer = new btDefaultSerializer(maxSerializeBufferSize);
|
||||
m_dynamicsWorld->serialize(serializer);
|
||||
FILE* f2 = fopen("testFile.bullet","wb");
|
||||
fwrite(serializer->getBufferPointer(),serializer->getCurrentBufferSize(),1,f2);
|
||||
fclose(f2);
|
||||
delete serializer;
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
case 'm':
|
||||
if (m_debugMode & btIDebugDraw::DBG_EnableSatComparison)
|
||||
m_debugMode = m_debugMode & (~btIDebugDraw::DBG_EnableSatComparison);
|
||||
|
||||
Reference in New Issue
Block a user