From 95fa8f91856078fb127cc9fe233bdd8cce143c18 Mon Sep 17 00:00:00 2001 From: ejcoumans Date: Wed, 23 Jan 2008 23:36:45 +0000 Subject: [PATCH] use new convex hull drawing code for btConvexTriangleMeshShape --- Demos/ConvexDecompositionDemo/main.cpp | 4 ++++ Demos/OpenGL/GL_ShapeDrawer.cpp | 3 +++ 2 files changed, 7 insertions(+) diff --git a/Demos/ConvexDecompositionDemo/main.cpp b/Demos/ConvexDecompositionDemo/main.cpp index 3739033b0..e15b8544c 100644 --- a/Demos/ConvexDecompositionDemo/main.cpp +++ b/Demos/ConvexDecompositionDemo/main.cpp @@ -2,7 +2,10 @@ #include "ConvexDecompositionDemo.h" #include "GlutStuff.h" +#include "GLDebugDrawer.h" +#include "btBulletDynamicsCommon.h" +GLDebugDrawer gDebugDrawer; int main(int argc,char** argv) { @@ -13,6 +16,7 @@ int main(int argc,char** argv) convexDecompDemo->initPhysics(filename); + convexDecompDemo->getDynamicsWorld()->setDebugDrawer(&gDebugDrawer); convexDecompDemo->clientResetScene(); diff --git a/Demos/OpenGL/GL_ShapeDrawer.cpp b/Demos/OpenGL/GL_ShapeDrawer.cpp index e65dd358b..ab0549eaa 100644 --- a/Demos/OpenGL/GL_ShapeDrawer.cpp +++ b/Demos/OpenGL/GL_ShapeDrawer.cpp @@ -621,6 +621,7 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons } #endif + /* if (shape->getShapeType() == CONVEX_TRIANGLEMESH_SHAPE_PROXYTYPE) { btConvexTriangleMeshShape* convexMesh = (btConvexTriangleMeshShape*) shape; @@ -632,6 +633,8 @@ void GL_ShapeDrawer::drawOpenGL(btScalar* m, const btCollisionShape* shape, cons convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback,aabbMin,aabbMax); } + */ + glDisable(GL_DEPTH_BUFFER_BIT);