Showing the changes to interface/src/Application.cpp (1 of 77 files). Show all
Unified · Split
| @@ -1851,6 +1851,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1850 unmodified lines | |||
| 1851 | DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) { | 1851 | DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) { |
| 1852 | DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value); | 1852 | DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value); |
| 1853 | }); | 1853 | }); |
| 1854 | EntityTreeRenderer::setRenderDebugHullsOperator([] { | ||
| 1855 | return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls); | ||
| 1856 | }); | ||
| 1854 | 1857 | ||
| 1855 | // Preload Tablet sounds | 1858 | // Preload Tablet sounds |
| 1856 | DependencyManager::get<TabletScriptingInterface>()->preloadSounds(); | 1859 | DependencyManager::get<TabletScriptingInterface>()->preloadSounds(); |
| @@ -5020,8 +5023,6 @@ void Application::update(float deltaTime) { · 3163 unmodified lines | |||
| 5020 | } | 5023 | } |
| 5021 | } | 5024 | } |
| 5022 | 5025 | ||
| 5023 | PerformanceTimer perfTimer("misc"); | ||
| 5024 | |||
| 5025 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); | 5026 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); |
| 5026 | PerformanceWarning warn(showWarnings, "Application::update()"); | 5027 | PerformanceWarning warn(showWarnings, "Application::update()"); |
| 5027 | 5028 | ||
| @@ -5030,11 +5031,13 @@ void Application::update(float deltaTime) { · 2 unmodified lines | |||
| 5030 | // TODO: break these out into distinct perfTimers when they prove interesting | 5031 | // TODO: break these out into distinct perfTimers when they prove interesting |
| 5031 | { | 5032 | { |
| 5032 | PROFILE_RANGE(app, "PickManager"); | 5033 | PROFILE_RANGE(app, "PickManager"); |
| 5034 | PerformanceTimer perfTimer("pickManager"); | ||
| 5033 | DependencyManager::get<PickManager>()->update(); | 5035 | DependencyManager::get<PickManager>()->update(); |
| 5034 | } | 5036 | } |
| 5035 | 5037 | ||
| 5036 | { | 5038 | { |
| 5037 | PROFILE_RANGE(app, "PointerManager"); | 5039 | PROFILE_RANGE(app, "PointerManager"); |
| 5040 | PerformanceTimer perfTimer("pointerManager"); | ||
| 5038 | DependencyManager::get<PointerManager>()->update(); | 5041 | DependencyManager::get<PointerManager>()->update(); |
| 5039 | } | 5042 | } |
| 5040 | 5043 | ||
| @@ -5060,8 +5063,8 @@ void Application::update(float deltaTime) { · 19 unmodified lines | |||
| 5060 | // Update my voxel servers with my current voxel query... | 5063 | // Update my voxel servers with my current voxel query... |
| 5061 | { | 5064 | { |
| 5062 | PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount()); | 5065 | PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount()); |
| 5063 | QMutexLocker viewLocker(&_viewMutex); | ||
| 5064 | PerformanceTimer perfTimer("queryOctree"); | 5066 | PerformanceTimer perfTimer("queryOctree"); |
| 5067 | QMutexLocker viewLocker(&_viewMutex); | ||
| 5065 | quint64 sinceLastQuery = now - _lastQueriedTime; | 5068 | quint64 sinceLastQuery = now - _lastQueriedTime; |
| 5066 | const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND; | 5069 | const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND; |
| 5067 | bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY; | 5070 | bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY; |
| @@ -5097,12 +5100,14 @@ void Application::update(float deltaTime) { · 29 unmodified lines | |||
| 5097 | } | 5100 | } |
| 5098 | } | 5101 | } |
| 5099 | 5102 | ||
| 5100 | avatarManager->postUpdate(deltaTime, getMain3DScene()); | ||
| 5101 | |||
| 5102 | |||
| 5103 | { | 5103 | { |
| 5104 | PROFILE_RANGE_EX(app, "PreRenderLambdas", 0xffff0000, (uint64_t)0); | 5104 | PerformanceTimer perfTimer("avatarManager/postUpdate"); |
| 5105 | avatarManager->postUpdate(deltaTime, getMain3DScene()); | ||
| 5106 | } | ||
| 5105 | 5107 | ||
| 5108 | { | ||
| 5109 | PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0); | ||
| 5110 | PerformanceTimer perfTimer("postUpdateLambdas"); | ||
| 5106 | std::unique_lock<std::mutex> guard(_postUpdateLambdasLock); | 5111 | std::unique_lock<std::mutex> guard(_postUpdateLambdasLock); |
| 5107 | for (auto& iter : _postUpdateLambdas) { | 5112 | for (auto& iter : _postUpdateLambdas) { |
| 5108 | iter.second(); | 5113 | iter.second(); |
| @@ -5110,7 +5115,9 @@ void Application::update(float deltaTime) { · 1 unmodified line | |||
| 5110 | _postUpdateLambdas.clear(); | 5115 | _postUpdateLambdas.clear(); |
| 5111 | } | 5116 | } |
| 5112 | 5117 | ||
| 5118 | |||
| 5113 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { | 5119 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { |
| 5120 | PerformanceTimer perfTimer("editRenderArgs"); | ||
| 5114 | appRenderArgs._headPose= getHMDSensorPose(); | 5121 | appRenderArgs._headPose= getHMDSensorPose(); |
| 5115 | 5122 | ||
| 5116 | auto myAvatar = getMyAvatar(); | 5123 | auto myAvatar = getMyAvatar(); |
| @@ -5224,12 +5231,20 @@ void Application::update(float deltaTime) { · 107 unmodified lines | |||
| 5224 | } | 5231 | } |
| 5225 | }); | 5232 | }); |
| 5226 | 5233 | ||
| 5227 | AnimDebugDraw::getInstance().update(); | 5234 | { |
| 5235 | PerformanceTimer perfTimer("limitless"); | ||
| 5236 | AnimDebugDraw::getInstance().update(); | ||
| 5237 | } | ||
| 5228 | 5238 | ||
| 5229 | DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update(); | 5239 | { |
| 5240 | PerformanceTimer perfTimer("limitless"); | ||
| 5241 | DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update(); | ||
| 5242 | } | ||
| 5230 | 5243 | ||
| 5231 | // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over | 5244 | { // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over |
| 5232 | getMain3DScene()->enqueueFrame(); | 5245 | PerformanceTimer perfTimer("enqueueFrame"); |
| 5246 | getMain3DScene()->enqueueFrame(); | ||
| 5247 | } | ||
| 5233 | } | 5248 | } |
| 5234 | 5249 | ||
| 5235 | void Application::sendAvatarViewFrustum() { | 5250 | void Application::sendAvatarViewFrustum() { |