summaryrefslogtreecommitdiff
path: root/indra/newview/mpfloatertuning.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/mpfloatertuning.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/mpfloatertuning.cpp')
-rw-r--r--indra/newview/mpfloatertuning.cpp42
1 files changed, 16 insertions, 26 deletions
diff --git a/indra/newview/mpfloatertuning.cpp b/indra/newview/mpfloatertuning.cpp
index 1a3e4cf718..23f8c21e70 100644
--- a/indra/newview/mpfloatertuning.cpp
+++ b/indra/newview/mpfloatertuning.cpp
@@ -39,47 +39,37 @@ MPFloaterTuning::MPFloaterTuning(const LLSD& key) : LLFloater(key)
{
}
-void MPFloaterTuning::syncFromPreferenceSetting(void *user_data)
-{
- MPFloaterTuning *self = static_cast<MPFloaterTuning*>(user_data);
+bool MPFloaterTuning::postBuild()
+{
U32 fps = gSavedSettings.getU32("MaxFPS");
if(fps==0) fps=132;
- LLSliderCtrl* fpsSliderCtrl = self->getChild<LLSliderCtrl>("fpsSlider");
- fpsSliderCtrl->setValue(fps,FALSE);
+ mFpsSlider = getChild<LLSliderCtrl>("fpsSliderCtrl");
+ mFpsSlider->setCommitCallback(boost::bind(&MPFloaterTuning::onFpsSliderChanged, this));
- LLTextBox* fpsText = self->getChild<LLTextBox>("fpsText");
- if(fps>120) fpsText->setValue("no limit");
- else fpsText->setValue(std::to_string(fps)+" fps");
-}
-
-bool MPFloaterTuning::postBuild()
-{
- LLSliderCtrl* fpsSliderCtrl = getChild<LLSliderCtrl>("fpsSlider");
- fpsSliderCtrl->setMinValue(12);
- fpsSliderCtrl->setMaxValue(132);
- fpsSliderCtrl->setSliderMouseUpCallback(boost::bind(&MPFloaterTuning::onFinalCommit,this));
+ mFpsSlider->setValue(fps, false);
- LLTextBox* fpsText = getChild<LLTextBox>("fpsText");
- fpsText->setValue("");
+ mFpsTextBox = getChild<LLTextBox>("fpsTextCtrl");
+ mFpsTextBox->setValue("");
- syncFromPreferenceSetting(this);
+ if(fps>120) mFpsTextBox->setValue("no limit");
+ else if(fps==0) mFpsTextBox->setValue("no limit");
+ else mFpsTextBox->setValue(std::to_string(fps)+" fps");
- return TRUE;
+ return true;
}
// Do send-to-the-server work when slider drag completes, or new
// value entered as text.
-void MPFloaterTuning::onFinalCommit()
+void MPFloaterTuning::onFpsSliderChanged()
{
- LLSliderCtrl* fpsSliderCtrl = getChild<LLSliderCtrl>("fpsSlider");
- U32 fps = (U32)fpsSliderCtrl->getValueF32();
+ U32 fps = (U32)mFpsSlider->getValueF32();
gSavedSettings.setU32("MaxFPS",fps);
- LLTextBox* fpsText = getChild<LLTextBox>("fpsText");
- if(fps>120) fpsText->setValue("no limit");
- else fpsText->setValue(std::to_string(fps)+" fps");
+ if(fps>120) mFpsTextBox->setValue("no limit");
+ else if(fps==0) mFpsTextBox->setValue("no limit");
+ else mFpsTextBox->setValue(std::to_string(fps)+" fps");
}
void MPFloaterTuning::onClose(bool app_quitting)