History

Merge branch 'master' into bug-fix/better-third-person-camera

Anthony J. Thibault committed 8 years ago

Commit 220b7f52 parents e28f13c fafc98f77 files · +2372 −608Browse files

Showing the changes to interface/src/Application.cpp (1 of 77 files). Show all

Unified · Split

interface/src/Application.cpp+26−11
@@ -1851,6 +1851,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1850 unmodified lines
18511851 DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) {
18521852 DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value);
18531853 });
1854+ EntityTreeRenderer::setRenderDebugHullsOperator([] {
1855+ return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls);
1856+ });
18541857
18551858 // Preload Tablet sounds
18561859 DependencyManager::get<TabletScriptingInterface>()->preloadSounds();
@@ -5020,8 +5023,6 @@ void Application::update(float deltaTime) { · 3163 unmodified lines
50205023 }
50215024 }
50225025
5023− PerformanceTimer perfTimer("misc");
5024−
50255026 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
50265027 PerformanceWarning warn(showWarnings, "Application::update()");
50275028
@@ -5030,11 +5031,13 @@ void Application::update(float deltaTime) { · 2 unmodified lines
50305031 // TODO: break these out into distinct perfTimers when they prove interesting
50315032 {
50325033 PROFILE_RANGE(app, "PickManager");
5034+ PerformanceTimer perfTimer("pickManager");
50335035 DependencyManager::get<PickManager>()->update();
50345036 }
50355037
50365038 {
50375039 PROFILE_RANGE(app, "PointerManager");
5040+ PerformanceTimer perfTimer("pointerManager");
50385041 DependencyManager::get<PointerManager>()->update();
50395042 }
50405043
@@ -5060,8 +5063,8 @@ void Application::update(float deltaTime) { · 19 unmodified lines
50605063 // Update my voxel servers with my current voxel query...
50615064 {
50625065 PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
5063− QMutexLocker viewLocker(&_viewMutex);
50645066 PerformanceTimer perfTimer("queryOctree");
5067+ QMutexLocker viewLocker(&_viewMutex);
50655068 quint64 sinceLastQuery = now - _lastQueriedTime;
50665069 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
50675070 bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;
@@ -5097,12 +5100,14 @@ void Application::update(float deltaTime) { · 29 unmodified lines
50975100 }
50985101 }
50995102
5100− avatarManager->postUpdate(deltaTime, getMain3DScene());
5101−
5102−
51035103 {
5104− PROFILE_RANGE_EX(app, "PreRenderLambdas", 0xffff0000, (uint64_t)0);
5104+ PerformanceTimer perfTimer("avatarManager/postUpdate");
5105+ avatarManager->postUpdate(deltaTime, getMain3DScene());
5106+ }
51055107
5108+ {
5109+ PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
5110+ PerformanceTimer perfTimer("postUpdateLambdas");
51065111 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
51075112 for (auto& iter : _postUpdateLambdas) {
51085113 iter.second();
@@ -5110,7 +5115,9 @@ void Application::update(float deltaTime) { · 1 unmodified line
51105115 _postUpdateLambdas.clear();
51115116 }
51125117
5118+
51135119 editRenderArgs([this, deltaTime](AppRenderArgs& appRenderArgs) {
5120+ PerformanceTimer perfTimer("editRenderArgs");
51145121 appRenderArgs._headPose= getHMDSensorPose();
51155122
51165123 auto myAvatar = getMyAvatar();
@@ -5224,12 +5231,20 @@ void Application::update(float deltaTime) { · 107 unmodified lines
52245231 }
52255232 });
52265233
5227− AnimDebugDraw::getInstance().update();
5234+ {
5235+ PerformanceTimer perfTimer("limitless");
5236+ AnimDebugDraw::getInstance().update();
5237+ }
52285238
5229− DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();
5239+ {
5240+ PerformanceTimer perfTimer("limitless");
5241+ DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();
5242+ }
52305243
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+ }
52335248 }
52345249
52355250 void Application::sendAvatarViewFrustum() {