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
1892 DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) {1892 DependencyManager::get<EntityTreeRenderer>()->setSetPrecisionPickingOperator([&](unsigned int rayPickID, bool value) {
1893 DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value);1893 DependencyManager::get<PickManager>()->setPrecisionPicking(rayPickID, value);
1894 });1894 });
1895 EntityTreeRenderer::setRenderDebugHullsOperator([] {
1896 return Menu::getInstance()->isOptionChecked(MenuOption::PhysicsShowHulls);
1897 });
1895 1898
1896 // Preload Tablet sounds1899 // Preload Tablet sounds
1897 DependencyManager::get<TabletScriptingInterface>()->preloadSounds();1900 DependencyManager::get<TabletScriptingInterface>()->preloadSounds();
@@ -5057,8 +5060,6 @@ void Application::update(float deltaTime) { · 3159 unmodified lines
5057 }5060 }
5058 }5061 }
5059 5062
5060 PerformanceTimer perfTimer("misc");
5061
5062 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);5063 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
5063 PerformanceWarning warn(showWarnings, "Application::update()");5064 PerformanceWarning warn(showWarnings, "Application::update()");
5064 5065
@@ -5067,11 +5068,13 @@ void Application::update(float deltaTime) { · 2 unmodified lines
5067 // TODO: break these out into distinct perfTimers when they prove interesting5068 // TODO: break these out into distinct perfTimers when they prove interesting
5068 {5069 {
5069 PROFILE_RANGE(app, "PickManager");5070 PROFILE_RANGE(app, "PickManager");
5071 PerformanceTimer perfTimer("pickManager");
5070 DependencyManager::get<PickManager>()->update();5072 DependencyManager::get<PickManager>()->update();
5071 }5073 }
5072 5074
5073 {5075 {
5074 PROFILE_RANGE(app, "PointerManager");5076 PROFILE_RANGE(app, "PointerManager");
5077 PerformanceTimer perfTimer("pointerManager");
5075 DependencyManager::get<PointerManager>()->update();5078 DependencyManager::get<PointerManager>()->update();
5076 }5079 }
5077 5080
@@ -5097,8 +5100,8 @@ void Application::update(float deltaTime) { · 19 unmodified lines
5097 // Update my voxel servers with my current voxel query...5100 // Update my voxel servers with my current voxel query...
5098 {5101 {
5099 PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());5102 PROFILE_RANGE_EX(app, "QueryOctree", 0xffff0000, (uint64_t)getActiveDisplayPlugin()->presentCount());
5100 QMutexLocker viewLocker(&_viewMutex);
5101 PerformanceTimer perfTimer("queryOctree");5103 PerformanceTimer perfTimer("queryOctree");
5104 QMutexLocker viewLocker(&_viewMutex);
5102 quint64 sinceLastQuery = now - _lastQueriedTime;5105 quint64 sinceLastQuery = now - _lastQueriedTime;
5103 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;5106 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
5104 bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;5107 bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;
@@ -5134,12 +5137,14 @@ void Application::update(float deltaTime) { · 29 unmodified lines
5134 }5137 }
5135 }5138 }
5136 5139
5137 avatarManager->postUpdate(deltaTime, getMain3DScene());
5138
5139
5140 {5140 {
5141 PROFILE_RANGE_EX(app, "PreRenderLambdas", 0xffff0000, (uint64_t)0);5141 PerformanceTimer perfTimer("avatarManager/postUpdate");
5142 avatarManager->postUpdate(deltaTime, getMain3DScene());
5143 }
5142 5144
5145 {
5146 PROFILE_RANGE_EX(app, "PostUpdateLambdas", 0xffff0000, (uint64_t)0);
5147 PerformanceTimer perfTimer("postUpdateLambdas");
5143 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);5148 std::unique_lock<std::mutex> guard(_postUpdateLambdasLock);
5144 for (auto& iter : _postUpdateLambdas) {5149 for (auto& iter : _postUpdateLambdas) {
5145 iter.second();5150 iter.second();
@@ -5148,6 +5153,7 @@ void Application::update(float deltaTime) { · 2 unmodified lines
5148 }5153 }
5149 5154
5150 editRenderArgs([this](AppRenderArgs& appRenderArgs) {5155 editRenderArgs([this](AppRenderArgs& appRenderArgs) {
5156 PerformanceTimer perfTimer("editRenderArgs");
5151 appRenderArgs._headPose= getHMDSensorPose();5157 appRenderArgs._headPose= getHMDSensorPose();
5152 5158
5153 auto myAvatar = getMyAvatar();5159 auto myAvatar = getMyAvatar();
@@ -5261,12 +5267,20 @@ void Application::update(float deltaTime) { · 107 unmodified lines
5261 }5267 }
5262 });5268 });
5263 5269
5264 AnimDebugDraw::getInstance().update();5270 {
5271 PerformanceTimer perfTimer("limitless");
5272 AnimDebugDraw::getInstance().update();
5273 }
5265 5274
5266 DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();5275 {
5276 PerformanceTimer perfTimer("limitless");
5277 DependencyManager::get<LimitlessVoiceRecognitionScriptingInterface>()->update();
5278 }
5267 5279
5268 // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over5280 { // Game loop is done, mark the end of the frame for the scene transactions and the render loop to take over
5269 getMain3DScene()->enqueueFrame();5281 PerformanceTimer perfTimer("enqueueFrame");
5282 getMain3DScene()->enqueueFrame();
5283 }
5270}5284}
5271 5285
5272void Application::sendAvatarViewFrustum() {5286void Application::sendAvatarViewFrustum() {
@@ -6851,7 +6865,8 @@ void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRa · 1578 unmodified lines
6851 6865
6852void Application::takeSecondaryCameraSnapshot() {6866void Application::takeSecondaryCameraSnapshot() {
6853 postLambdaEvent([this] {6867 postLambdaEvent([this] {
6854 Snapshot::saveSnapshot(getActiveDisplayPlugin()->getSecondaryCameraScreenshot());6868 QString snapshotPath = Snapshot::saveSnapshot(getActiveDisplayPlugin()->getSecondaryCameraScreenshot());
6869 emit DependencyManager::get<WindowScriptingInterface>()->stillSnapshotTaken(snapshotPath, true);
6855 });6870 });
6856}6871}
6857 6872

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