From ba2792bd1ff2237a1083452a7aba88844a7489e0 Mon Sep 17 00:00:00 2001 From: "Justin Clark-Casey (justincc)" Date: Thu, 30 Aug 2012 22:57:40 +0100 Subject: [PATCH] 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. --- .../Scripting/DynamicTexture/DynamicTextureModule.cs | 5 ++++- bin/OpenSimDefaults.ini | 11 +++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs b/OpenSim/Region/CoreModules/Scripting/DynamicTexture/DynamicTextureModule.cs index f16911769e..3eedf498c4 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 public void Initialise(Scene scene, IConfigSource config) { + IConfig texturesConfig = config.Configs["Textures"]; + if (texturesConfig != null) + ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false); + if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID)) { RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); @@ -292,7 +296,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture public void PostInitialise() { -// ReuseTextures = true; if (ReuseTextures) { m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); diff --git a/bin/OpenSimDefaults.ini b/bin/OpenSimDefaults.ini index a27e775775..ac75d63da8 100644 --- a/bin/OpenSimDefaults.ini +++ b/bin/OpenSimDefaults.ini @@ -693,6 +693,17 @@ ;LevelUpload = 0 +[Textures] + ; If true, textures generated dynamically (i.e. through osSetDynamicTextureData() and similar OSSL functions) are reused where possible + ; Chiefly, reuse occurs if a texture has already been generated with identical data and settings, and that texture contains no dynamic components + ; (e.g. images pulled from an external HTTP address). + ; 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. + ; Currently, it will also increase asset cache use since temporary dynamic textures are no longer deleted. + ; Hence, currently considered experimental. + ; Default is false. + ReuseDynamicTextures = false + + [ODEPhysicsSettings] ; ## ; ## Physics stats settings