History

Merge remote-tracking branch 'upstream/master' into android_nov

Brad Davis committed 8 years ago

Commit 2c352422 parents 7a7aee7 b73106f69 files · +1770 −552Browse files

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

Unified · Split

interface/src/Application.cpp+27−12
@@ -1892,6 +1892,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1891 unmodified lines
18921892 DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) {
18931893 DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value);
18941894 });
1895+ EntityTreeRenderer::setRenderDebugHullsOperator([] {
1896+ return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls);
1897+ });
18951898
18961899 // Preload Tablet sounds
18971900 DependencyManager::get<TabletScriptingInterface>()->preloadSounds();
@@ -5057,8 +5060,6 @@ void Application::update(float deltaTime) { · 3159 unmodified lines
50575060 }
50585061 }
50595062
5060− PerformanceTimer perfTimer("misc");
5061−
50625063 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
50635064 PerformanceWarning warn(showWarnings, "Application::update()");
50645065
@@ -5067,11 +5068,13 @@ void Application::update(float deltaTime) { · 2 unmodified lines
50675068 // TODO: break these out into distinct perfTimers when they prove interesting
50685069 {
50695070 PROFILE_RANGE(app, "PickManager");
5071+ PerformanceTimer perfTimer("pickManager");
50705072 DependencyManager::get<PickManager>()->update();
50715073 }
50725074
50735075 {
50745076 PROFILE_RANGE(app, "PointerManager");
5077+ PerformanceTimer perfTimer("pointerManager");
50755078 DependencyManager::get<PointerManager>()->update();
50765079 }
50775080
@@ -5097,8 +5100,8 @@ void Application::update(float deltaTime) { · 19 unmodified lines
50975100 // Update my voxel servers with my current voxel query...
50985101 {
50995102 PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
5100− QMutexLocker viewLocker(&_viewMutex);
51015103 PerformanceTimer perfTimer("queryOctree");
5104+ QMutexLocker viewLocker(&_viewMutex);
51025105 quint64 sinceLastQuery = now - _lastQueriedTime;
51035106 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
51045107 bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;
@@ -5134,12 +5137,14 @@ void Application::update(float deltaTime) { · 29 unmodified lines
51345137 }
51355138 }
51365139
5137− avatarManager->postUpdate(deltaTime, getMain3DScene());
5138−
5139−
51405140 {
5141− PROFILE_RANGE_EX(app, "PreRenderLambdas", 0xffff0000, (uint64_t)0);
5141+ PerformanceTimer perfTimer("avatarManager/postUpdate");
5142+ avatarManager->postUpdate(deltaTime, getMain3DScene());
5143+ }
51425144
5145+ {
5146+ PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
5147+ PerformanceTimer perfTimer("postUpdateLambdas");
51435148 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
51445149 for (auto& iter : _postUpdateLambdas) {
51455150 iter.second();
@@ -5148,6 +5153,7 @@ void Application::update(float deltaTime) { · 2 unmodified lines
51485153 }
51495154
51505155 editRenderArgs([this](AppRenderArgs& appRenderArgs) {
5156+ PerformanceTimer perfTimer("editRenderArgs");
51515157 appRenderArgs._headPose= getHMDSensorPose();
51525158
51535159 auto myAvatar = getMyAvatar();
@@ -5261,12 +5267,20 @@ void Application::update(float deltaTime) { · 107 unmodified lines
52615267 }
52625268 });
52635269
5264− AnimDebugDraw::getInstance().update();
5270+ {
5271+ PerformanceTimer perfTimer("limitless");
5272+ AnimDebugDraw::getInstance().update();
5273+ }
52655274
5266− DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();
5275+ {
5276+ PerformanceTimer perfTimer("limitless");
5277+ DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();
5278+ }
52675279
5268− // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over
5269− getMain3DScene()->enqueueFrame();
5280+ { // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over
5281+ PerformanceTimer perfTimer("enqueueFrame");
5282+ getMain3DScene()->enqueueFrame();
5283+ }
52705284 }
52715285
52725286 void Application::sendAvatarViewFrustum() {
@@ -6851,7 +6865,8 @@ void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRa · 1578 unmodified lines
68516865
68526866 void Application::takeSecondaryCameraSnapshot() {
68536867 postLambdaEvent([this] {
6854− Snapshot::saveSnapshot(getActiveDisplayPlugin()->getSecondaryCameraScreenshot());
6868+ QString snapshotPath = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getSecondaryCameraScreenshot());
6869+ emit DependencyManager::get<WindowScriptingInterface>()->stillSnapshotTaken(snapshotPath, true);
68556870 });
68566871 }
68576872

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t