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 | 1851 | DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) { |
| 1852 | 1852 | DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value); |
| 1853 | 1853 | }); |
| 1854 | + EntityTreeRenderer::setRenderDebugHullsOperator([] { | |
| 1855 | + return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls); | |
| 1856 | + }); | |
| 1854 | 1857 | |
| 1855 | 1858 | // Preload Tablet sounds |
| 1856 | 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 | 5026 | bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); |
| 5026 | 5027 | PerformanceWarning warn(showWarnings, "Application::update()"); |
| 5027 | 5028 | |
| @@ -5030,11 +5031,13 @@ void Application::update(float deltaTime) { · 2 unmodified lines | ||
| 5030 | 5031 | // TODO: break these out into distinct perfTimers when they prove interesting |
| 5031 | 5032 | { |
| 5032 | 5033 | PROFILE_RANGE(app, "PickManager"); |
| 5034 | + PerformanceTimer perfTimer("pickManager"); | |
| 5033 | 5035 | DependencyManager::get<PickManager>()->update(); |
| 5034 | 5036 | } |
| 5035 | 5037 | |
| 5036 | 5038 | { |
| 5037 | 5039 | PROFILE_RANGE(app, "PointerManager"); |
| 5040 | + PerformanceTimer perfTimer("pointerManager"); | |
| 5038 | 5041 | DependencyManager::get<PointerManager>()->update(); |
| 5039 | 5042 | } |
| 5040 | 5043 | |
| @@ -5060,8 +5063,8 @@ void Application::update(float deltaTime) { · 19 unmodified lines | ||
| 5060 | 5063 | // Update my voxel servers with my current voxel query... |
| 5061 | 5064 | { |
| 5062 | 5065 | PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount()); |
| 5063 | − QMutexLocker viewLocker(&_viewMutex); | |
| 5064 | 5066 | PerformanceTimer perfTimer("queryOctree"); |
| 5067 | + QMutexLocker viewLocker(&_viewMutex); | |
| 5065 | 5068 | quint64 sinceLastQuery = now - _lastQueriedTime; |
| 5066 | 5069 | const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND; |
| 5067 | 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 | 5111 | std::unique_lock<std::mutex> guard(_postUpdateLambdasLock); |
| 5107 | 5112 | for (auto& iter : _postUpdateLambdas) { |
| 5108 | 5113 | iter.second(); |
| @@ -5110,7 +5115,9 @@ void Application::update(float deltaTime) { · 1 unmodified line | ||
| 5110 | 5115 | _postUpdateLambdas.clear(); |
| 5111 | 5116 | } |
| 5112 | 5117 | |
| 5118 | + | |
| 5113 | 5119 | editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) { |
| 5120 | + PerformanceTimer perfTimer("editRenderArgs"); | |
| 5114 | 5121 | appRenderArgs._headPose= getHMDSensorPose(); |
| 5115 | 5122 | |
| 5116 | 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 | |
| 5232 | − getMain3DScene()->enqueueFrame(); | |
| 5244 | + { // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over | |
| 5245 | + PerformanceTimer perfTimer("enqueueFrame"); | |
| 5246 | + getMain3DScene()->enqueueFrame(); | |
| 5247 | + } | |
| 5233 | 5248 | } |
| 5234 | 5249 | |
| 5235 | 5250 | void Application::sendAvatarViewFrustum() { |