diff --git a/Demos/OpenGL/GL_ShapeDrawer.cpp b/Demos/OpenGL/GL_ShapeDrawer.cpp index d9832b366..185e4424b 100644 --- a/Demos/OpenGL/GL_ShapeDrawer.cpp +++ b/Demos/OpenGL/GL_ShapeDrawer.cpp @@ -725,7 +725,7 @@ convexMesh->getMeshInterface()->InternalProcessAllTriangles(&drawCallback,aabbMi -glDisable(GL_DEPTH_BUFFER_BIT); +glDisable(GL_DEPTH_TEST); glRasterPos3f(0,0,0);//mvtx.x(), vtx.y(), vtx.z()); if (debugMode&btIDebugDraw::DBG_DrawText) { @@ -736,7 +736,7 @@ if (debugMode& btIDebugDraw::DBG_DrawFeaturesText) { //BMF_DrawString(BMF_GetFont(BMF_kHelvetica10),shape->getExtraDebugInfo()); } -glEnable(GL_DEPTH_BUFFER_BIT); +glEnable(GL_DEPTH_TEST); // glPopMatrix(); if(m_textureenabled) glDisable(GL_TEXTURE_2D); diff --git a/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp b/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp index 85cfe39f2..9276b7117 100644 --- a/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp +++ b/src/BulletCollision/CollisionDispatch/btBoxBoxDetector.cpp @@ -226,7 +226,7 @@ void cullPoints2 (int n, btScalar p[], int m, int i0, int iret[]) a = btScalar(j)*(2*M__PI/m) + A[i0]; if (a > M__PI) a -= 2*M__PI; btScalar maxdiff=1e9,diff; -#ifndef dNODEBUG +#if defined(DEBUG) || defined (_DEBUG) *iret = i0; // iret is not allowed to keep this value #endif for (i=0; i +#if defined(DEBUG) || defined (_DEBUG) #define btAssert assert +#else + #define btAssert(x) +#endif //btFullAssert is optional, slows down a lot #define btFullAssert(x) @@ -116,7 +120,13 @@ inline int btGetVersion() #ifndef assert #include #endif + +#if defined(DEBUG) || defined (_DEBUG) #define btAssert assert +#else + #define btAssert(x) +#endif + //btFullAssert is optional, slows down a lot #define btFullAssert(x) #define btLikely(_c) _c