summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/app_settings/settings.xml13
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.cpp8
-rw-r--r--indra/newview/llfloatertexturefetchdebugger.h3
-rw-r--r--indra/newview/llviewertexture.cpp3
-rw-r--r--indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml5
5 files changed, 23 insertions, 9 deletions
diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index eb3fcc30ee..d24d1ebd6d 100755
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -10631,6 +10631,17 @@
<key>Value</key>
<real>20.0</real>
</map>
+ <key>TexelPixelRatio</key>
+ <map>
+ <key>Comment</key>
+ <string>texel pixel ratio = texel / pixel</string>
+ <key>Persist</key>
+ <integer>1</integer>
+ <key>Type</key>
+ <string>F32</string>
+ <key>Value</key>
+ <real>1.0</real>
+ </map>
<key>TextureCameraMotionThreshold</key>
<map>
<key>Comment</key>
@@ -10640,7 +10651,7 @@
<key>Type</key>
<string>F32</string>
<key>Value</key>
- <integer>0.2</integer>
+ <real>0.2</real>
</map>
<key>TextureCameraMotionBoost</key>
<map>
diff --git a/indra/newview/llfloatertexturefetchdebugger.cpp b/indra/newview/llfloatertexturefetchdebugger.cpp
index 448c562134..2b34b72055 100644
--- a/indra/newview/llfloatertexturefetchdebugger.cpp
+++ b/indra/newview/llfloatertexturefetchdebugger.cpp
@@ -37,9 +37,7 @@
#include "llviewerwindow.h"
#include "llappviewer.h"
#include "lltexturefetch.h"
-
-//static
-F32 LLFloaterTextureFetchDebugger::sTexelPixelRatio = 1.0f;
+#include "llviewercontrol.h"
LLFloaterTextureFetchDebugger::LLFloaterTextureFetchDebugger(const LLSD& key)
: LLFloater(key),
@@ -83,6 +81,8 @@ BOOL LLFloaterTextureFetchDebugger::postBuild(void)
updateButtons();
+ getChild<LLUICtrl>("texel_pixel_ratio")->setValue(gSavedSettings.getF32("TexelPixelRatio"));
+
return TRUE ;
}
@@ -165,7 +165,7 @@ void LLFloaterTextureFetchDebugger::idle()
//----------------------
void LLFloaterTextureFetchDebugger::onChangeTexelPixelRatio()
{
- sTexelPixelRatio = getChild<LLUICtrl>("texel_pixel_ratio")->getValue().asReal();
+ gSavedSettings.setF32("TexelPixelRatio", getChild<LLUICtrl>("texel_pixel_ratio")->getValue().asReal());
}
void LLFloaterTextureFetchDebugger::onClickStart()
diff --git a/indra/newview/llfloatertexturefetchdebugger.h b/indra/newview/llfloatertexturefetchdebugger.h
index 7181dc04d5..33012c6a3d 100644
--- a/indra/newview/llfloatertexturefetchdebugger.h
+++ b/indra/newview/llfloatertexturefetchdebugger.h
@@ -62,9 +62,8 @@ private:
void updateButtons();
void disableButtons();
-private:
- static F32 sTexelPixelRatio;
+private:
LLTextureFetchDebugger* mDebugger;
std::map<std::string, bool> mButtonStateMap;
};
diff --git a/indra/newview/llviewertexture.cpp b/indra/newview/llviewertexture.cpp
index a7e2ed85fa..6137b7176f 100644
--- a/indra/newview/llviewertexture.cpp
+++ b/indra/newview/llviewertexture.cpp
@@ -722,11 +722,14 @@ void LLViewerTexture::forceImmediateUpdate()
void LLViewerTexture::addTextureStats(F32 virtual_size, BOOL needs_gltexture) const
{
+ static LLCachedControl<F32> sTexelPixelRatio(gSavedSettings,"TexelPixelRatio");
+
if(needs_gltexture)
{
mNeedsGLTexture = TRUE ;
}
+ virtual_size *= sTexelPixelRatio;
if(!mMaxVirtualSizeResetCounter)
{
//flag to reset the values because the old values are used.
diff --git a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
index 7f95d0e84b..0e8b85e3a7 100644
--- a/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
+++ b/indra/newview/skins/default/xui/en/floater_texture_fetch_debugger.xml
@@ -204,13 +204,14 @@
decimal_digits="1"
follows="left|top"
height="20"
- increment="0.1"
+ increment="0.01"
initial_value="1.0"
label="17, Ratio of Texel/Pixel:"
label_width="130"
layout="topleft"
left_delta="0"
- max_val="128.0"
+ max_val="10.0"
+ min_val="0.01"
name="texel_pixel_ratio"
top_delta="30"
width="200">