summaryrefslogtreecommitdiff
path: root/indra/newview/llstatusbar.cpp
diff options
context:
space:
mode:
authormobserveur <mobserveur@gmail.com>2025-08-30 01:59:43 +0200
committerErik Kundiman <erik@megapahit.org>2025-09-09 07:07:09 +0800
commit317dcdea1ca8d1f540187af47fc23a36ad8232aa (patch)
tree5bdea032c8c2476760efd8b861f72ad3b37c6538 /indra/newview/llstatusbar.cpp
parent03140ed619c5d49eb3851284ae53bbea73a8b831 (diff)
Performance Optimisations, Bloom effect, Visuals Panel
This commit contains performance optimisations in the the pipeline, framebuffer, vertexbuffer, reflection probes, shadows. It also fixes many opengl errors, modifies the opengl debugging, and adds a visuals effects panel.
Diffstat (limited to 'indra/newview/llstatusbar.cpp')
-rw-r--r--indra/newview/llstatusbar.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/indra/newview/llstatusbar.cpp b/indra/newview/llstatusbar.cpp
index bda75c16e7..7d397cddcc 100644
--- a/indra/newview/llstatusbar.cpp
+++ b/indra/newview/llstatusbar.cpp
@@ -307,9 +307,21 @@ void LLStatusBar::refresh()
mFpsUpdateTimer->reset();
S32 fps = (S32) llround(LLTrace::get_frame_recording().getPeriodMedianPerSec(LLStatViewer::FPS, 50));
+ if(fps < 1) fps = 1;
+
+ S32 minFps = (S32) llround(LLTrace::get_frame_recording().getPeriodMinPerSec(LLStatViewer::FPS, 50));
+ S32 maxFps = (S32) llround(LLTrace::get_frame_recording().getPeriodMaxPerSec(LLStatViewer::FPS, 50));
+
+ F32 fpsQuality = (F32)minFps / (F32)fps;
+
std::string fpsStr = std::to_string(fps);
- //mTextFps->setText(fpsStr);
+
mTextFps->setLabel(fpsStr);
+
+ if(fpsQuality < 0.5) mTextFps->setColor(LLColor4(0.6,0.0,0.0));
+ else if(fpsQuality < 0.7) mTextFps->setColor(LLColor4(0.7,0.5,0.0));
+ else if(fpsQuality < 0.9) mTextFps->setColor(LLColor4(0.5,0.7,0.0));
+ else mTextFps->setColor(LLColor4(0.0, 0.7, 0.15));
}
// update clock every 10 seconds