29 using System.Collections.Generic;
32 using System.Reflection;
33 using System.Threading;
35 using NUnit.Framework;
37 using OpenMetaverse.Assets;
38 using OpenSim.Framework;
39 using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
40 using OpenSim.Region.CoreModules.Scripting.VectorRender;
41 using OpenSim.Region.Framework.Scenes;
42 using OpenSim.Region.Framework.Scenes.Serialization;
43 using OpenSim.Tests.Common;
54 private void SetupScene(
bool reuseTextures)
59 Dtm.ReuseTextures = reuseTextures;
63 SceneHelpers.SetupSceneModules(
Scene, Dtm, Vrm);
70 TestHelpers.InMethod();
74 List<Drawer> drawers =
new List<Drawer>();
76 for (
int i = 0; i < threads; i++)
78 Drawer d =
new Drawer(
this, i);
80 Console.WriteLine(
"Starting drawer {0}", i);
81 Util.FireAndForget(o => d.Draw(), null,
"VectorRenderModuleStressTests.TestConcurrentRepeatedDraw");
84 Thread.Sleep(10 * 60 * 1000);
86 drawers.ForEach(d => d.Ready =
false);
87 drawers.ForEach(d => Console.WriteLine(
"Drawer {0} drew {1} textures", d.Number, d.Pass + 1));
92 public int Number {
get;
private set; }
93 public int Pass {
get;
private set; }
94 public bool Ready {
get; set; }
96 private VectorRenderModuleStressTests m_tests;
98 public Drawer(VectorRenderModuleStressTests tests,
int number)
111 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
114 string text = string.Format(
"{0:D2}{1}", Number,
Pass);
116 m_tests.Dtm.AddDynamicTextureData(
117 m_tests.Scene.RegionInfo.RegionID,
119 m_tests.Vrm.GetContentType(),
120 string.Format(
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text {0};", text),
124 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
void TestConcurrentRepeatedDraw()
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
Helpers for setting up scenes.
Interactive OpenSim region server