aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
diff options
context:
space:
mode:
authorMW2007-10-15 08:51:59 +0000
committerMW2007-10-15 08:51:59 +0000
commitc2462bc8bb76b215437412c7dae839b5d0925df8 (patch)
tree0c470d1dd9191d68e1b730494deb1ebccb8d1c7d /OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
parent* Applied Chillken patch #419: consolidate_ports-r2096-3.patch - consolidated... (diff)
downloadopensim-SC_OLD-c2462bc8bb76b215437412c7dae839b5d0925df8.zip
opensim-SC_OLD-c2462bc8bb76b215437412c7dae839b5d0925df8.tar.gz
opensim-SC_OLD-c2462bc8bb76b215437412c7dae839b5d0925df8.tar.bz2
opensim-SC_OLD-c2462bc8bb76b215437412c7dae839b5d0925df8.tar.xz
Added "LoadImageUrl" module , that is a dynamic texture render, that works with the DynamicTextureModule to allow loading of a image from a webserver and a texture of that image created.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/DynamicTextureModule.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index 51a5534..bac0d59 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -96,9 +96,10 @@ namespace OpenSim.Region.Environment.Modules
96 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 96 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url,
97 string extraParams, int updateTimer) 97 string extraParams, int updateTimer)
98 { 98 {
99 Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
100 if (RenderPlugins.ContainsKey(contentType)) 99 if (RenderPlugins.ContainsKey(contentType))
101 { 100 {
101 //Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
102
102 DynamicTextureUpdater updater = new DynamicTextureUpdater(); 103 DynamicTextureUpdater updater = new DynamicTextureUpdater();
103 updater.SimUUID = simID; 104 updater.SimUUID = simID;
104 updater.PrimID = primID; 105 updater.PrimID = primID;
@@ -166,12 +167,16 @@ namespace OpenSim.Region.Environment.Modules
166 public void DataReceived(byte[] data, Scene scene) 167 public void DataReceived(byte[] data, Scene scene)
167 { 168 {
168 //TODO delete the last asset(data), if it was a dynamic texture 169 //TODO delete the last asset(data), if it was a dynamic texture
169 170 byte[] assetData = new byte[data.Length];
171 Array.Copy(data, assetData, data.Length);
170 AssetBase asset = new AssetBase(); 172 AssetBase asset = new AssetBase();
171 asset.FullID = LLUUID.Random(); 173 asset.FullID = LLUUID.Random();
172 asset.Data = data; 174 asset.Data = assetData;
173 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); 175 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000);
174 asset.Type = 0; 176 asset.Type = 0;
177 asset.Description = "dynamic image";
178 asset.Local = false;
179 asset.Temporary = false;
175 scene.commsManager.AssetCache.AddAsset(asset); 180 scene.commsManager.AssetCache.AddAsset(asset);
176 181
177 LastAssetID = asset.FullID; 182 LastAssetID = asset.FullID;