diff --git a/panda/src/bullet/bulletContactCallbacks.h b/panda/src/bullet/bulletContactCallbacks.h index e9891fda8a..b2027ddff6 100644 --- a/panda/src/bullet/bulletContactCallbacks.h +++ b/panda/src/bullet/bulletContactCallbacks.h @@ -61,7 +61,9 @@ contact_added_callback(btManifoldPoint &cp, PT(PandaNode) node1 = (PandaNode *)obj1->getUserPointer(); #endif - bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << std::endl; + if (bullet_cat.is_debug()) { + bullet_cat.debug() << "contact added: " << cp.m_userPersistentData << std::endl; + } // Gather persistent data UserPersistentData *data = new UserPersistentData(); @@ -123,8 +125,9 @@ contact_processed_callback(btManifoldPoint &cp, */ static bool contact_destroyed_callback(void *userPersistentData) { - - bullet_cat.debug() << "contact removed: " << userPersistentData << std::endl; + if (bullet_cat.is_debug()) { + bullet_cat.debug() << "contact removed: " << userPersistentData << std::endl; + } UserPersistentData *data = (UserPersistentData *)userPersistentData; diff --git a/panda/src/bullet/bulletDebugNode.cxx b/panda/src/bullet/bulletDebugNode.cxx index 2f221eb447..8b758c59ca 100644 --- a/panda/src/bullet/bulletDebugNode.cxx +++ b/panda/src/bullet/bulletDebugNode.cxx @@ -384,8 +384,9 @@ drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, cons */ void BulletDebugNode::DebugDraw:: drawTriangle(const btVector3 &v0, const btVector3 &v1, const btVector3 &v2, const btVector3 &n0, const btVector3 &n1, const btVector3 &n2, const btVector3 &color, btScalar alpha) { - - bullet_cat.debug() << "drawTriangle(2) - not yet implemented!" << std::endl; + if (bullet_cat.is_debug()) { + bullet_cat.debug() << "drawTriangle(2) - not yet implemented!" << std::endl; + } } /** @@ -405,8 +406,9 @@ drawContactPoint(const btVector3 &point, const btVector3 &normal, btScalar dista */ void BulletDebugNode::DebugDraw:: draw3dText(const btVector3 &location, const char *text) { - - bullet_cat.debug() << "draw3dText - not yet implemented!" << std::endl; + if (bullet_cat.is_debug()) { + bullet_cat.debug() << "draw3dText - not yet implemented!" << std::endl; + } } /** diff --git a/panda/src/bullet/config_bullet.cxx b/panda/src/bullet/config_bullet.cxx index f9eed1b6b8..140c7d0efc 100644 --- a/panda/src/bullet/config_bullet.cxx +++ b/panda/src/bullet/config_bullet.cxx @@ -207,7 +207,9 @@ init_libbullet() { // Initialize notification category bullet_cat.init(); - bullet_cat.debug() << "initialize module" << std::endl; + if (bullet_cat.is_debug()) { + bullet_cat.debug() << "initialize module" << std::endl; + } // Register the Bullet system PandaSystem *ps = PandaSystem::get_global_ptr();