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.

This commit is contained in:
MW
2007-10-15 08:51:59 +00:00
parent 9de589bc37
commit c2462bc8bb
3 changed files with 132 additions and 4 deletions

View File

@@ -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;