History

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

barnold1953 committed 12 years ago

Commit 6e92bee2 parents 8147f2c af6704a50 files · +873 −253Browse files

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

Unified · Split

interface/src/Application.cpp+82−81
@@ -354,6 +354,9 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 353 unmodified lines
354354
355355 // Set the sixense filtering
356356 _sixenseManager.setFilter(Menu::getInstance()->isOptionChecked(MenuOption::FilterSixense));
357+
358+ // Set hand controller velocity filtering
359+ _sixenseManager.setLowVelocityFilter(Menu::getInstance()->isOptionChecked(MenuOption::LowVelocityFilter));
357360
358361 checkVersion();
359362
@@ -601,9 +604,19 @@ void Application::paintGL() { · 241 unmodified lines
601604
602605 } else if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
603606 _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));
607+ //Only behave like a true mirror when in the OR
608+ if (OculusManager::isConnected()) {
609+ _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _scaleMirror);
610+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
611+ _myCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition() + glm::vec3(0, _raiseMirror * _myAvatar->getScale(), 0));
612+ } else {
613+ _myCamera.setTightness(0.0f);
614+ glm::vec3 eyePosition = _myAvatar->getHead()->calculateAverageEyePosition();
615+ float headHeight = eyePosition.y - _myAvatar->getPosition().y;
616+ _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _scaleMirror);
617+ _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight + (_raiseMirror * _myAvatar->getScale()), 0));
618+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI + _rotateMirror, 0.0f)));
619+ }
607620 }
608621
609622 // Update camera position
@@ -682,13 +695,10 @@ void Application::paintGL() { · 72 unmodified lines
682695 }
683696
684697 {
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);
698+ PerformanceTimer perfTimer("renderOverlay");
699+ // PrioVR will only work if renderOverlay is called, calibration is connected to Application::renderingOverlay()
700+ _applicationOverlay.renderOverlay(true);
701+ if (Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
692702 _applicationOverlay.displayOverlayTexture();
693703 }
694704 }
@@ -713,6 +723,7 @@ void Application::resizeGL(int width, int height) { · 18 unmodified lines
713723 resetCamerasOnResizeGL(_myCamera, width, height);
714724
715725 glViewport(0, 0, width, height); // shouldn't this account for the menu???
726+ _applicationOverlay.resize();
716727
717728 updateProjectionMatrix();
718729 glLoadIdentity();
@@ -1010,6 +1021,9 @@ void Application::keyPressEvent(QKeyEvent* event) { · 291 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/_models");
2087+ PerformanceTimer perfTimer("models");
20842088 _models.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,13 +2121,13 @@ 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
21282128 // Update my voxel servers with my current voxel query...
21292129 {
2130− PerformanceTimer perfTimer("updateMyAvatar/queryOctree");
2130+ PerformanceTimer perfTimer("queryOctree");
21312131 quint64 now = usecTimestampNow();
21322132 quint64 sinceLastQuery = now - _lastQueriedTime;
21332133 const quint64 TOO_LONG_SINCE_LAST_QUERY = 3 * USECS_PER_SECOND;
@@ -2460,7 +2460,7 @@ glm::vec3 Application::getSunDirection() { · 326 unmodified lines
24602460 }
24612461
24622462 void Application::updateShadowMap() {
2463− PerformanceTimer perfTimer("paintGL/updateShadowMap");
2463+ PerformanceTimer perfTimer("shadowMap");
24642464 QOpenGLFramebufferObject* fbo = _textureCache.getShadowFramebufferObject();
24652465 fbo->bind();
24662466 glEnable(GL_DEPTH_TEST);
@@ -2622,7 +2622,7 @@ QImage Application::renderAvatarBillboard() { · 155 unmodified lines
26222622 }
26232623
26242624 void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) {
2625− PerformanceTimer perfTimer("paintGL/displaySide");
2625+ PerformanceTimer perfTimer("display");
26262626 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings), "Application::displaySide()");
26272627 // transform by eye offset
26282628
@@ -2656,7 +2656,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 27 unmodified lines
26562656
26572657 // Setup 3D lights (after the camera transform, so that they are positioned in world space)
26582658 {
2659− PerformanceTimer perfTimer("paintGL/displaySide/setupWorldLight");
2659+ PerformanceTimer perfTimer("lights");
26602660 setupWorldLight();
26612661 }
26622662
@@ -2675,7 +2675,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 12 unmodified lines
26752675 }
26762676
26772677 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Stars)) {
2678− PerformanceTimer perfTimer("paintGL/displaySide/stars");
2678+ PerformanceTimer perfTimer("stars");
26792679 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
26802680 "Application::displaySide() ... stars...");
26812681 if (!_stars.isStarsLoaded()) {
@@ -2704,7 +2704,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 22 unmodified lines
27042704
27052705 // draw the sky dome
27062706 if (!selfAvatarOnly && Menu::getInstance()->isOptionChecked(MenuOption::Atmosphere)) {
2707− PerformanceTimer perfTimer("paintGL/displaySide/atmosphere");
2707+ PerformanceTimer perfTimer("atmosphere");
27082708 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27092709 "Application::displaySide() ... atmosphere...");
27102710 _environment.renderAtmospheres(whichCamera);
@@ -2725,13 +2725,13 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 14 unmodified lines
27252725
27262726 // draw the audio reflector overlay
27272727 {
2728− PerformanceTimer perfTimer("paintGL/displaySide/audioReflector");
2728+ PerformanceTimer perfTimer("audio");
27292729 _audioReflector.render();
27302730 }
27312731
27322732 // Draw voxels
27332733 if (Menu::getInstance()->isOptionChecked(MenuOption::Voxels)) {
2734− PerformanceTimer perfTimer("paintGL/displaySide/voxels");
2734+ PerformanceTimer perfTimer("voxels");
27352735 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27362736 "Application::displaySide() ... voxels...");
27372737 _voxels.render();
@@ -2739,14 +2739,14 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27392739
27402740 // also, metavoxels
27412741 if (Menu::getInstance()->isOptionChecked(MenuOption::Metavoxels)) {
2742− PerformanceTimer perfTimer("paintGL/displaySide/metavoxels");
2742+ PerformanceTimer perfTimer("metavoxels");
27432743 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27442744 "Application::displaySide() ... metavoxels...");
27452745 _metavoxels.render();
27462746 }
27472747
27482748 if (Menu::getInstance()->isOptionChecked(MenuOption::BuckyBalls)) {
2749− PerformanceTimer perfTimer("paintGL/displaySide/buckyBalls");
2749+ PerformanceTimer perfTimer("buckyBalls");
27502750 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27512751 "Application::displaySide() ... bucky balls...");
27522752 _buckyBalls.render();
@@ -2754,7 +2754,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27542754
27552755 // render particles...
27562756 if (Menu::getInstance()->isOptionChecked(MenuOption::Particles)) {
2757− PerformanceTimer perfTimer("paintGL/displaySide/particles");
2757+ PerformanceTimer perfTimer("particles");
27582758 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27592759 "Application::displaySide() ... particles...");
27602760 _particles.render();
@@ -2762,7 +2762,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27622762
27632763 // render models...
27642764 if (Menu::getInstance()->isOptionChecked(MenuOption::Models)) {
2765− PerformanceTimer perfTimer("paintGL/displaySide/models");
2765+ PerformanceTimer perfTimer("models");
27662766 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27672767 "Application::displaySide() ... models...");
27682768 _models.render();
@@ -2770,7 +2770,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
27702770
27712771 // render the ambient occlusion effect if enabled
27722772 if (Menu::getInstance()->isOptionChecked(MenuOption::AmbientOcclusion)) {
2773− PerformanceTimer perfTimer("paintGL/displaySide/AmbientOcclusion");
2773+ PerformanceTimer perfTimer("ambientOcclusion");
27742774 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
27752775 "Application::displaySide() ... AmbientOcclusion...");
27762776 _ambientOcclusionEffect.render();
@@ -2785,9 +2785,9 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 8 unmodified lines
27852785
27862786 bool mirrorMode = (whichCamera.getInterpolatedMode() == CAMERA_MODE_MIRROR);
27872787 {
2788− PerformanceTimer perfTimer("paintGL/displaySide/renderAvatars");
2788+ PerformanceTimer perfTimer("avatars");
27892789
2790− if (1 || OculusManager::isConnected()) {
2790+ if (OculusManager::isConnected()) {
27912791 OculusManager::renderLaserPointer();
27922792 }
27932793
@@ -2796,14 +2796,15 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 2 unmodified lines
27962796
27972797 if (!selfAvatarOnly) {
27982798 // Render the world box
2799− if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats)) {
2800− PerformanceTimer perfTimer("paintGL/displaySide/renderWorldBox");
2799+ if (whichCamera.getMode() != CAMERA_MODE_MIRROR && Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
2800+ Menu::getInstance()->isOptionChecked(MenuOption::UserInterface)) {
2801+ PerformanceTimer perfTimer("worldBox");
28012802 renderWorldBox();
28022803 }
28032804
28042805 // view frustum for debugging
28052806 if (Menu::getInstance()->isOptionChecked(MenuOption::DisplayFrustum) && whichCamera.getMode() != CAMERA_MODE_MIRROR) {
2806− PerformanceTimer perfTimer("paintGL/displaySide/ViewFrustum");
2807+ PerformanceTimer perfTimer("viewFrustum");
28072808 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
28082809 "Application::displaySide() ... renderViewFrustum...");
28092810 renderViewFrustum(_viewFrustum);
@@ -2811,7 +2812,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 1 unmodified line
28112812
28122813 // render voxel fades if they exist
28132814 if (_voxelFades.size() > 0) {
2814− PerformanceTimer perfTimer("paintGL/displaySide/voxel fades");
2815+ PerformanceTimer perfTimer("voxelFades");
28152816 PerformanceWarning warn(Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings),
28162817 "Application::displaySide() ... voxel fades...");
28172818 _voxelFadesLock.lockForWrite();
@@ -2828,13 +2829,13 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 10 unmodified lines
28282829
28292830 // give external parties a change to hook in
28302831 {
2831− PerformanceTimer perfTimer("paintGL/displaySide/inWorldInterface");
2832+ PerformanceTimer perfTimer("inWorldInterface");
28322833 emit renderingInWorldInterface();
28332834 }
28342835
28352836 // render JS/scriptable overlays
28362837 {
2837− PerformanceTimer perfTimer("paintGL/displaySide/3dOverlays");
2838+ PerformanceTimer perfTimer("3dOverlays");
28382839 _overlays.render3D();
28392840 }
28402841 }

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