3
0
Fork 0
mirror of https://github.com/lubosz/overte.git synced 2025-04-26 06:55:39 +02:00

add some trace contexts for easier debugging

This commit is contained in:
Andrew Meadows 2019-02-13 10:02:58 -08:00
parent 152edd477c
commit c79e3e5a6d

View file

@ -6311,7 +6311,10 @@ void Application::update(float deltaTime) {
{
PROFILE_RANGE(simulation_physics, "RemoveEntities");
const VectorOfMotionStates& motionStates = _entitySimulation->getObjectsToRemoveFromPhysics();
_physicsEngine->removeObjects(motionStates);
{
PROFILE_RANGE_EX(simulation_physics, "NumObjs", 0xffff0000, (uint64_t)motionStates.size());
_physicsEngine->removeObjects(motionStates);
}
_entitySimulation->deleteObjectsRemovedFromPhysics();
}
@ -6320,6 +6323,7 @@ void Application::update(float deltaTime) {
VectorOfMotionStates motionStates;
getEntities()->getTree()->withReadLock([&] {
_entitySimulation->getObjectsToAddToPhysics(motionStates);
PROFILE_RANGE_EX(simulation_physics, "NumObjs", 0xffff0000, (uint64_t)motionStates.size());
_physicsEngine->addObjects(motionStates);
});
}