aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
diff options
context:
space:
mode:
authorDr Scofield2009-05-22 16:22:49 +0000
committerDr Scofield2009-05-22 16:22:49 +0000
commit3b689e506f82ea45fcf703b22eb50a00e40baa4f (patch)
tree4c99a98342400d3f9f49670e3f6754554d3c8235 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
parentFrom: Alan Webb <alan_webb@us.ibm.com> (diff)
downloadopensim-SC_OLD-3b689e506f82ea45fcf703b22eb50a00e40baa4f.zip
opensim-SC_OLD-3b689e506f82ea45fcf703b22eb50a00e40baa4f.tar.gz
opensim-SC_OLD-3b689e506f82ea45fcf703b22eb50a00e40baa4f.tar.bz2
opensim-SC_OLD-3b689e506f82ea45fcf703b22eb50a00e40baa4f.tar.xz
From: Alan Webb <alan_webb@us.ibm.com>
Changes to support client-side image pre-caching in the region. This commit adds an additional calling sequence to the DynamicTexture data and URL calls. The new interface allows a dynamic image to be loaded into a specific object face (rather than the mandatory ALL_SIDES supported today. This is in part fulfilment of ticket #458.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
index fbae9c8..91ee1b3 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs
@@ -427,6 +427,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
427 return UUID.Zero.ToString(); 427 return UUID.Zero.ToString();
428 } 428 }
429 429
430 public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams,
431 bool blend, int timer, int alpha, int face)
432 {
433 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace");
434
435 m_host.AddScriptLPS(1);
436 if (dynamicID == String.Empty)
437 {
438 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
439 UUID createdTexture =
440 textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
441 extraParams, timer, blend, (byte) alpha, face);
442 return createdTexture.ToString();
443 }
444 else
445 {
446 //TODO update existing dynamic textures
447 }
448
449 return UUID.Zero.ToString();
450 }
451
430 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, 452 public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
431 int timer) 453 int timer)
432 { 454 {
@@ -485,6 +507,35 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
485 return UUID.Zero.ToString(); 507 return UUID.Zero.ToString();
486 } 508 }
487 509
510 public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams,
511 bool blend, int timer, int alpha, int face)
512 {
513 CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace");
514
515 m_host.AddScriptLPS(1);
516 if (dynamicID == String.Empty)
517 {
518 IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
519 if (textureManager != null)
520 {
521 if (extraParams == String.Empty)
522 {
523 extraParams = "256";
524 }
525 UUID createdTexture =
526 textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
527 extraParams, timer, blend, (byte) alpha, face);
528 return createdTexture.ToString();
529 }
530 }
531 else
532 {
533 //TODO update existing dynamic textures
534 }
535
536 return UUID.Zero.ToString();
537 }
538
488 public bool osConsoleCommand(string command) 539 public bool osConsoleCommand(string command)
489 { 540 {
490 CheckThreatLevel(ThreatLevel.Severe, "osConsoleCommand"); 541 CheckThreatLevel(ThreatLevel.Severe, "osConsoleCommand");