From c2462bc8bb76b215437412c7dae839b5d0925df8 Mon Sep 17 00:00:00 2001 From: MW Date: Mon, 15 Oct 2007 08:51:59 +0000 Subject: 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. --- OpenSim/Region/Environment/Modules/DynamicTextureModule.cs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/DynamicTextureModule.cs') 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 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer) { - Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); if (RenderPlugins.ContainsKey(contentType)) { + //Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); + DynamicTextureUpdater updater = new DynamicTextureUpdater(); updater.SimUUID = simID; updater.PrimID = primID; @@ -166,12 +167,16 @@ namespace OpenSim.Region.Environment.Modules public void DataReceived(byte[] data, Scene scene) { //TODO delete the last asset(data), if it was a dynamic texture - + byte[] assetData = new byte[data.Length]; + Array.Copy(data, assetData, data.Length); AssetBase asset = new AssetBase(); asset.FullID = LLUUID.Random(); - asset.Data = data; + asset.Data = assetData; asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); asset.Type = 0; + asset.Description = "dynamic image"; + asset.Local = false; + asset.Temporary = false; scene.commsManager.AssetCache.AddAsset(asset); LastAssetID = asset.FullID; -- cgit v1.1