free memory for btShapeHulls, keep track of it in GL_ShapeDrawer.
move btShapeHull and btConvexHull into its own library in Extras/ConvexHull (it allocates memory using mem/delete and refactoring into using btAlignedAlloc/Free takes too much time) fix heightfield / btOptimizedBvh for quantization, so that raycast can use quantized aabb (clamp up for maxima and down for minima) work-in-progress (update projectfiles etc)
This commit is contained in:
@@ -28,7 +28,6 @@
|
||||
|
||||
#include "GLDebugDrawer.h"
|
||||
|
||||
static GLDebugDrawer gDebugDrawer;
|
||||
#include "LinearMath/btQuickprof.h"
|
||||
|
||||
|
||||
@@ -80,7 +79,7 @@ DemoApplication* CreatDemo(btDemoEntry* entry)
|
||||
btAssert(demo);
|
||||
if (demo->getDynamicsWorld())
|
||||
{
|
||||
demo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer);
|
||||
demo->getDynamicsWorld()->setDebugDrawer(new GLDebugDrawer());
|
||||
}
|
||||
|
||||
#ifndef BT_NO_PROFILE
|
||||
@@ -168,6 +167,8 @@ void SimulationLoop()
|
||||
if (testSelection != testIndex)
|
||||
{
|
||||
testIndex = testSelection;
|
||||
if (demo->getDynamicsWorld() && demo->getDynamicsWorld()->getDebugDrawer())
|
||||
delete demo->getDynamicsWorld()->getDebugDrawer();
|
||||
delete demo;
|
||||
entry = g_demoEntries + testIndex;
|
||||
demo = CreatDemo(entry);
|
||||
@@ -192,6 +193,8 @@ void Keyboard(unsigned char key, int x, int y)
|
||||
|
||||
// Press 'r' to reset.
|
||||
case 'r':
|
||||
if (demo->getDynamicsWorld()->getDebugDrawer())
|
||||
delete demo->getDynamicsWorld()->getDebugDrawer();
|
||||
delete demo;
|
||||
demo = CreatDemo(entry);
|
||||
Resize(width,height);
|
||||
|
||||
Reference in New Issue
Block a user