First commit of 2008, Happy New Year!
Add option to compile without btClock and without profiling: comment out USE_BT_CLOCK, and #define BT_NO_PROFILE Fixed typo/case in #include "LinearMath/btQuickProf.h", in SpuParallelSolver.cpp Removed unnecessary files from libxml CMakeLists.txt
This commit is contained in:
@@ -329,7 +329,9 @@ int btDiscreteDynamicsWorld::stepSimulation( btScalar timeStep,int maxSubSteps,
|
||||
|
||||
clearForces();
|
||||
|
||||
#ifndef BT_NO_PROFILE
|
||||
CProfileManager::Increment_Frame_Counter();
|
||||
#endif //BT_NO_PROFILE
|
||||
|
||||
return numSimulationSubSteps;
|
||||
}
|
||||
@@ -717,40 +719,10 @@ void btDiscreteDynamicsWorld::startProfiling(btScalar timeStep)
|
||||
{
|
||||
(void)timeStep;
|
||||
|
||||
#ifndef BT_NO_PROFILE
|
||||
CProfileManager::Reset();
|
||||
#endif //BT_NO_PROFILE
|
||||
|
||||
|
||||
#ifdef USE_QUICKPROF
|
||||
|
||||
|
||||
//toggle btProfiler
|
||||
if ( m_debugDrawer && m_debugDrawer->getDebugMode() & btIDebugDraw::DBG_ProfileTimings)
|
||||
{
|
||||
if (!m_profileTimings)
|
||||
{
|
||||
m_profileTimings = 1;
|
||||
// To disable profiling, simply comment out the following line.
|
||||
static int counter = 0;
|
||||
|
||||
char filename[128];
|
||||
sprintf(filename,"quickprof_bullet_timings%i.csv",counter++);
|
||||
btProfiler::init(filename, btProfiler::BLOCK_CYCLE_SECONDS);//BLOCK_TOTAL_MICROSECONDS
|
||||
} else
|
||||
{
|
||||
btProfiler::endProfilingCycle();
|
||||
}
|
||||
|
||||
} else
|
||||
{
|
||||
if (m_profileTimings)
|
||||
{
|
||||
btProfiler::endProfilingCycle();
|
||||
|
||||
m_profileTimings = 0;
|
||||
btProfiler::destroy();
|
||||
}
|
||||
}
|
||||
#endif //USE_QUICKPROF
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
|
||||
#include "LinearMath/btQuickprof.h"
|
||||
|
||||
#ifdef USE_BT_CLOCK
|
||||
|
||||
static btClock gProfileClock;
|
||||
|
||||
inline void Profile_Get_Ticks(unsigned long int * ticks)
|
||||
@@ -29,6 +31,8 @@ inline float Profile_Get_Tick_Rate(void)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/***************************************************************************************************
|
||||
**
|
||||
** CProfileNode
|
||||
@@ -264,5 +268,5 @@ float CProfileManager::Get_Time_Since_Reset( void )
|
||||
return (float)time / Profile_Get_Tick_Rate();
|
||||
}
|
||||
|
||||
|
||||
#endif //USE_BT_CLOCK
|
||||
|
||||
|
||||
Reference in New Issue
Block a user