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.
0.7.3-extended
Justin Clark-Casey (justincc) 2012-08-30 22:57:40 +01:00
parent 6c36471f0c
commit 7ce30cc49e
2 changed files with 15 additions and 1 deletions

View File

@ -283,6 +283,10 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
public void Initialise(Scene scene, IConfigSource config) 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)) if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
{ {
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene); RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
@ -292,7 +296,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
public void PostInitialise() public void PostInitialise()
{ {
// ReuseTextures = true;
if (ReuseTextures) if (ReuseTextures)
{ {
m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative); m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);

View File

@ -670,6 +670,17 @@
UseMeshiesPhysicsMesh = true UseMeshiesPhysicsMesh = true
[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] [ODEPhysicsSettings]
; ## ; ##
; ## Physics stats settings ; ## Physics stats settings