History

Merge branch 'master' of https://github.com/highfidelity/hifi into virtualEntities

ZappoMan committed 12 years ago

Commit 2baac962 parents 780532b 43ac868110 files · +3160 −871Browse files

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

Unified · Split

interface/src/Application.cpp+94−83
@@ -172,7 +172,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 171 unmodified lines
172172 _runningScriptsWidget(NULL),
173173 _runningScriptsWidgetWasVisible(false),
174174 _trayIcon(new QSystemTrayIcon(_window)),
175− _lastNackTime(usecTimestampNow())
175+ _lastNackTime(usecTimestampNow()),
176+ _lastSendDownstreamAudioStats(usecTimestampNow())
176177 {
177178 // read the ApplicationInfo.ini file for Name/Version/Domain information
178179 QSettings applicationInfo(Application::resourcesPath() + "info/ApplicationInfo.ini", QSettings::IniFormat);
@@ -354,6 +355,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 175 unmodified lines
354355
355356 // Set the sixense filtering
356357 _sixenseManager.setFilter(Menu::getInstance()->isOptionChecked(MenuOption::FilterSixense));
358+
359+ // Set hand controller velocity filtering
360+ _sixenseManager.setLowVelocityFilter(Menu::getInstance()->isOptionChecked(MenuOption::LowVelocityFilter));
357361
358362 checkVersion();
359363
@@ -601,9 +605,19 @@ void Application::paintGL() { · 241 unmodified lines
601605
602606 } else if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
603607 _myCamera.setTightness(0.0f);
604− _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _scaleMirror);
605− _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
606− _myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition() + glm::vec3(0, _raiseMirror * _myAvatar->getScale(), 0));
608+ //Only behave like a true mirror when in the OR
609+ if (OculusManager::isConnected()) {
610+ _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _scaleMirror);
611+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
612+ _myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition() + glm::vec3(0, _raiseMirror * _myAvatar->getScale(), 0));
613+ } else {
614+ _myCamera.setTightness(0.0f);
615+ glm::vec3 eyePosition = _myAvatar->getHead()->calculateAverageEyePosition();
616+ float headHeight = eyePosition.y - _myAvatar->getPosition().y;
617+ _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _scaleMirror);
618+ _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight + (_raiseMirror * _myAvatar->getScale()), 0));
619+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
620+ }
607621 }
608622
609623 // Update camera position
@@ -682,13 +696,10 @@ void Application::paintGL() { · 72 unmodified lines
682696 }
683697
684698 {
685− PerformanceTimer perfTimer("paintGL/renderOverlay");
686− //If alpha is 1, we can render directly to the screen.
687− if (_applicationOverlay.getAlpha() == 1.0f) {
688− _applicationOverlay.renderOverlay();
689− } else {
690− //Render to to texture so we can fade it
691− _applicationOverlay.renderOverlay(true);
699+ PerformanceTimer perfTimer("renderOverlay");
700+ // PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
701+ _applicationOverlay.renderOverlay(true);
702+ if (Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
692703 _applicationOverlay.displayOverlayTexture();
693704 }
694705 }
@@ -1010,6 +1021,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 315 unmodified lines
10101021 Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror);
10111022 }
10121023 break;
1024+ case Qt::Key_Slash:
1025+ Menu::getInstance()->triggerOption(MenuOption::UserInterface);
1026+ break;
10131027 case Qt::Key_F:
10141028 if (isShifted) {
10151029 Menu::getInstance()->triggerOption(MenuOption::DisplayFrustum);
@@ -1029,7 +1043,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 13 unmodified lines
10291043 }
10301044 break;
10311045 break;
1032− case Qt::Key_Slash:
1046+ case Qt::Key_Percent:
10331047 Menu::getInstance()->triggerOption(MenuOption::Stats);
10341048 break;
10351049 case Qt::Key_Plus:
@@ -1355,18 +1369,18 @@ void Application::idle() { · 319 unmodified lines
13551369 if (timeSinceLastUpdate > IDLE_SIMULATE_MSECS) {
13561370 _lastTimeUpdated.start();
13571371 {
1358− PerformanceTimer perfTimer("idle/update");
1372+ PerformanceTimer perfTimer("update");
13591373 PerformanceWarning warn(showWarnings, "Application::idle()... update()");
13601374 const float BIGGEST_DELTA_TIME_SECS = 0.25f;
13611375 update(glm::clamp((float)timeSinceLastUpdate / 1000.f, 0.f, BIGGEST_DELTA_TIME_SECS));
13621376 }
13631377 {
1364− PerformanceTimer perfTimer("idle/updateGL");
1378+ PerformanceTimer perfTimer("updateGL");
13651379 PerformanceWarning warn(showWarnings, "Application::idle()... updateGL()");
13661380 _glWidget->updateGL();
13671381 }
13681382 {
1369− PerformanceTimer perfTimer("idle/rest");
1383+ PerformanceTimer perfTimer("rest");
13701384 PerformanceWarning warn(showWarnings, "Application::idle()... rest of it");
13711385 _idleLoopStdev.addValue(timeSinceLastUpdate);
13721386
@@ -1378,7 +1392,7 @@ void Application::idle() { · 5 unmodified lines
13781392 }
13791393
13801394 if (Menu::getInstance()->isOptionChecked(MenuOption::BuckyBalls)) {
1381− PerformanceTimer perfTimer("idle/rest/_buckyBalls");
1395+ PerformanceTimer perfTimer("buckyBalls");
13821396 _buckyBalls.simulate(timeSinceLastUpdate / 1000.f, Application::getInstance()->getAvatar()->getHandData());
13831397 }
13841398
@@ -1426,6 +1440,10 @@ void Application::setRenderVoxels(bool voxelRender) { · 41 unmodified lines
14261440 }
14271441 }
14281442
1443+void Application::setLowVelocityFilter(bool lowVelocityFilter) {
1444+ getSixenseManager()->setLowVelocityFilter(lowVelocityFilter);
1445+}
1446+
14291447 void Application::doKillLocalVoxels() {
14301448 _wantToKillLocalVoxels = true;
14311449 }
@@ -1792,7 +1810,7 @@ bool Application::isLookingAtMyAvatar(Avatar* avatar) { · 360 unmodified lines
17921810 }
17931811
17941812 void Application::updateLOD() {
1795− PerformanceTimer perfTimer("idle/update/updateLOD");
1813+ PerformanceTimer perfTimer("LOD");
17961814 // adjust it unless we were asked to disable this feature, or if we're currently in throttleRendering mode
17971815 if (!Menu::getInstance()->isOptionChecked(MenuOption::DisableAutoAdjustLOD) && !isThrottleRendering()) {
17981816 Menu::getInstance()->autoAdjustLOD(_fps);
@@ -1802,7 +1820,7 @@ void Application::updateLOD() { · 3 unmodified lines
18021820 }
18031821
18041822 void Application::updateMouseRay() {
1805− PerformanceTimer perfTimer("idle/update/updateMouseRay");
1823+ PerformanceTimer perfTimer("mouseRay");
18061824
18071825 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
18081826 PerformanceWarning warn(showWarnings, "Application::updateMouseRay()");
@@ -1835,8 +1853,6 @@ void Application::updateMouseRay() { · 26 unmodified lines
18351853 }
18361854
18371855 void Application::updateFaceshift() {
1838− PerformanceTimer perfTimer("idle/update/updateFaceshift");
1839−
18401856 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
18411857 PerformanceWarning warn(showWarnings, "Application::updateFaceshift()");
18421858
@@ -1850,8 +1866,6 @@ void Application::updateFaceshift() { · 7 unmodified lines
18501866 }
18511867
18521868 void Application::updateVisage() {
1853− PerformanceTimer perfTimer("idle/update/updateVisage");
1854−
18551869 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
18561870 PerformanceWarning warn(showWarnings, "Application::updateVisage()");
18571871
@@ -1860,11 +1874,11 @@ void Application::updateVisage() { · 2 unmodified lines
18601874 }
18611875
18621876 void Application::updateMyAvatarLookAtPosition() {
1863− PerformanceTimer perfTimer("idle/update/updateMyAvatarLookAtPosition");
1864−
1877+ PerformanceTimer perfTimer("lookAt");
18651878 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
18661879 PerformanceWarning warn(showWarnings, "Application::updateMyAvatarLookAtPosition()");
18671880
1881+ _myAvatar->updateLookAtTargetAvatar();
18681882 FaceTracker* tracker = getActiveFaceTracker();
18691883
18701884 bool isLookingAtSomeone = false;
@@ -1927,7 +1941,7 @@ void Application::updateMyAvatarLookAtPosition() { · 56 unmodified lines
19271941 }
19281942
19291943 void Application::updateThreads(float deltaTime) {
1930− PerformanceTimer perfTimer("idle/update/updateThreads");
1944+ PerformanceTimer perfTimer("updateThreads");
19311945 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
19321946 PerformanceWarning warn(showWarnings, "Application::updateThreads()");
19331947
@@ -1942,7 +1956,7 @@ void Application::updateThreads(float deltaTime) { · 8 unmodified lines
19421956 }
19431957
19441958 void Application::updateMetavoxels(float deltaTime) {
1945− PerformanceTimer perfTimer("idle/update/updateMetavoxels");
1959+ PerformanceTimer perfTimer("updateMetavoxels");
19461960 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
19471961 PerformanceWarning warn(showWarnings, "Application::updateMetavoxels()");
19481962
@@ -1972,7 +1986,7 @@ void Application::cameraMenuChanged() { · 23 unmodified lines
19721986 }
19731987
19741988 void Application::updateCamera(float deltaTime) {
1975− PerformanceTimer perfTimer("idle/update/updateCamera");
1989+ PerformanceTimer perfTimer("updateCamera");
19761990 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
19771991 PerformanceWarning warn(showWarnings, "Application::updateCamera()");
19781992
@@ -1990,7 +2004,7 @@ void Application::updateCamera(float deltaTime) { · 11 unmodified lines
19902004 }
19912005
19922006 void Application::updateDialogs(float deltaTime) {
1993− PerformanceTimer perfTimer("idle/update/updateDialogs");
2007+ PerformanceTimer perfTimer("updateDialogs");
19942008 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
19952009 PerformanceWarning warn(showWarnings, "Application::updateDialogs()");
19962010
@@ -2007,7 +2021,7 @@ void Application::updateDialogs(float deltaTime) { · 10 unmodified lines
20072021 }
20082022
20092023 void Application::updateCursor(float deltaTime) {
2010− PerformanceTimer perfTimer("idle/update/updateCursor");
2024+ PerformanceTimer perfTimer("updateCursor");
20112025 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
20122026 PerformanceWarning warn(showWarnings, "Application::updateCursor()");
20132027
@@ -2032,83 +2046,69 @@ void Application::updateCursor(float deltaTime) { · 18 unmodified lines
20322046 }
20332047
20342048 void Application::update(float deltaTime) {
2035− //PerformanceTimer perfTimer("idle/update"); // NOTE: we track this above in Application::idle()
2036−
20372049 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
20382050 PerformanceWarning warn(showWarnings, "Application::update()");
20392051
20402052 updateLOD();
20412053 updateMouseRay(); // check what's under the mouse and update the mouse voxel
2042− updateFaceshift();
2043− updateVisage();
2044−
2045− {
2046− PerformanceTimer perfTimer("idle/update/updateLookAtTargetAvatar");
2047− _myAvatar->updateLookAtTargetAvatar();
2048− }
2049− updateMyAvatarLookAtPosition();
20502054 {
2051− PerformanceTimer perfTimer("idle/update/sixense,joystick,prioVR");
2055+ PerformanceTimer perfTimer("devices");
2056+ updateFaceshift();
2057+ updateVisage();
20522058 _sixenseManager.update(deltaTime);
20532059 _joystickManager.update();
20542060 _prioVR.update(deltaTime);
20552061 }
2056−
20572062 {
2058− PerformanceTimer perfTimer("idle/update/updateMyAvatar");
2063+ PerformanceTimer perfTimer("myAvatar");
2064+ updateMyAvatarLookAtPosition();
20592065 updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes
20602066 }
20612067
20622068 updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process...
20632069
2064− {
2065− PerformanceTimer perfTimer("idle/update/_avatarManager");
2066− _avatarManager.updateOtherAvatars(deltaTime); //loop through all the other avatars and simulate them...
2067− }
2070+ _avatarManager.updateOtherAvatars(deltaTime); //loop through all the other avatars and simulate them...
2071+
20682072 updateMetavoxels(deltaTime); // update metavoxels
20692073 updateCamera(deltaTime); // handle various camera tweaks like off axis projection
20702074 updateDialogs(deltaTime); // update various stats dialogs if present
20712075 updateCursor(deltaTime); // Handle cursor updates
20722076
20732077 {
2074− PerformanceTimer perfTimer("idle/update/_particles");
2078+ PerformanceTimer perfTimer("particles");
20752079 _particles.update(); // update the particles...
2076− }
2077− {
2078− PerformanceTimer perfTimer("idle/update/_particleCollisionSystem");
2079− _particleCollisionSystem.update(); // collide the particles...
2080+ {
2081+ PerformanceTimer perfTimer("collisions");
2082+ _particleCollisionSystem.update(); // collide the particles...
2083+ }
20802084 }
20812085
20822086 {
2083− PerformanceTimer perfTimer("idle/update/_entities");
2087+ PerformanceTimer perfTimer("entities");
20842088 _entities.update(); // update the models...
20852089 }
20862090
20872091 {
2088− PerformanceTimer perfTimer("idle/update/_overlays");
2092+ PerformanceTimer perfTimer("overlays");
20892093 _overlays.update(deltaTime);
20902094 }
20912095
20922096 {
2093− PerformanceTimer perfTimer("idle/update/emit simulating");
2097+ PerformanceTimer perfTimer("emitSimulating");
20942098 // let external parties know we're updating
20952099 emit simulating(deltaTime);
20962100 }
20972101 }
20982102
20992103 void Application::updateMyAvatar(float deltaTime) {
2100− PerformanceTimer perfTimer("updateMyAvatar");
21012104 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
21022105 PerformanceWarning warn(showWarnings, "Application::updateMyAvatar()");
21032106
2104− {
2105− PerformanceTimer perfTimer("updateMyAvatar/_myAvatar->update()");
2106− _myAvatar->update(deltaTime);
2107− }
2107+ _myAvatar->update(deltaTime);
21082108
21092109 {
21102110 // send head/hand data to the avatar mixer and voxel server
2111− PerformanceTimer perfTimer("updateMyAvatar/sendToAvatarMixer");
2111+ PerformanceTimer perfTimer("send");
21122112 QByteArray packet = byteArrayWithPopulatedHeader(PacketTypeAvatarData);
21132113 packet.append(_myAvatar->toByteArray());
21142114 controlledBroadcastToNodes(packet, NodeSet() << NodeType::AvatarMixer);
@@ -2121,14 +2121,15 @@ void Application::updateMyAvatar(float deltaTime) { · 6 unmodified lines
21212121 // actually need to calculate the view frustum planes to send these details
21222122 // to the server.
21232123 {
2124− PerformanceTimer perfTimer("updateMyAvatar/loadViewFrustum");
2124+ PerformanceTimer perfTimer("loadViewFrustum");
21252125 loadViewFrustum(_myCamera, _viewFrustum);
21262126 }
21272127
2128+ quint64 now = usecTimestampNow();
2129+
21282130 // Update my voxel servers with my current voxel query...
21292131 {
2130− PerformanceTimer perfTimer("updateMyAvatar/queryOctree");
2131− quint64 now = usecTimestampNow();
2132+ PerformanceTimer perfTimer("queryOctree");
21322133 quint64 sinceLastQuery = now - _lastQueriedTime;
21332134 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
21342135 bool queryIsDue = sinceLastQuery > TOO_LONG_SINCE_LAST_QUERY;
@@ -2146,7 +2147,6 @@ void Application::updateMyAvatar(float deltaTime) { · 11 unmodified lines
21462147
21472148 // sent nack packets containing missing sequence numbers of received packets from nodes
21482149 {
2149− quint64 now = usecTimestampNow();
21502150 quint64 sinceLastNack = now - _lastNackTime;
21512151 const quint64 TOO_LONG_SINCE_LAST_NACK = 1 * USECS_PER_SECOND;
21522152 if (sinceLastNack > TOO_LONG_SINCE_LAST_NACK) {
@@ -2154,6 +2154,15 @@ void Application::updateMyAvatar(float deltaTime) { · 1 unmodified line
21542154 sendNackPackets();
21552155 }
21562156 }
2157+
2158+ {
2159+ quint64 sinceLastNack = now - _lastSendDownstreamAudioStats;
2160+ if (sinceLastNack > TOO_LONG_SINCE_LAST_SEND_DOWNSTREAM_AUDIO_STATS) {
2161+ _lastSendDownstreamAudioStats = now;
2162+
2163+ QMetaObject::invokeMethod(&_audio, "sendDownstreamAudioStatsPacket", Qt::QueuedConnection);
2164+ }
2165+ }
21572166 }
21582167
21592168 int Application::sendNackPackets() {
@@ -2460,7 +2469,7 @@ glm::vec3 Application::getSunDirection() { · 300 unmodified lines
24602469 }
24612470
24622471 void Application::updateShadowMap() {
2463− PerformanceTimer perfTimer("paintGL/updateShadowMap");
2472+ PerformanceTimer perfTimer("shadowMap");
24642473 QOpenGLFramebufferObject* fbo = _textureCache.getShadowFramebufferObject();
24652474 fbo->bind();
24662475 glEnable(GL_DEPTH_TEST);
@@ -2622,7 +2631,7 @@ QImage Application::renderAvatarBillboard() { · 155 unmodified lines
26222631 }
26232632
26242633 void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
2625− PerformanceTimer perfTimer("paintGL/displaySide");
2634+ PerformanceTimer perfTimer("display");
26262635 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()");
26272636 // transform by eye offset
26282637
@@ -2656,7 +2665,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 27 unmodified lines
26562665
26572666 // Setup 3D lights (after the camera transform, so that they are positioned in world space)
26582667 {
2659− PerformanceTimer perfTimer("paintGL/displaySide/setupWorldLight");
2668+ PerformanceTimer perfTimer("lights");
26602669 setupWorldLight();
26612670 }
26622671
@@ -2675,7 +2684,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 12 unmodified lines
26752684 }
26762685
26772686 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Stars)) {
2678− PerformanceTimer perfTimer("paintGL/displaySide/stars");
2687+ PerformanceTimer perfTimer("stars");
26792688 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
26802689 "Application::displaySide() ... stars...");
26812690 if (!_stars.isStarsLoaded()) {
@@ -2704,7 +2713,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 22 unmodified lines
27042713
27052714 // draw the sky dome
27062715 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {
2707− PerformanceTimer perfTimer("paintGL/displaySide/atmosphere");
2716+ PerformanceTimer perfTimer("atmosphere");
27082717 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27092718 "Application::displaySide() ... atmosphere...");
27102719 _environment.renderAtmospheres(whichCamera);
@@ -2725,13 +2734,13 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 14 unmodified lines
27252734
27262735 // draw the audio reflector overlay
27272736 {
2728− PerformanceTimer perfTimer("paintGL/displaySide/audioReflector");
2737+ PerformanceTimer perfTimer("audio");
27292738 _audioReflector.render();
27302739 }
27312740
27322741 // Draw voxels
27332742 if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) {
2734− PerformanceTimer perfTimer("paintGL/displaySide/voxels");
2743+ PerformanceTimer perfTimer("voxels");
27352744 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27362745 "Application::displaySide() ... voxels...");
27372746 _voxels.render();
@@ -2739,14 +2748,14 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27392748
27402749 // also, metavoxels
27412750 if (Menu::getInstance()->isOptionChecked(MenuOption::Metavoxels)) {
2742− PerformanceTimer perfTimer("paintGL/displaySide/metavoxels");
2751+ PerformanceTimer perfTimer("metavoxels");
27432752 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27442753 "Application::displaySide() ... metavoxels...");
27452754 _metavoxels.render();
27462755 }
27472756
27482757 if (Menu::getInstance()->isOptionChecked(MenuOption::BuckyBalls)) {
2749− PerformanceTimer perfTimer("paintGL/displaySide/buckyBalls");
2758+ PerformanceTimer perfTimer("buckyBalls");
27502759 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27512760 "Application::displaySide() ... bucky balls...");
27522761 _buckyBalls.render();
@@ -2754,7 +2763,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27542763
27552764 // render particles...
27562765 if (Menu::getInstance()->isOptionChecked(MenuOption::Particles)) {
2757− PerformanceTimer perfTimer("paintGL/displaySide/particles");
2766+ PerformanceTimer perfTimer("particles");
27582767 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27592768 "Application::displaySide() ... particles...");
27602769 _particles.render();
@@ -2762,7 +2771,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27622771
27632772 // render models...
27642773 if (Menu::getInstance()->isOptionChecked(MenuOption::Models)) {
2765− PerformanceTimer perfTimer("paintGL/displaySide/models");
2774+ PerformanceTimer perfTimer("models");
27662775 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27672776 "Application::displaySide() ... models...");
27682777 _entities.render();
@@ -2770,7 +2779,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27702779
27712780 // render the ambient occlusion effect if enabled
27722781 if (Menu::getInstance()->isOptionChecked(MenuOption::AmbientOcclusion)) {
2773− PerformanceTimer perfTimer("paintGL/displaySide/AmbientOcclusion");
2782+ PerformanceTimer perfTimer("ambientOcclusion");
27742783 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27752784 "Application::displaySide() ... AmbientOcclusion...");
27762785 _ambientOcclusionEffect.render();
@@ -2785,20 +2794,22 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 8 unmodified lines
27852794
27862795 bool mirrorMode = (whichCamera.getInterpolatedMode() == CAMERA_MODE_MIRROR);
27872796 {
2788− PerformanceTimer perfTimer("paintGL/displaySide/renderAvatars");
2797+ PerformanceTimer perfTimer("avatars");
2798+
27892799 _avatarManager.renderAvatars(mirrorMode ? Avatar::MIRROR_RENDER_MODE : Avatar::NORMAL_RENDER_MODE, selfAvatarOnly);
27902800 }
27912801
27922802 if (!selfAvatarOnly) {
27932803 // Render the world box
2794− if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats)) {
2795− PerformanceTimer perfTimer("paintGL/displaySide/renderWorldBox");
2804+ if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
2805+ Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
2806+ PerformanceTimer perfTimer("worldBox");
27962807 renderWorldBox();
27972808 }
27982809
27992810 // view frustum for debugging
28002811 if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayFrustum) && whichCamera.getMode() != CAMERA_MODE_MIRROR) {
2801− PerformanceTimer perfTimer("paintGL/displaySide/ViewFrustum");
2812+ PerformanceTimer perfTimer("viewFrustum");
28022813 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
28032814 "Application::displaySide() ... renderViewFrustum...");
28042815 renderViewFrustum(_viewFrustum);
@@ -2806,7 +2817,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
28062817
28072818 // render voxel fades if they exist
28082819 if (_voxelFades.size() > 0) {
2809− PerformanceTimer perfTimer("paintGL/displaySide/voxel fades");
2820+ PerformanceTimer perfTimer("voxelFades");
28102821 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
28112822 "Application::displaySide() ... voxel fades...");
28122823 _voxelFadesLock.lockForWrite();
@@ -2823,13 +2834,13 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 10 unmodified lines
28232834
28242835 // give external parties a change to hook in
28252836 {
2826− PerformanceTimer perfTimer("paintGL/displaySide/inWorldInterface");
2837+ PerformanceTimer perfTimer("inWorldInterface");
28272838 emit renderingInWorldInterface();
28282839 }
28292840
28302841 // render JS/scriptable overlays
28312842 {
2832− PerformanceTimer perfTimer("paintGL/displaySide/3dOverlays");
2843+ PerformanceTimer perfTimer("3dOverlays");
28332844 _overlays.render3D();
28342845 }
28352846 }

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