Added Frist basic version on the VectorRenderModule, that allows scripts to do some basic drawing onto textures. Currently the method the scripts have to use is most likely not the most user friendly, but this should improve soon. And hope to allow SVG files (either loaded from a web site, or even script created) to be used. I will add a page to the wiki tomorrow, until then http://www.pastebin.ca/934425 is a example c# script that can be used to get a bit of a idea.

Also added osSetDynamicTextureDataBlend and osSetDynamicTextureURLBlend that will allow the various textures to be blended together, but currently there are still a few bugs in them. So not ready for use yet.
This commit is contained in:
MW
2008-03-08 20:54:34 +00:00
parent 8f6f85e530
commit d340820826
7 changed files with 496 additions and 6 deletions

View File

@@ -1849,6 +1849,24 @@ namespace OpenSim.Region.ScriptEngine.Common
return m_LSL_Functions.osSetDynamicTextureURL(dynamicID, contentType, url, extraParams, timer);
}
public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
int timer)
{
return m_LSL_Functions.osSetDynamicTextureData(dynamicID, contentType, data, extraParams, timer);
}
public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
int timer, int alpha)
{
return m_LSL_Functions.osSetDynamicTextureURLBlend(dynamicID, contentType, url, extraParams, timer, alpha);
}
public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
int timer, int alpha)
{
return m_LSL_Functions.osSetDynamicTextureDataBlend(dynamicID, contentType, data, extraParams, timer, alpha);
}
public double osTerrainGetHeight(int x, int y)
{
return m_LSL_Functions.osTerrainGetHeight(x, y);

View File

@@ -4265,6 +4265,72 @@ namespace OpenSim.Region.ScriptEngine.Common
return LLUUID.Zero.ToString();
}
public string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
int timer, int alpha)
{
m_host.AddScriptLPS(1);
if (dynamicID == String.Empty)
{
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
LLUUID createdTexture =
textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url,
extraParams, timer, true, (byte) alpha );
return createdTexture.ToString();
}
else
{
//TODO update existing dynamic textures
}
return LLUUID.Zero.ToString();
}
public string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams,
int timer)
{
m_host.AddScriptLPS(1);
if (dynamicID == String.Empty)
{
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
if (textureManager != null)
{
LLUUID createdTexture =
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
extraParams, timer);
return createdTexture.ToString();
}
}
else
{
//TODO update existing dynamic textures
}
return LLUUID.Zero.ToString();
}
public string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams,
int timer, int alpha)
{
m_host.AddScriptLPS(1);
if (dynamicID == String.Empty)
{
IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>();
if (textureManager != null)
{
LLUUID createdTexture =
textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data,
extraParams, timer, true, (byte) alpha);
return createdTexture.ToString();
}
}
else
{
//TODO update existing dynamic textures
}
return LLUUID.Zero.ToString();
}
public bool osConsoleCommand(string command)
{
m_host.AddScriptLPS(1);

View File

@@ -637,6 +637,11 @@ namespace OpenSim.Region.ScriptEngine.Common
string llStringTrim(string src, int type);
//OpenSim functions
string osSetDynamicTextureURL(string dynamicID, string contentType, string url, string extraParams, int timer);
string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams,
int timer, int alpha);
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);
double osTerrainGetHeight(int x, int y);
int osTerrainSetHeight(int x, int y, double val);
int osRegionRestart(double seconds);