This change addresses two issues:

  [1] It adds a flag field to the blendface call which allows the
      caller to indicate whether or not the generated asset is
      temporary, and whether or not the asset being replaced should
      be explicitly retired fromt the memory cache. The decimal
      values correspond to:
      0 - Permanent asset, do not expire old asset
      1 - Permanent asset, expire old asset
      2 - Temporary asset, do not expire old asset
      3 - Temporary asset, expire old asset
      '3' corresponds to the default behavior seen today, and is
          the continued behavior of the non-blendface calls.
  [2] The dynamic texture routines are highly-asynchronous and can
      be scheduled simultaneously on a multi-core machine. The nature
      of the texture management interfaece is such that updates may
      be lost, and the nature of asynchornous operation means that
      they may be processed out of order. A lock has been added to
      ensure that updates are at least atomic. No attempt has been
      made to enforce ordering. The lock applies to the SceneObjectPart
      being updated and is held for the lifetime of the TextureEntry
      used to carry texture updates (the one instance carries all
      faces supported by the prim).

   Users of these services should remember that the dynamic texture
   call is asynchronous and control will be returned *before* the
   texture update has actually occurred. As a result, a isubsequent
   GetTexture call may not return the expected asset id. A script
   must wait for the corresponding TEXTURE_CHANGED event before
   retrieving any texture information.
This commit is contained in:
Dr Scofield
2009-06-09 06:39:27 +00:00
parent 0356fef9ab
commit 759636f37e
5 changed files with 60 additions and 43 deletions

View File

@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
bool blend, int timer, int alpha, int face)
bool blend, int disp, int timer, int alpha, int face)
{
CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace");
@@ -438,7 +438,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
UUID createdTexture =
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
extraParams, timer, blend, (byte) alpha, face);
extraParams, timer, blend, disp, (byte) alpha, face);
return createdTexture.ToString();
}
else
@@ -508,7 +508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
bool blend, int timer, int alpha, int face)
bool blend, int disp, int timer, int alpha, int face)
{
CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace");
@@ -524,7 +524,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
}
UUID createdTexture =
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
extraParams, timer, blend, (byte) alpha, face);
extraParams, timer, blend, disp, (byte) alpha, face);
return createdTexture.ToString();
}
}

View File

@@ -59,12 +59,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
int timer, int alpha);
string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
bool blend, int timer, int alpha, int face);
bool blend, int disp, int timer, int alpha, int face);
string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer);
string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
int timer, int alpha);
string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
bool blend, int timer, int alpha, int face);
bool blend, int disp, int timer, int alpha, int face);
LSL_Float osTerrainGetHeight(int x, int y);
LSL_Integer osTerrainSetHeight(int x, int y, double val);

View File

@@ -135,17 +135,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
}
public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
bool blend, int timer, int alpha, int face)
bool blend, int disp, int timer, int alpha, int face)
{
return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams,
blend, timer, alpha, face);
blend, disp, timer, alpha, face);
}
public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
bool blend, int timer, int alpha, int face)
bool blend, int disp, int timer, int alpha, int face)
{
return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams,
blend, timer, alpha, face);
blend, disp, timer, alpha, face);
}
public LSL_Float osTerrainGetHeight(int x, int y)