aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-08-30 22:57:40 +0100
committerJustin Clark-Casey (justincc)2012-08-30 22:57:40 +0100
commit3ed0d79b00c313eacb2a7df7d5519e840d2fc5c4 (patch)
tree4f1291357f95473c42dbb958b5097d4f61be02e7
parentIf the compile-time DynamicTextureModule.ReuseTextures flag is set, check met... (diff)
downloadopensim-SC_OLD-3ed0d79b00c313eacb2a7df7d5519e840d2fc5c4.zip
opensim-SC_OLD-3ed0d79b00c313eacb2a7df7d5519e840d2fc5c4.tar.gz
opensim-SC_OLD-3ed0d79b00c313eacb2a7df7d5519e840d2fc5c4.tar.bz2
opensim-SC_OLD-3ed0d79b00c313eacb2a7df7d5519e840d2fc5c4.tar.xz
Make ReuseDynamicTextures an experimental config setting in [Textures]. Default is false, as before.
If true, this setting reuses dynamically generated textures (i.e. created through osSetDynamicTextureData() and similar OSSL functions) where possible rather than always regenerating them. This results in much quicker updates viewer-side but may bloat the asset cache (though this is fixable). Also, sometimes issue have been seen where dynamic textures do not transfer to the viewer properly (permanently blurry). If this happens and that flag is set then they are not regenerated, the viewer has to clear cache or wait for 24 hours before all cached uuids are invalidated. CUrrently experimental. Default is false, as before.
-rw-r--r--OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs5
-rw-r--r--bin/OpenSimDefaults.ini11
2 files changed, 15 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
index f169117..3eedf49 100644
--- a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
+++ b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs
@@ -283,6 +283,10 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
283 283
284 public void Initialise(Scene scene, IConfigSource config) 284 public void Initialise(Scene scene, IConfigSource config)
285 { 285 {
286 IConfig texturesConfig = config.Configs["Textures"];
287 if (texturesConfig != null)
288 ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false);
289
286 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) 290 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
287 { 291 {
288 RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); 292 RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
@@ -292,7 +296,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
292 296
293 public void PostInitialise() 297 public void PostInitialise()
294 { 298 {
295// ReuseTextures = true;
296 if (ReuseTextures) 299 if (ReuseTextures)
297 { 300 {
298 m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); 301 m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);
diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini
index b2fca0c..42b295f 100644
--- a/bin/OpenSimDefaults.ini
+++ b/bin/OpenSimDefaults.ini
@@ -693,6 +693,17 @@
693 ;LevelUpload = 0 693 ;LevelUpload = 0
694 694
695 695
696[Textures]
697 ; If true, textures generated dynamically (i.e. through osSetDynamicTextureData() and similar OSSL functions) are reused where possible
698 ; Chiefly, reuse occurs if a texture has already been generated with identical data and settings, and that texture contains no dynamic components
699 ; (e.g. images pulled from an external HTTP address).
700 ; Reusing previously generated textures results in a much faster update on the viewer but may cause issues if the viewer didn't receive all resolutions of the texture.
701 ; Currently, it will also increase asset cache use since temporary dynamic textures are no longer deleted.
702 ; Hence, currently considered experimental.
703 ; Default is false.
704 ReuseDynamicTextures = false
705
706
696[ODEPhysicsSettings] 707[ODEPhysicsSettings]
697 ; ## 708 ; ##
698 ; ## Physics stats settings 709 ; ## Physics stats settings