Merge branch 'master' into careminster
Conflicts: OpenSim/Data/MySQL/MySQLSimulationData.cs OpenSim/Region/ClientStack/Linden/UDP/LLClientView.cs OpenSim/Region/CoreModules/Scripting/LSLHttp/UrlModule.cs OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.csavinationmerge
commit
1b15144208
|
@ -135,14 +135,25 @@
|
||||||
<delete dir="%temp%"/>
|
<delete dir="%temp%"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
<target name="torture" depends="build, find-nunit">
|
<target name="test-stress" depends="build, find-nunit">
|
||||||
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
||||||
|
|
||||||
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.torture">
|
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.stress">
|
||||||
<arg value="./bin/OpenSim.Tests.Torture.dll" />
|
<arg value="./bin/OpenSim.Tests.Stress.dll" />
|
||||||
</exec>
|
</exec>
|
||||||
|
|
||||||
<fail message="Failures reported in unit tests." unless="${int::parse(testresult.opensim.tests.torture)==0}" />
|
<fail message="Failures reported in stress tests." unless="${int::parse(testresult.opensim.tests.stress)==0}" />
|
||||||
|
<delete dir="%temp%"/>
|
||||||
|
</target>
|
||||||
|
|
||||||
|
<target name="test-perf" depends="build, find-nunit">
|
||||||
|
<setenv name="MONO_THREADS_PER_CPU" value="100" />
|
||||||
|
|
||||||
|
<exec program="${nunitcmd}" failonerror="true" resultproperty="testresult.opensim.tests.performance">
|
||||||
|
<arg value="./bin/OpenSim.Tests.Performance.dll" />
|
||||||
|
</exec>
|
||||||
|
|
||||||
|
<fail message="Failures reported in performance tests." unless="${int::parse(testresult.opensim.tests.performance)==0}" />
|
||||||
<delete dir="%temp%"/>
|
<delete dir="%temp%"/>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
|
|
|
@ -747,95 +747,99 @@ namespace OpenSim.Data.MySQL
|
||||||
RegionLightShareData nWP = new RegionLightShareData();
|
RegionLightShareData nWP = new RegionLightShareData();
|
||||||
nWP.OnSave += StoreRegionWindlightSettings;
|
nWP.OnSave += StoreRegionWindlightSettings;
|
||||||
|
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
string command = "select * from `regionwindlight` where region_id = ?regionID";
|
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand(command))
|
|
||||||
{
|
{
|
||||||
cmd.Connection = dbcon;
|
dbcon.Open();
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
|
string command = "select * from `regionwindlight` where region_id = ?regionID";
|
||||||
|
|
||||||
IDataReader result = ExecuteReader(cmd);
|
using (MySqlCommand cmd = new MySqlCommand(command))
|
||||||
if (!result.Read())
|
|
||||||
{
|
{
|
||||||
//No result, so store our default windlight profile and return it
|
cmd.Connection = dbcon;
|
||||||
nWP.regionID = regionUUID;
|
|
||||||
// StoreRegionWindlightSettings(nWP);
|
cmd.Parameters.AddWithValue("?regionID", regionUUID.ToString());
|
||||||
return nWP;
|
|
||||||
}
|
IDataReader result = ExecuteReader(cmd);
|
||||||
else
|
if (!result.Read())
|
||||||
{
|
{
|
||||||
nWP.regionID = DBGuid.FromDB(result["region_id"]);
|
//No result, so store our default windlight profile and return it
|
||||||
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
|
nWP.regionID = regionUUID;
|
||||||
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
|
// StoreRegionWindlightSettings(nWP);
|
||||||
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
|
return nWP;
|
||||||
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
|
}
|
||||||
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
|
else
|
||||||
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
|
{
|
||||||
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
|
nWP.regionID = DBGuid.FromDB(result["region_id"]);
|
||||||
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
|
nWP.waterColor.X = Convert.ToSingle(result["water_color_r"]);
|
||||||
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
|
nWP.waterColor.Y = Convert.ToSingle(result["water_color_g"]);
|
||||||
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
|
nWP.waterColor.Z = Convert.ToSingle(result["water_color_b"]);
|
||||||
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
|
nWP.waterFogDensityExponent = Convert.ToSingle(result["water_fog_density_exponent"]);
|
||||||
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
|
nWP.underwaterFogModifier = Convert.ToSingle(result["underwater_fog_modifier"]);
|
||||||
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
|
nWP.reflectionWaveletScale.X = Convert.ToSingle(result["reflection_wavelet_scale_1"]);
|
||||||
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
|
nWP.reflectionWaveletScale.Y = Convert.ToSingle(result["reflection_wavelet_scale_2"]);
|
||||||
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
|
nWP.reflectionWaveletScale.Z = Convert.ToSingle(result["reflection_wavelet_scale_3"]);
|
||||||
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
|
nWP.fresnelScale = Convert.ToSingle(result["fresnel_scale"]);
|
||||||
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
|
nWP.fresnelOffset = Convert.ToSingle(result["fresnel_offset"]);
|
||||||
UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
|
nWP.refractScaleAbove = Convert.ToSingle(result["refract_scale_above"]);
|
||||||
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
|
nWP.refractScaleBelow = Convert.ToSingle(result["refract_scale_below"]);
|
||||||
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
|
nWP.blurMultiplier = Convert.ToSingle(result["blur_multiplier"]);
|
||||||
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
|
nWP.bigWaveDirection.X = Convert.ToSingle(result["big_wave_direction_x"]);
|
||||||
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
|
nWP.bigWaveDirection.Y = Convert.ToSingle(result["big_wave_direction_y"]);
|
||||||
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
|
nWP.littleWaveDirection.X = Convert.ToSingle(result["little_wave_direction_x"]);
|
||||||
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
|
nWP.littleWaveDirection.Y = Convert.ToSingle(result["little_wave_direction_y"]);
|
||||||
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
|
UUID.TryParse(result["normal_map_texture"].ToString(), out nWP.normalMapTexture);
|
||||||
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
|
nWP.horizon.X = Convert.ToSingle(result["horizon_r"]);
|
||||||
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
|
nWP.horizon.Y = Convert.ToSingle(result["horizon_g"]);
|
||||||
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
|
nWP.horizon.Z = Convert.ToSingle(result["horizon_b"]);
|
||||||
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
|
nWP.horizon.W = Convert.ToSingle(result["horizon_i"]);
|
||||||
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
|
nWP.hazeHorizon = Convert.ToSingle(result["haze_horizon"]);
|
||||||
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
|
nWP.blueDensity.X = Convert.ToSingle(result["blue_density_r"]);
|
||||||
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
|
nWP.blueDensity.Y = Convert.ToSingle(result["blue_density_g"]);
|
||||||
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
|
nWP.blueDensity.Z = Convert.ToSingle(result["blue_density_b"]);
|
||||||
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
|
nWP.blueDensity.W = Convert.ToSingle(result["blue_density_i"]);
|
||||||
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
|
nWP.hazeDensity = Convert.ToSingle(result["haze_density"]);
|
||||||
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
|
nWP.densityMultiplier = Convert.ToSingle(result["density_multiplier"]);
|
||||||
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
|
nWP.distanceMultiplier = Convert.ToSingle(result["distance_multiplier"]);
|
||||||
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
|
nWP.maxAltitude = Convert.ToUInt16(result["max_altitude"]);
|
||||||
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
|
nWP.sunMoonColor.X = Convert.ToSingle(result["sun_moon_color_r"]);
|
||||||
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
|
nWP.sunMoonColor.Y = Convert.ToSingle(result["sun_moon_color_g"]);
|
||||||
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
|
nWP.sunMoonColor.Z = Convert.ToSingle(result["sun_moon_color_b"]);
|
||||||
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
|
nWP.sunMoonColor.W = Convert.ToSingle(result["sun_moon_color_i"]);
|
||||||
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
|
nWP.sunMoonPosition = Convert.ToSingle(result["sun_moon_position"]);
|
||||||
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
|
nWP.ambient.X = Convert.ToSingle(result["ambient_r"]);
|
||||||
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
|
nWP.ambient.Y = Convert.ToSingle(result["ambient_g"]);
|
||||||
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
|
nWP.ambient.Z = Convert.ToSingle(result["ambient_b"]);
|
||||||
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
|
nWP.ambient.W = Convert.ToSingle(result["ambient_i"]);
|
||||||
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
|
nWP.eastAngle = Convert.ToSingle(result["east_angle"]);
|
||||||
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
|
nWP.sunGlowFocus = Convert.ToSingle(result["sun_glow_focus"]);
|
||||||
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
|
nWP.sunGlowSize = Convert.ToSingle(result["sun_glow_size"]);
|
||||||
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
|
nWP.sceneGamma = Convert.ToSingle(result["scene_gamma"]);
|
||||||
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
|
nWP.starBrightness = Convert.ToSingle(result["star_brightness"]);
|
||||||
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
|
nWP.cloudColor.X = Convert.ToSingle(result["cloud_color_r"]);
|
||||||
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
|
nWP.cloudColor.Y = Convert.ToSingle(result["cloud_color_g"]);
|
||||||
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
|
nWP.cloudColor.Z = Convert.ToSingle(result["cloud_color_b"]);
|
||||||
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
|
nWP.cloudColor.W = Convert.ToSingle(result["cloud_color_i"]);
|
||||||
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
|
nWP.cloudXYDensity.X = Convert.ToSingle(result["cloud_x"]);
|
||||||
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
|
nWP.cloudXYDensity.Y = Convert.ToSingle(result["cloud_y"]);
|
||||||
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
|
nWP.cloudXYDensity.Z = Convert.ToSingle(result["cloud_density"]);
|
||||||
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
|
nWP.cloudCoverage = Convert.ToSingle(result["cloud_coverage"]);
|
||||||
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
|
nWP.cloudScale = Convert.ToSingle(result["cloud_scale"]);
|
||||||
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
|
nWP.cloudDetailXYDensity.X = Convert.ToSingle(result["cloud_detail_x"]);
|
||||||
nWP.valid = true;
|
nWP.cloudDetailXYDensity.Y = Convert.ToSingle(result["cloud_detail_y"]);
|
||||||
|
nWP.cloudDetailXYDensity.Z = Convert.ToSingle(result["cloud_detail_density"]);
|
||||||
|
nWP.cloudScrollX = Convert.ToSingle(result["cloud_scroll_x"]);
|
||||||
|
nWP.cloudScrollXLock = Convert.ToBoolean(result["cloud_scroll_x_lock"]);
|
||||||
|
nWP.cloudScrollY = Convert.ToSingle(result["cloud_scroll_y"]);
|
||||||
|
nWP.cloudScrollYLock = Convert.ToBoolean(result["cloud_scroll_y_lock"]);
|
||||||
|
nWP.drawClassicClouds = Convert.ToBoolean(result["draw_classic_clouds"]);
|
||||||
|
nWP.valid = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return nWP;
|
return nWP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -881,118 +885,124 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
public virtual void StoreRegionWindlightSettings(RegionLightShareData wl)
|
public virtual void StoreRegionWindlightSettings(RegionLightShareData wl)
|
||||||
{
|
{
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
|
||||||
{
|
{
|
||||||
cmd.CommandText = "REPLACE INTO `regionwindlight` (`region_id`, `water_color_r`, `water_color_g`, ";
|
dbcon.Open();
|
||||||
cmd.CommandText += "`water_color_b`, `water_fog_density_exponent`, `underwater_fog_modifier`, ";
|
|
||||||
cmd.CommandText += "`reflection_wavelet_scale_1`, `reflection_wavelet_scale_2`, `reflection_wavelet_scale_3`, ";
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
cmd.CommandText += "`fresnel_scale`, `fresnel_offset`, `refract_scale_above`, `refract_scale_below`, ";
|
{
|
||||||
cmd.CommandText += "`blur_multiplier`, `big_wave_direction_x`, `big_wave_direction_y`, `little_wave_direction_x`, ";
|
cmd.CommandText = "REPLACE INTO `regionwindlight` (`region_id`, `water_color_r`, `water_color_g`, ";
|
||||||
cmd.CommandText += "`little_wave_direction_y`, `normal_map_texture`, `horizon_r`, `horizon_g`, `horizon_b`, ";
|
cmd.CommandText += "`water_color_b`, `water_fog_density_exponent`, `underwater_fog_modifier`, ";
|
||||||
cmd.CommandText += "`horizon_i`, `haze_horizon`, `blue_density_r`, `blue_density_g`, `blue_density_b`, ";
|
cmd.CommandText += "`reflection_wavelet_scale_1`, `reflection_wavelet_scale_2`, `reflection_wavelet_scale_3`, ";
|
||||||
cmd.CommandText += "`blue_density_i`, `haze_density`, `density_multiplier`, `distance_multiplier`, `max_altitude`, ";
|
cmd.CommandText += "`fresnel_scale`, `fresnel_offset`, `refract_scale_above`, `refract_scale_below`, ";
|
||||||
cmd.CommandText += "`sun_moon_color_r`, `sun_moon_color_g`, `sun_moon_color_b`, `sun_moon_color_i`, `sun_moon_position`, ";
|
cmd.CommandText += "`blur_multiplier`, `big_wave_direction_x`, `big_wave_direction_y`, `little_wave_direction_x`, ";
|
||||||
cmd.CommandText += "`ambient_r`, `ambient_g`, `ambient_b`, `ambient_i`, `east_angle`, `sun_glow_focus`, `sun_glow_size`, ";
|
cmd.CommandText += "`little_wave_direction_y`, `normal_map_texture`, `horizon_r`, `horizon_g`, `horizon_b`, ";
|
||||||
cmd.CommandText += "`scene_gamma`, `star_brightness`, `cloud_color_r`, `cloud_color_g`, `cloud_color_b`, `cloud_color_i`, ";
|
cmd.CommandText += "`horizon_i`, `haze_horizon`, `blue_density_r`, `blue_density_g`, `blue_density_b`, ";
|
||||||
cmd.CommandText += "`cloud_x`, `cloud_y`, `cloud_density`, `cloud_coverage`, `cloud_scale`, `cloud_detail_x`, ";
|
cmd.CommandText += "`blue_density_i`, `haze_density`, `density_multiplier`, `distance_multiplier`, `max_altitude`, ";
|
||||||
cmd.CommandText += "`cloud_detail_y`, `cloud_detail_density`, `cloud_scroll_x`, `cloud_scroll_x_lock`, `cloud_scroll_y`, ";
|
cmd.CommandText += "`sun_moon_color_r`, `sun_moon_color_g`, `sun_moon_color_b`, `sun_moon_color_i`, `sun_moon_position`, ";
|
||||||
cmd.CommandText += "`cloud_scroll_y_lock`, `draw_classic_clouds`) VALUES (?region_id, ?water_color_r, ";
|
cmd.CommandText += "`ambient_r`, `ambient_g`, `ambient_b`, `ambient_i`, `east_angle`, `sun_glow_focus`, `sun_glow_size`, ";
|
||||||
cmd.CommandText += "?water_color_g, ?water_color_b, ?water_fog_density_exponent, ?underwater_fog_modifier, ?reflection_wavelet_scale_1, ";
|
cmd.CommandText += "`scene_gamma`, `star_brightness`, `cloud_color_r`, `cloud_color_g`, `cloud_color_b`, `cloud_color_i`, ";
|
||||||
cmd.CommandText += "?reflection_wavelet_scale_2, ?reflection_wavelet_scale_3, ?fresnel_scale, ?fresnel_offset, ?refract_scale_above, ";
|
cmd.CommandText += "`cloud_x`, `cloud_y`, `cloud_density`, `cloud_coverage`, `cloud_scale`, `cloud_detail_x`, ";
|
||||||
cmd.CommandText += "?refract_scale_below, ?blur_multiplier, ?big_wave_direction_x, ?big_wave_direction_y, ?little_wave_direction_x, ";
|
cmd.CommandText += "`cloud_detail_y`, `cloud_detail_density`, `cloud_scroll_x`, `cloud_scroll_x_lock`, `cloud_scroll_y`, ";
|
||||||
cmd.CommandText += "?little_wave_direction_y, ?normal_map_texture, ?horizon_r, ?horizon_g, ?horizon_b, ?horizon_i, ?haze_horizon, ";
|
cmd.CommandText += "`cloud_scroll_y_lock`, `draw_classic_clouds`) VALUES (?region_id, ?water_color_r, ";
|
||||||
cmd.CommandText += "?blue_density_r, ?blue_density_g, ?blue_density_b, ?blue_density_i, ?haze_density, ?density_multiplier, ";
|
cmd.CommandText += "?water_color_g, ?water_color_b, ?water_fog_density_exponent, ?underwater_fog_modifier, ?reflection_wavelet_scale_1, ";
|
||||||
cmd.CommandText += "?distance_multiplier, ?max_altitude, ?sun_moon_color_r, ?sun_moon_color_g, ?sun_moon_color_b, ";
|
cmd.CommandText += "?reflection_wavelet_scale_2, ?reflection_wavelet_scale_3, ?fresnel_scale, ?fresnel_offset, ?refract_scale_above, ";
|
||||||
cmd.CommandText += "?sun_moon_color_i, ?sun_moon_position, ?ambient_r, ?ambient_g, ?ambient_b, ?ambient_i, ?east_angle, ";
|
cmd.CommandText += "?refract_scale_below, ?blur_multiplier, ?big_wave_direction_x, ?big_wave_direction_y, ?little_wave_direction_x, ";
|
||||||
cmd.CommandText += "?sun_glow_focus, ?sun_glow_size, ?scene_gamma, ?star_brightness, ?cloud_color_r, ?cloud_color_g, ";
|
cmd.CommandText += "?little_wave_direction_y, ?normal_map_texture, ?horizon_r, ?horizon_g, ?horizon_b, ?horizon_i, ?haze_horizon, ";
|
||||||
cmd.CommandText += "?cloud_color_b, ?cloud_color_i, ?cloud_x, ?cloud_y, ?cloud_density, ?cloud_coverage, ?cloud_scale, ";
|
cmd.CommandText += "?blue_density_r, ?blue_density_g, ?blue_density_b, ?blue_density_i, ?haze_density, ?density_multiplier, ";
|
||||||
cmd.CommandText += "?cloud_detail_x, ?cloud_detail_y, ?cloud_detail_density, ?cloud_scroll_x, ?cloud_scroll_x_lock, ";
|
cmd.CommandText += "?distance_multiplier, ?max_altitude, ?sun_moon_color_r, ?sun_moon_color_g, ?sun_moon_color_b, ";
|
||||||
cmd.CommandText += "?cloud_scroll_y, ?cloud_scroll_y_lock, ?draw_classic_clouds)";
|
cmd.CommandText += "?sun_moon_color_i, ?sun_moon_position, ?ambient_r, ?ambient_g, ?ambient_b, ?ambient_i, ?east_angle, ";
|
||||||
|
cmd.CommandText += "?sun_glow_focus, ?sun_glow_size, ?scene_gamma, ?star_brightness, ?cloud_color_r, ?cloud_color_g, ";
|
||||||
cmd.Parameters.AddWithValue("region_id", wl.regionID);
|
cmd.CommandText += "?cloud_color_b, ?cloud_color_i, ?cloud_x, ?cloud_y, ?cloud_density, ?cloud_coverage, ?cloud_scale, ";
|
||||||
cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
|
cmd.CommandText += "?cloud_detail_x, ?cloud_detail_y, ?cloud_detail_density, ?cloud_scroll_x, ?cloud_scroll_x_lock, ";
|
||||||
cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
|
cmd.CommandText += "?cloud_scroll_y, ?cloud_scroll_y_lock, ?draw_classic_clouds)";
|
||||||
cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
|
|
||||||
cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
|
cmd.Parameters.AddWithValue("region_id", wl.regionID);
|
||||||
cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
|
cmd.Parameters.AddWithValue("water_color_r", wl.waterColor.X);
|
||||||
cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
|
cmd.Parameters.AddWithValue("water_color_g", wl.waterColor.Y);
|
||||||
cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
|
cmd.Parameters.AddWithValue("water_color_b", wl.waterColor.Z);
|
||||||
cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
|
cmd.Parameters.AddWithValue("water_fog_density_exponent", wl.waterFogDensityExponent);
|
||||||
cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
|
cmd.Parameters.AddWithValue("underwater_fog_modifier", wl.underwaterFogModifier);
|
||||||
cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_1", wl.reflectionWaveletScale.X);
|
||||||
cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_2", wl.reflectionWaveletScale.Y);
|
||||||
cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
|
cmd.Parameters.AddWithValue("reflection_wavelet_scale_3", wl.reflectionWaveletScale.Z);
|
||||||
cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
|
cmd.Parameters.AddWithValue("fresnel_scale", wl.fresnelScale);
|
||||||
cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
|
cmd.Parameters.AddWithValue("fresnel_offset", wl.fresnelOffset);
|
||||||
cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
|
cmd.Parameters.AddWithValue("refract_scale_above", wl.refractScaleAbove);
|
||||||
cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
|
cmd.Parameters.AddWithValue("refract_scale_below", wl.refractScaleBelow);
|
||||||
cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
|
cmd.Parameters.AddWithValue("blur_multiplier", wl.blurMultiplier);
|
||||||
cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
|
cmd.Parameters.AddWithValue("big_wave_direction_x", wl.bigWaveDirection.X);
|
||||||
cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
|
cmd.Parameters.AddWithValue("big_wave_direction_y", wl.bigWaveDirection.Y);
|
||||||
cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
|
cmd.Parameters.AddWithValue("little_wave_direction_x", wl.littleWaveDirection.X);
|
||||||
cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
|
cmd.Parameters.AddWithValue("little_wave_direction_y", wl.littleWaveDirection.Y);
|
||||||
cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
|
cmd.Parameters.AddWithValue("normal_map_texture", wl.normalMapTexture);
|
||||||
cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
|
cmd.Parameters.AddWithValue("horizon_r", wl.horizon.X);
|
||||||
cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
|
cmd.Parameters.AddWithValue("horizon_g", wl.horizon.Y);
|
||||||
cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
|
cmd.Parameters.AddWithValue("horizon_b", wl.horizon.Z);
|
||||||
cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
|
cmd.Parameters.AddWithValue("horizon_i", wl.horizon.W);
|
||||||
cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
|
cmd.Parameters.AddWithValue("haze_horizon", wl.hazeHorizon);
|
||||||
cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
|
cmd.Parameters.AddWithValue("blue_density_r", wl.blueDensity.X);
|
||||||
cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
|
cmd.Parameters.AddWithValue("blue_density_g", wl.blueDensity.Y);
|
||||||
cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
|
cmd.Parameters.AddWithValue("blue_density_b", wl.blueDensity.Z);
|
||||||
cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
|
cmd.Parameters.AddWithValue("blue_density_i", wl.blueDensity.W);
|
||||||
cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
|
cmd.Parameters.AddWithValue("haze_density", wl.hazeDensity);
|
||||||
cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
|
cmd.Parameters.AddWithValue("density_multiplier", wl.densityMultiplier);
|
||||||
cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
|
cmd.Parameters.AddWithValue("distance_multiplier", wl.distanceMultiplier);
|
||||||
cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
|
cmd.Parameters.AddWithValue("max_altitude", wl.maxAltitude);
|
||||||
cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
|
cmd.Parameters.AddWithValue("sun_moon_color_r", wl.sunMoonColor.X);
|
||||||
cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
|
cmd.Parameters.AddWithValue("sun_moon_color_g", wl.sunMoonColor.Y);
|
||||||
cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
|
cmd.Parameters.AddWithValue("sun_moon_color_b", wl.sunMoonColor.Z);
|
||||||
cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
|
cmd.Parameters.AddWithValue("sun_moon_color_i", wl.sunMoonColor.W);
|
||||||
cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
|
cmd.Parameters.AddWithValue("sun_moon_position", wl.sunMoonPosition);
|
||||||
cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
|
cmd.Parameters.AddWithValue("ambient_r", wl.ambient.X);
|
||||||
cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
|
cmd.Parameters.AddWithValue("ambient_g", wl.ambient.Y);
|
||||||
cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
|
cmd.Parameters.AddWithValue("ambient_b", wl.ambient.Z);
|
||||||
cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
|
cmd.Parameters.AddWithValue("ambient_i", wl.ambient.W);
|
||||||
cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
|
cmd.Parameters.AddWithValue("east_angle", wl.eastAngle);
|
||||||
cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
|
cmd.Parameters.AddWithValue("sun_glow_focus", wl.sunGlowFocus);
|
||||||
cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
|
cmd.Parameters.AddWithValue("sun_glow_size", wl.sunGlowSize);
|
||||||
cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
|
cmd.Parameters.AddWithValue("scene_gamma", wl.sceneGamma);
|
||||||
cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
|
cmd.Parameters.AddWithValue("star_brightness", wl.starBrightness);
|
||||||
cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
|
cmd.Parameters.AddWithValue("cloud_color_r", wl.cloudColor.X);
|
||||||
cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
|
cmd.Parameters.AddWithValue("cloud_color_g", wl.cloudColor.Y);
|
||||||
cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
|
cmd.Parameters.AddWithValue("cloud_color_b", wl.cloudColor.Z);
|
||||||
cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
|
cmd.Parameters.AddWithValue("cloud_color_i", wl.cloudColor.W);
|
||||||
cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
|
cmd.Parameters.AddWithValue("cloud_x", wl.cloudXYDensity.X);
|
||||||
cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
|
cmd.Parameters.AddWithValue("cloud_y", wl.cloudXYDensity.Y);
|
||||||
cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
|
cmd.Parameters.AddWithValue("cloud_density", wl.cloudXYDensity.Z);
|
||||||
cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
|
cmd.Parameters.AddWithValue("cloud_coverage", wl.cloudCoverage);
|
||||||
cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
|
cmd.Parameters.AddWithValue("cloud_scale", wl.cloudScale);
|
||||||
cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
|
cmd.Parameters.AddWithValue("cloud_detail_x", wl.cloudDetailXYDensity.X);
|
||||||
cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
|
cmd.Parameters.AddWithValue("cloud_detail_y", wl.cloudDetailXYDensity.Y);
|
||||||
cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
|
cmd.Parameters.AddWithValue("cloud_detail_density", wl.cloudDetailXYDensity.Z);
|
||||||
cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
|
cmd.Parameters.AddWithValue("cloud_scroll_x", wl.cloudScrollX);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_x_lock", wl.cloudScrollXLock);
|
||||||
ExecuteNonQuery(cmd);
|
cmd.Parameters.AddWithValue("cloud_scroll_y", wl.cloudScrollY);
|
||||||
|
cmd.Parameters.AddWithValue("cloud_scroll_y_lock", wl.cloudScrollYLock);
|
||||||
|
cmd.Parameters.AddWithValue("draw_classic_clouds", wl.drawClassicClouds);
|
||||||
|
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public virtual void RemoveRegionWindlightSettings(UUID regionID)
|
public virtual void RemoveRegionWindlightSettings(UUID regionID)
|
||||||
{
|
{
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
|
||||||
{
|
{
|
||||||
cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
|
dbcon.Open();
|
||||||
cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
|
|
||||||
ExecuteNonQuery(cmd);
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "delete from `regionwindlight` where `region_id`=?regionID";
|
||||||
|
cmd.Parameters.AddWithValue("?regionID", regionID.ToString());
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1000,26 +1010,29 @@ namespace OpenSim.Data.MySQL
|
||||||
#region RegionEnvironmentSettings
|
#region RegionEnvironmentSettings
|
||||||
public string LoadRegionEnvironmentSettings(UUID regionUUID)
|
public string LoadRegionEnvironmentSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
string command = "select * from `regionenvironment` where region_id = ?region_id";
|
|
||||||
|
|
||||||
using (MySqlCommand cmd = new MySqlCommand(command))
|
|
||||||
{
|
{
|
||||||
cmd.Connection = dbcon;
|
dbcon.Open();
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
|
string command = "select * from `regionenvironment` where region_id = ?region_id";
|
||||||
|
|
||||||
IDataReader result = ExecuteReader(cmd);
|
using (MySqlCommand cmd = new MySqlCommand(command))
|
||||||
if (!result.Read())
|
|
||||||
{
|
{
|
||||||
return String.Empty;
|
cmd.Connection = dbcon;
|
||||||
}
|
|
||||||
else
|
cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
|
||||||
{
|
|
||||||
return Convert.ToString(result["llsd_settings"]);
|
IDataReader result = ExecuteReader(cmd);
|
||||||
|
if (!result.Read())
|
||||||
|
{
|
||||||
|
return String.Empty;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Convert.ToString(result["llsd_settings"]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1027,33 +1040,39 @@ namespace OpenSim.Data.MySQL
|
||||||
|
|
||||||
public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings)
|
public void StoreRegionEnvironmentSettings(UUID regionUUID, string settings)
|
||||||
{
|
{
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
|
||||||
{
|
{
|
||||||
cmd.CommandText = "REPLACE INTO `regionenvironment` (`region_id`, `llsd_settings`) VALUES (?region_id, ?llsd_settings)";
|
dbcon.Open();
|
||||||
|
|
||||||
cmd.Parameters.AddWithValue("region_id", regionUUID);
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
cmd.Parameters.AddWithValue("llsd_settings", settings);
|
{
|
||||||
|
cmd.CommandText = "REPLACE INTO `regionenvironment` (`region_id`, `llsd_settings`) VALUES (?region_id, ?llsd_settings)";
|
||||||
ExecuteNonQuery(cmd);
|
|
||||||
|
cmd.Parameters.AddWithValue("region_id", regionUUID);
|
||||||
|
cmd.Parameters.AddWithValue("llsd_settings", settings);
|
||||||
|
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void RemoveRegionEnvironmentSettings(UUID regionUUID)
|
public void RemoveRegionEnvironmentSettings(UUID regionUUID)
|
||||||
{
|
{
|
||||||
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
lock (m_dbLock)
|
||||||
{
|
{
|
||||||
dbcon.Open();
|
using (MySqlConnection dbcon = new MySqlConnection(m_connectionString))
|
||||||
|
|
||||||
using (MySqlCommand cmd = dbcon.CreateCommand())
|
|
||||||
{
|
{
|
||||||
cmd.CommandText = "delete from `regionenvironment` where region_id = ?region_id";
|
dbcon.Open();
|
||||||
cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
|
|
||||||
ExecuteNonQuery(cmd);
|
using (MySqlCommand cmd = dbcon.CreateCommand())
|
||||||
|
{
|
||||||
|
cmd.CommandText = "delete from `regionenvironment` where region_id = ?region_id";
|
||||||
|
cmd.Parameters.AddWithValue("?region_id", regionUUID.ToString());
|
||||||
|
ExecuteNonQuery(cmd);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -4525,7 +4525,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
|
||||||
{
|
{
|
||||||
returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock();
|
returnblock[j] = new EstateOwnerMessagePacket.ParamListBlock();
|
||||||
}
|
}
|
||||||
j = 0;
|
j = 0;
|
||||||
|
|
||||||
returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++;
|
returnblock[j].Parameter = Utils.StringToBytes(estateID.ToString()); j++;
|
||||||
returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++;
|
returnblock[j].Parameter = Utils.StringToBytes(((int)Constants.EstateAccessCodex.EstateBans).ToString()); j++;
|
||||||
|
|
|
@ -186,63 +186,79 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
|
public UUID AddDynamicTextureData(UUID simID, UUID primID, string contentType, string data,
|
||||||
string extraParams, int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face)
|
string extraParams, int updateTimer, bool SetBlending, int disp, byte AlphaValue, int face)
|
||||||
{
|
{
|
||||||
if (RenderPlugins.ContainsKey(contentType))
|
if (!RenderPlugins.ContainsKey(contentType))
|
||||||
|
return UUID.Zero;
|
||||||
|
|
||||||
|
Scene scene;
|
||||||
|
RegisteredScenes.TryGetValue(simID, out scene);
|
||||||
|
|
||||||
|
if (scene == null)
|
||||||
|
return UUID.Zero;
|
||||||
|
|
||||||
|
SceneObjectPart part = scene.GetSceneObjectPart(primID);
|
||||||
|
|
||||||
|
if (part == null)
|
||||||
|
return UUID.Zero;
|
||||||
|
|
||||||
|
// If we want to reuse dynamic textures then we have to ignore any request from the caller to expire
|
||||||
|
// them.
|
||||||
|
if (ReuseTextures)
|
||||||
|
disp = disp & ~DISP_EXPIRE;
|
||||||
|
|
||||||
|
DynamicTextureUpdater updater = new DynamicTextureUpdater();
|
||||||
|
updater.SimUUID = simID;
|
||||||
|
updater.PrimID = primID;
|
||||||
|
updater.ContentType = contentType;
|
||||||
|
updater.BodyData = data;
|
||||||
|
updater.UpdateTimer = updateTimer;
|
||||||
|
updater.UpdaterID = UUID.Random();
|
||||||
|
updater.Params = extraParams;
|
||||||
|
updater.BlendWithOldTexture = SetBlending;
|
||||||
|
updater.FrontAlpha = AlphaValue;
|
||||||
|
updater.Face = face;
|
||||||
|
updater.Url = "Local image";
|
||||||
|
updater.Disp = disp;
|
||||||
|
|
||||||
|
object objReusableTextureUUID = null;
|
||||||
|
|
||||||
|
if (ReuseTextures && !updater.BlendWithOldTexture)
|
||||||
{
|
{
|
||||||
// If we want to reuse dynamic textures then we have to ignore any request from the caller to expire
|
string reuseableTextureKey = GenerateReusableTextureKey(data, extraParams);
|
||||||
// them.
|
objReusableTextureUUID = m_reuseableDynamicTextures.Get(reuseableTextureKey);
|
||||||
if (ReuseTextures)
|
|
||||||
disp = disp & ~DISP_EXPIRE;
|
|
||||||
|
|
||||||
DynamicTextureUpdater updater = new DynamicTextureUpdater();
|
if (objReusableTextureUUID != null)
|
||||||
updater.SimUUID = simID;
|
|
||||||
updater.PrimID = primID;
|
|
||||||
updater.ContentType = contentType;
|
|
||||||
updater.BodyData = data;
|
|
||||||
updater.UpdateTimer = updateTimer;
|
|
||||||
updater.UpdaterID = UUID.Random();
|
|
||||||
updater.Params = extraParams;
|
|
||||||
updater.BlendWithOldTexture = SetBlending;
|
|
||||||
updater.FrontAlpha = AlphaValue;
|
|
||||||
updater.Face = face;
|
|
||||||
updater.Url = "Local image";
|
|
||||||
updater.Disp = disp;
|
|
||||||
|
|
||||||
object reusableTextureUUID = null;
|
|
||||||
|
|
||||||
if (ReuseTextures)
|
|
||||||
reusableTextureUUID
|
|
||||||
= m_reuseableDynamicTextures.Get(GenerateReusableTextureKey(data, extraParams));
|
|
||||||
|
|
||||||
// We cannot reuse a dynamic texture if the data is going to be blended with something already there.
|
|
||||||
if (reusableTextureUUID == null || updater.BlendWithOldTexture)
|
|
||||||
{
|
{
|
||||||
lock (Updaters)
|
// If something else has removed this temporary asset from the cache, detect and invalidate
|
||||||
|
// our cached uuid.
|
||||||
|
if (scene.AssetService.GetMetadata(objReusableTextureUUID.ToString()) == null)
|
||||||
{
|
{
|
||||||
if (!Updaters.ContainsKey(updater.UpdaterID))
|
m_reuseableDynamicTextures.Invalidate(reuseableTextureKey);
|
||||||
{
|
objReusableTextureUUID = null;
|
||||||
Updaters.Add(updater.UpdaterID, updater);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
// No need to add to updaters as the texture is always the same. Not that this functionality
|
|
||||||
// apppears to be implemented anyway.
|
|
||||||
if (RegisteredScenes.ContainsKey(updater.SimUUID))
|
|
||||||
{
|
|
||||||
SceneObjectPart part = RegisteredScenes[updater.SimUUID].GetSceneObjectPart(updater.PrimID);
|
|
||||||
|
|
||||||
if (part != null)
|
|
||||||
updater.UpdatePart(part, (UUID)reusableTextureUUID);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return updater.UpdaterID;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return UUID.Zero;
|
// We cannot reuse a dynamic texture if the data is going to be blended with something already there.
|
||||||
|
if (objReusableTextureUUID == null)
|
||||||
|
{
|
||||||
|
lock (Updaters)
|
||||||
|
{
|
||||||
|
if (!Updaters.ContainsKey(updater.UpdaterID))
|
||||||
|
{
|
||||||
|
Updaters.Add(updater.UpdaterID, updater);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
// No need to add to updaters as the texture is always the same. Not that this functionality
|
||||||
|
// apppears to be implemented anyway.
|
||||||
|
updater.UpdatePart(part, (UUID)objReusableTextureUUID);
|
||||||
|
}
|
||||||
|
|
||||||
|
return updater.UpdaterID;
|
||||||
}
|
}
|
||||||
|
|
||||||
private string GenerateReusableTextureKey(string data, string extraParams)
|
private string GenerateReusableTextureKey(string data, string extraParams)
|
||||||
|
@ -267,6 +283,10 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
|
|
||||||
public void Initialise(Scene scene, IConfigSource config)
|
public void Initialise(Scene scene, IConfigSource config)
|
||||||
{
|
{
|
||||||
|
IConfig texturesConfig = config.Configs["Textures"];
|
||||||
|
if (texturesConfig != null)
|
||||||
|
ReuseTextures = texturesConfig.GetBoolean("ReuseDynamicTextures", false);
|
||||||
|
|
||||||
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
if (!RegisteredScenes.ContainsKey(scene.RegionInfo.RegionID))
|
||||||
{
|
{
|
||||||
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
|
RegisteredScenes.Add(scene.RegionInfo.RegionID, scene);
|
||||||
|
@ -276,7 +296,6 @@ namespace OpenSim.Region.CoreModules.Scripting.DynamicTexture
|
||||||
|
|
||||||
public void PostInitialise()
|
public void PostInitialise()
|
||||||
{
|
{
|
||||||
// ReuseTextures = true;
|
|
||||||
if (ReuseTextures)
|
if (ReuseTextures)
|
||||||
{
|
{
|
||||||
m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);
|
m_reuseableDynamicTextures = new Cache(CacheMedium.Memory, CacheStrategy.Conservative);
|
||||||
|
|
|
@ -58,6 +58,7 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
public string body;
|
public string body;
|
||||||
public int responseCode;
|
public int responseCode;
|
||||||
public string responseBody;
|
public string responseBody;
|
||||||
|
public string responseType = "text/plain";
|
||||||
//public ManualResetEvent ev;
|
//public ManualResetEvent ev;
|
||||||
public bool requestDone;
|
public bool requestDone;
|
||||||
public int startTime;
|
public int startTime;
|
||||||
|
@ -270,6 +271,22 @@ namespace OpenSim.Region.CoreModules.Scripting.LSLHttp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void HttpContentType(UUID request, string type)
|
||||||
|
{
|
||||||
|
lock (m_UrlMap)
|
||||||
|
{
|
||||||
|
if (m_RequestMap.ContainsKey(request))
|
||||||
|
{
|
||||||
|
UrlData urlData = m_RequestMap[request];
|
||||||
|
urlData.requests[request].responseType = type;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
m_log.Info("[HttpRequestHandler] There is no http-in request with id " + request.ToString());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public void HttpResponse(UUID request, int status, string body)
|
public void HttpResponse(UUID request, int status, string body)
|
||||||
{
|
{
|
||||||
lock (m_RequestMap)
|
lock (m_RequestMap)
|
||||||
|
|
|
@ -39,6 +39,8 @@ namespace OpenSim.Region.Framework.Interfaces
|
||||||
UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
|
UUID RequestSecureURL(IScriptModule engine, SceneObjectPart host, UUID itemID);
|
||||||
void ReleaseURL(string url);
|
void ReleaseURL(string url);
|
||||||
void HttpResponse(UUID request, int status, string body);
|
void HttpResponse(UUID request, int status, string body);
|
||||||
|
void HttpContentType(UUID request, string type);
|
||||||
|
|
||||||
string GetHttpHeader(UUID request, string header);
|
string GetHttpHeader(UUID request, string header);
|
||||||
int GetFreeUrls();
|
int GetFreeUrls();
|
||||||
|
|
||||||
|
|
|
@ -10903,31 +10903,30 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
public LSL_Float llListStatistics(int operation, LSL_List src)
|
public LSL_Float llListStatistics(int operation, LSL_List src)
|
||||||
{
|
{
|
||||||
m_host.AddScriptLPS(1);
|
m_host.AddScriptLPS(1);
|
||||||
LSL_List nums = LSL_List.ToDoubleList(src);
|
|
||||||
switch (operation)
|
switch (operation)
|
||||||
{
|
{
|
||||||
case ScriptBaseClass.LIST_STAT_RANGE:
|
case ScriptBaseClass.LIST_STAT_RANGE:
|
||||||
return nums.Range();
|
return src.Range();
|
||||||
case ScriptBaseClass.LIST_STAT_MIN:
|
case ScriptBaseClass.LIST_STAT_MIN:
|
||||||
return nums.Min();
|
return src.Min();
|
||||||
case ScriptBaseClass.LIST_STAT_MAX:
|
case ScriptBaseClass.LIST_STAT_MAX:
|
||||||
return nums.Max();
|
return src.Max();
|
||||||
case ScriptBaseClass.LIST_STAT_MEAN:
|
case ScriptBaseClass.LIST_STAT_MEAN:
|
||||||
return nums.Mean();
|
return src.Mean();
|
||||||
case ScriptBaseClass.LIST_STAT_MEDIAN:
|
case ScriptBaseClass.LIST_STAT_MEDIAN:
|
||||||
return nums.Median();
|
return LSL_List.ToDoubleList(src).Median();
|
||||||
case ScriptBaseClass.LIST_STAT_NUM_COUNT:
|
case ScriptBaseClass.LIST_STAT_NUM_COUNT:
|
||||||
return nums.NumericLength();
|
return src.NumericLength();
|
||||||
case ScriptBaseClass.LIST_STAT_STD_DEV:
|
case ScriptBaseClass.LIST_STAT_STD_DEV:
|
||||||
return nums.StdDev();
|
return src.StdDev();
|
||||||
case ScriptBaseClass.LIST_STAT_SUM:
|
case ScriptBaseClass.LIST_STAT_SUM:
|
||||||
return nums.Sum();
|
return src.Sum();
|
||||||
case ScriptBaseClass.LIST_STAT_SUM_SQUARES:
|
case ScriptBaseClass.LIST_STAT_SUM_SQUARES:
|
||||||
return nums.SumSqrs();
|
return src.SumSqrs();
|
||||||
case ScriptBaseClass.LIST_STAT_GEOMETRIC_MEAN:
|
case ScriptBaseClass.LIST_STAT_GEOMETRIC_MEAN:
|
||||||
return nums.GeometricMean();
|
return src.GeometricMean();
|
||||||
case ScriptBaseClass.LIST_STAT_HARMONIC_MEAN:
|
case ScriptBaseClass.LIST_STAT_HARMONIC_MEAN:
|
||||||
return nums.HarmonicMean();
|
return src.HarmonicMean();
|
||||||
default:
|
default:
|
||||||
return 0.0;
|
return 0.0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,6 +141,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
internal bool m_debuggerSafe = false;
|
internal bool m_debuggerSafe = false;
|
||||||
internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
|
internal Dictionary<string, FunctionPerms > m_FunctionPerms = new Dictionary<string, FunctionPerms >();
|
||||||
|
|
||||||
|
protected IUrlModule m_UrlModule = null;
|
||||||
|
|
||||||
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
|
||||||
{
|
{
|
||||||
m_ScriptEngine = ScriptEngine;
|
m_ScriptEngine = ScriptEngine;
|
||||||
|
@ -148,6 +150,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
m_item = item;
|
m_item = item;
|
||||||
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
|
m_debuggerSafe = m_ScriptEngine.Config.GetBoolean("DebuggerSafe", false);
|
||||||
|
|
||||||
|
m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
|
||||||
|
|
||||||
if (m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
|
if (m_ScriptEngine.Config.GetBoolean("AllowOSFunctions", false))
|
||||||
m_OSFunctionsEnabled = true;
|
m_OSFunctionsEnabled = true;
|
||||||
|
|
||||||
|
@ -3406,5 +3410,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
|
||||||
|
|
||||||
return new LSL_Key(m_host.ParentGroup.FromPartID.ToString());
|
return new LSL_Key(m_host.ParentGroup.FromPartID.ToString());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the response type for an HTTP request/response
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
public void osSetContentType(LSL_Key id, string type)
|
||||||
|
{
|
||||||
|
CheckThreatLevel(ThreatLevel.High,"osSetResponseType");
|
||||||
|
if (m_UrlModule != null)
|
||||||
|
m_UrlModule.HttpContentType(new UUID(id),type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -365,5 +365,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
|
/// <returns>Rezzing object key or NULL_KEY if rezzed by agent or otherwise unknown.</returns>
|
||||||
LSL_Key osGetRezzingObject();
|
LSL_Key osGetRezzingObject();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Sets the response type for an HTTP request/response
|
||||||
|
/// </summary>
|
||||||
|
/// <returns></returns>
|
||||||
|
void osSetContentType(LSL_Key id, string type);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -955,5 +955,10 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase
|
||||||
{
|
{
|
||||||
return m_OSSL_Functions.osGetRezzingObject();
|
return m_OSSL_Functions.osGetRezzingObject();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void osSetContentType(LSL_Key id, string type)
|
||||||
|
{
|
||||||
|
m_OSSL_Functions.osSetContentType(id,type);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,10 +47,10 @@ using OpenSim.Services.AvatarService;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
using OpenSim.Tests.Common.Mock;
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
namespace OpenSim.Tests.Torture
|
namespace OpenSim.Tests.Performance
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// NPC torture tests
|
/// NPC performance tests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
||||||
|
@ -58,7 +58,7 @@ namespace OpenSim.Tests.Torture
|
||||||
/// earlier tests.
|
/// earlier tests.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class NPCTortureTests
|
public class NPCPerformanceTests
|
||||||
{
|
{
|
||||||
private TestScene scene;
|
private TestScene scene;
|
||||||
private AvatarFactoryModule afm;
|
private AvatarFactoryModule afm;
|
|
@ -36,10 +36,10 @@ using OpenSim.Region.Framework.Scenes;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
using OpenSim.Tests.Common.Mock;
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
namespace OpenSim.Tests.Torture
|
namespace OpenSim.Tests.Performance
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Object torture tests
|
/// Object performance tests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
||||||
|
@ -47,7 +47,7 @@ namespace OpenSim.Tests.Torture
|
||||||
/// earlier tests.
|
/// earlier tests.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class ObjectTortureTests
|
public class ObjectPerformanceTests
|
||||||
{
|
{
|
||||||
[TearDown]
|
[TearDown]
|
||||||
public void TearDown()
|
public void TearDown()
|
|
@ -42,10 +42,10 @@ using OpenSim.Region.ScriptEngine.XEngine;
|
||||||
using OpenSim.Tests.Common;
|
using OpenSim.Tests.Common;
|
||||||
using OpenSim.Tests.Common.Mock;
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
namespace OpenSim.Tests.Torture
|
namespace OpenSim.Tests.Performance
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Script torture tests
|
/// Script performance tests
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>
|
/// <remarks>
|
||||||
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
/// Don't rely on the numbers given by these tests - they will vary a lot depending on what is already cached,
|
||||||
|
@ -53,7 +53,7 @@ namespace OpenSim.Tests.Torture
|
||||||
/// earlier tests.
|
/// earlier tests.
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
[TestFixture]
|
[TestFixture]
|
||||||
public class ScriptTortureTests
|
public class ScriptPerformanceTests
|
||||||
{
|
{
|
||||||
private TestScene m_scene;
|
private TestScene m_scene;
|
||||||
private XEngine m_xEngine;
|
private XEngine m_xEngine;
|
|
@ -0,0 +1,132 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) Contributors, http://opensimulator.org/
|
||||||
|
* See CONTRIBUTORS.TXT for a full list of copyright holders.
|
||||||
|
*
|
||||||
|
* Redistribution and use in source and binary forms, with or without
|
||||||
|
* modification, are permitted provided that the following conditions are met:
|
||||||
|
* * Redistributions of source code must retain the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer.
|
||||||
|
* * Redistributions in binary form must reproduce the above copyright
|
||||||
|
* notice, this list of conditions and the following disclaimer in the
|
||||||
|
* documentation and/or other materials provided with the distribution.
|
||||||
|
* * Neither the name of the OpenSimulator Project nor the
|
||||||
|
* names of its contributors may be used to endorse or promote products
|
||||||
|
* derived from this software without specific prior written permission.
|
||||||
|
*
|
||||||
|
* THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY
|
||||||
|
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
* DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY
|
||||||
|
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||||
|
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
*/
|
||||||
|
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.IO;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Reflection;
|
||||||
|
using System.Threading;
|
||||||
|
using log4net.Config;
|
||||||
|
using NUnit.Framework;
|
||||||
|
using OpenMetaverse;
|
||||||
|
using OpenMetaverse.Assets;
|
||||||
|
using OpenSim.Framework;
|
||||||
|
using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
|
||||||
|
using OpenSim.Region.CoreModules.Scripting.VectorRender;
|
||||||
|
using OpenSim.Region.Framework.Scenes;
|
||||||
|
using OpenSim.Region.Framework.Scenes.Serialization;
|
||||||
|
using OpenSim.Tests.Common;
|
||||||
|
using OpenSim.Tests.Common.Mock;
|
||||||
|
|
||||||
|
namespace OpenSim.Tests.Stress
|
||||||
|
{
|
||||||
|
[TestFixture]
|
||||||
|
public class VectorRenderModuleStressTests : OpenSimTestCase
|
||||||
|
{
|
||||||
|
public Scene Scene { get; private set; }
|
||||||
|
public DynamicTextureModule Dtm { get; private set; }
|
||||||
|
public VectorRenderModule Vrm { get; private set; }
|
||||||
|
|
||||||
|
private void SetupScene(bool reuseTextures)
|
||||||
|
{
|
||||||
|
Scene = new SceneHelpers().SetupScene();
|
||||||
|
|
||||||
|
Dtm = new DynamicTextureModule();
|
||||||
|
Dtm.ReuseTextures = reuseTextures;
|
||||||
|
|
||||||
|
Vrm = new VectorRenderModule();
|
||||||
|
|
||||||
|
SceneHelpers.SetupSceneModules(Scene, Dtm, Vrm);
|
||||||
|
}
|
||||||
|
|
||||||
|
[Test]
|
||||||
|
public void TestConcurrentRepeatedDraw()
|
||||||
|
{
|
||||||
|
int threads = 4;
|
||||||
|
TestHelpers.InMethod();
|
||||||
|
|
||||||
|
SetupScene(false);
|
||||||
|
|
||||||
|
List<Drawer> drawers = new List<Drawer>();
|
||||||
|
|
||||||
|
for (int i = 0; i < threads; i++)
|
||||||
|
{
|
||||||
|
Drawer d = new Drawer(this, i);
|
||||||
|
drawers.Add(d);
|
||||||
|
Console.WriteLine("Starting drawer {0}", i);
|
||||||
|
Util.FireAndForget(o => d.Draw());
|
||||||
|
}
|
||||||
|
|
||||||
|
Thread.Sleep(10 * 60 * 1000);
|
||||||
|
|
||||||
|
drawers.ForEach(d => d.Ready = false);
|
||||||
|
drawers.ForEach(d => Console.WriteLine("Drawer {0} drew {1} textures", d.Number, d.Pass + 1));
|
||||||
|
}
|
||||||
|
|
||||||
|
class Drawer
|
||||||
|
{
|
||||||
|
public int Number { get; private set; }
|
||||||
|
public int Pass { get; private set; }
|
||||||
|
public bool Ready { get; set; }
|
||||||
|
|
||||||
|
private VectorRenderModuleStressTests m_tests;
|
||||||
|
|
||||||
|
public Drawer(VectorRenderModuleStressTests tests, int number)
|
||||||
|
{
|
||||||
|
m_tests = tests;
|
||||||
|
Number = number;
|
||||||
|
Ready = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Draw()
|
||||||
|
{
|
||||||
|
SceneObjectGroup so = SceneHelpers.AddSceneObject(m_tests.Scene);
|
||||||
|
|
||||||
|
while (Ready)
|
||||||
|
{
|
||||||
|
UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
|
||||||
|
|
||||||
|
// Ensure unique text
|
||||||
|
string text = string.Format("{0:D2}{1}", Number, Pass);
|
||||||
|
|
||||||
|
m_tests.Dtm.AddDynamicTextureData(
|
||||||
|
m_tests.Scene.RegionInfo.RegionID,
|
||||||
|
so.UUID,
|
||||||
|
m_tests.Vrm.GetContentType(),
|
||||||
|
string.Format("PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text),
|
||||||
|
"",
|
||||||
|
0);
|
||||||
|
|
||||||
|
Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
|
||||||
|
|
||||||
|
Pass++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -693,6 +693,17 @@
|
||||||
;LevelUpload = 0
|
;LevelUpload = 0
|
||||||
|
|
||||||
|
|
||||||
|
[Textures]
|
||||||
|
; If true, textures generated dynamically (i.e. through osSetDynamicTextureData() and similar OSSL functions) are reused where possible
|
||||||
|
; Chiefly, reuse occurs if a texture has already been generated with identical data and settings, and that texture contains no dynamic components
|
||||||
|
; (e.g. images pulled from an external HTTP address).
|
||||||
|
; Reusing previously generated textures results in a much faster update on the viewer but may cause issues if the viewer didn't receive all resolutions of the texture.
|
||||||
|
; Currently, it will also increase asset cache use since temporary dynamic textures are no longer deleted.
|
||||||
|
; Hence, currently considered experimental.
|
||||||
|
; Default is false.
|
||||||
|
ReuseDynamicTextures = false
|
||||||
|
|
||||||
|
|
||||||
[ODEPhysicsSettings]
|
[ODEPhysicsSettings]
|
||||||
; ##
|
; ##
|
||||||
; ## Physics stats settings
|
; ## Physics stats settings
|
||||||
|
|
42
prebuild.xml
42
prebuild.xml
|
@ -3371,7 +3371,47 @@
|
||||||
</Files>
|
</Files>
|
||||||
</Project>
|
</Project>
|
||||||
|
|
||||||
<Project frameworkVersion="v3_5" name="OpenSim.Tests.Torture" path="OpenSim/Tests/Torture" type="Library">
|
<Project frameworkVersion="v3_5" name="OpenSim.Tests.Stress" path="OpenSim/Tests/Stress" type="Library">
|
||||||
|
<Configuration name="Debug">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
<Configuration name="Release">
|
||||||
|
<Options>
|
||||||
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
</Options>
|
||||||
|
</Configuration>
|
||||||
|
|
||||||
|
<ReferencePath>../../../bin/</ReferencePath>
|
||||||
|
<Reference name="System"/>
|
||||||
|
<Reference name="System.Xml"/>
|
||||||
|
<Reference name="System.Data"/>
|
||||||
|
<Reference name="log4net" path="../../../bin/"/>
|
||||||
|
<Reference name="Nini" path="../../../bin/"/>
|
||||||
|
<Reference name="nunit.framework" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenMetaverse" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenMetaverseTypes" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenMetaverse.StructuredData" path="../../../bin/"/>
|
||||||
|
<Reference name="XMLRPC" path="../../../bin/"/>
|
||||||
|
<Reference name="OpenSim.Framework"/>
|
||||||
|
<Reference name="OpenSim.Framework.Communications"/>
|
||||||
|
<Reference name="OpenSim.Framework.Console"/>
|
||||||
|
<Reference name="OpenSim.Framework.Servers.HttpServer"/>
|
||||||
|
<Reference name="OpenSim.Region.CoreModules"/>
|
||||||
|
<Reference name="OpenSim.Region.Framework"/>
|
||||||
|
<Reference name="OpenSim.Region.OptionalModules"/>
|
||||||
|
<Reference name="OpenSim.Region.ScriptEngine.Shared"/>
|
||||||
|
<Reference name="OpenSim.Region.ScriptEngine.XEngine"/>
|
||||||
|
<Reference name="OpenSim.Services.Interfaces"/>
|
||||||
|
<Reference name="OpenSim.Services.AvatarService"/>
|
||||||
|
<Reference name="OpenSim.Tests.Common"/>
|
||||||
|
<Files>
|
||||||
|
<Match pattern="*.cs" recurse="false"/>
|
||||||
|
</Files>
|
||||||
|
</Project>
|
||||||
|
|
||||||
|
<Project frameworkVersion="v3_5" name="OpenSim.Tests.Performance" path="OpenSim/Tests/Performance" type="Library">
|
||||||
<Configuration name="Debug">
|
<Configuration name="Debug">
|
||||||
<Options>
|
<Options>
|
||||||
<OutputPath>../../../bin/</OutputPath>
|
<OutputPath>../../../bin/</OutputPath>
|
||||||
|
|
Loading…
Reference in New Issue