forked from teamnwah/openmw-tes3coop
Fix build against bullet with profiler disabled (Fixes #3592)
This commit is contained in:
parent
2ed0277839
commit
5ccbabc27d
2 changed files with 10 additions and 0 deletions
|
@ -7,6 +7,8 @@
|
||||||
|
|
||||||
#include <LinearMath/btQuickprof.h>
|
#include <LinearMath/btQuickprof.h>
|
||||||
|
|
||||||
|
#ifndef BT_NO_PROFILE
|
||||||
|
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
void bulletDumpRecursive(CProfileIterator* pit, int spacing, std::stringstream& os)
|
void bulletDumpRecursive(CProfileIterator* pit, int spacing, std::stringstream& os)
|
||||||
|
@ -71,6 +73,7 @@ namespace
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // BT_NO_PROFILE
|
||||||
|
|
||||||
namespace MWGui
|
namespace MWGui
|
||||||
{
|
{
|
||||||
|
@ -92,10 +95,13 @@ namespace MWGui
|
||||||
|
|
||||||
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
MyGUI::IntSize viewSize = MyGUI::RenderManager::getInstance().getViewSize();
|
||||||
mMainWidget->setSize(viewSize);
|
mMainWidget->setSize(viewSize);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void DebugWindow::onFrame(float dt)
|
void DebugWindow::onFrame(float dt)
|
||||||
{
|
{
|
||||||
|
#ifndef BT_NO_PROFILE
|
||||||
if (!isVisible())
|
if (!isVisible())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
@ -115,6 +121,7 @@ namespace MWGui
|
||||||
size_t previousPos = mBulletProfilerEdit->getVScrollPosition();
|
size_t previousPos = mBulletProfilerEdit->getVScrollPosition();
|
||||||
mBulletProfilerEdit->setCaption(stream.str());
|
mBulletProfilerEdit->setCaption(stream.str());
|
||||||
mBulletProfilerEdit->setVScrollPosition(std::min(previousPos, mBulletProfilerEdit->getVScrollRange()-1));
|
mBulletProfilerEdit->setVScrollPosition(std::min(previousPos, mBulletProfilerEdit->getVScrollRange()-1));
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,6 +14,7 @@
|
||||||
#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
|
#include <BulletCollision/CollisionDispatch/btDefaultCollisionConfiguration.h>
|
||||||
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
|
#include <BulletCollision/CollisionDispatch/btCollisionWorld.h>
|
||||||
#include <BulletCollision/BroadphaseCollision/btDbvtBroadphase.h>
|
#include <BulletCollision/BroadphaseCollision/btDbvtBroadphase.h>
|
||||||
|
|
||||||
#include <LinearMath/btQuickprof.h>
|
#include <LinearMath/btQuickprof.h>
|
||||||
|
|
||||||
#include <components/nifbullet/bulletnifloader.hpp>
|
#include <components/nifbullet/bulletnifloader.hpp>
|
||||||
|
@ -1363,8 +1364,10 @@ namespace MWPhysics
|
||||||
for (std::set<Object*>::iterator it = mAnimatedObjects.begin(); it != mAnimatedObjects.end(); ++it)
|
for (std::set<Object*>::iterator it = mAnimatedObjects.begin(); it != mAnimatedObjects.end(); ++it)
|
||||||
(*it)->animateCollisionShapes(mCollisionWorld);
|
(*it)->animateCollisionShapes(mCollisionWorld);
|
||||||
|
|
||||||
|
#ifndef BT_NO_PROFILE
|
||||||
CProfileManager::Reset();
|
CProfileManager::Reset();
|
||||||
CProfileManager::Increment_Frame_Counter();
|
CProfileManager::Increment_Frame_Counter();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void PhysicsSystem::debugDraw()
|
void PhysicsSystem::debugDraw()
|
||||||
|
|
Loading…
Reference in a new issue