Move b3Quickprof.* from Bullet 3.x src folder to btgui/Timing
The Bullet 3.x B3_PROFILE can be customized using b3SetCustomEnterProfileZoneFunc/b3SetCustomLeaveProfileZoneFunc defined in Bullet3Common/b3Logging, so you can hook Bullet 3.x up to your profiler of choice. The Demos3/BasicGpuDemo will show the Bullet 3.x timings inside the Bullet 2.x btQuickprof profiler.
This commit is contained in:
@@ -82,6 +82,37 @@ void b3OutputErrorMessageVarArgsInternal(const char *str, ...)
|
||||
va_end(argList);
|
||||
|
||||
}
|
||||
|
||||
|
||||
void b3EnterProfileZoneDefault(const char* name)
|
||||
{
|
||||
}
|
||||
void b3LeaveProfileZoneDefault()
|
||||
{
|
||||
}
|
||||
static b3EnterProfileZoneFunc* b3s_enterFunc = b3EnterProfileZoneDefault;
|
||||
static b3LeaveProfileZoneFunc* b3s_leaveFunc = b3LeaveProfileZoneDefault;
|
||||
void b3EnterProfileZone(const char* name)
|
||||
{
|
||||
(b3s_enterFunc)(name);
|
||||
}
|
||||
void b3LeaveProfileZone()
|
||||
{
|
||||
(b3s_leaveFunc)();
|
||||
}
|
||||
|
||||
void b3SetCustomEnterProfileZoneFunc(b3EnterProfileZoneFunc* enterFunc)
|
||||
{
|
||||
b3s_enterFunc = enterFunc;
|
||||
}
|
||||
void b3SetCustomLeaveProfileZoneFunc(b3LeaveProfileZoneFunc* leaveFunc)
|
||||
{
|
||||
b3s_leaveFunc = leaveFunc;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
#ifndef _WIN32
|
||||
#undef vsprintf_s
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user