summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterhardwaresettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterhardwaresettings.cpp')
-rwxr-xr-x[-rw-r--r--]indra/newview/llfloaterhardwaresettings.cpp23
1 files changed, 22 insertions, 1 deletions
diff --git a/indra/newview/llfloaterhardwaresettings.cpp b/indra/newview/llfloaterhardwaresettings.cpp
index f9a403cf9f..792a2a5d25 100644..100755
--- a/indra/newview/llfloaterhardwaresettings.cpp
+++ b/indra/newview/llfloaterhardwaresettings.cpp
@@ -37,6 +37,7 @@
#include "llspinctrl.h"
#include "llstartup.h"
#include "lltextbox.h"
+#include "llcombobox.h"
#include "pipeline.h"
// Linden library includes
@@ -88,8 +89,10 @@ void LLFloaterHardwareSettings::refresh()
void LLFloaterHardwareSettings::refreshEnabledState()
{
+ F32 mem_multiplier = gSavedSettings.getF32("RenderTextureMemoryMultiple");
+
S32 min_tex_mem = LLViewerTextureList::getMinVideoRamSetting();
- S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting();
+ S32 max_tex_mem = LLViewerTextureList::getMaxVideoRamSetting(false, mem_multiplier);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMinValue(min_tex_mem);
getChild<LLSliderCtrl>("GraphicsCardTextureMemory")->setMaxValue(max_tex_mem);
@@ -99,6 +102,12 @@ void LLFloaterHardwareSettings::refreshEnabledState()
getChildView("vbo")->setEnabled(FALSE);
}
+ if (!LLFeatureManager::getInstance()->isFeatureAvailable("RenderCompressTextures") ||
+ !gGLManager.mHasVertexBufferObject)
+ {
+ getChildView("texture compression")->setEnabled(FALSE);
+ }
+
// if no windlight shaders, turn off nighttime brightness, gamma, and fog distance
LLSpinCtrl* gamma_ctrl = getChild<LLSpinCtrl>("gamma");
gamma_ctrl->setEnabled(!gPipeline.canUseWindLightShaders());
@@ -142,6 +151,18 @@ BOOL LLFloaterHardwareSettings::postBuild()
{
childSetAction("OK", onBtnOK, this);
+// Don't do this on Mac as their braindead GL versioning
+// sets this when 8x and 16x are indeed available
+//
+#if !LL_DARWIN
+ if (gGLManager.mIsIntel || gGLManager.mGLVersion < 3.f)
+ { //remove FSAA settings above "4x"
+ LLComboBox* combo = getChild<LLComboBox>("fsaa");
+ combo->remove("8x");
+ combo->remove("16x");
+ }
+#endif
+
refresh();
center();