29 using System.Collections.Generic;
31 using System.Reflection;
32 using System.Threading;
34 using NUnit.Framework;
36 using OpenMetaverse.Assets;
37 using OpenSim.Framework;
38 using OpenSim.Region.CoreModules.Scripting.DynamicTexture;
39 using OpenSim.Region.CoreModules.Scripting.VectorRender;
40 using OpenSim.Region.Framework.Scenes;
41 using OpenSim.Region.Framework.Scenes.Serialization;
42 using OpenSim.Tests.Common;
53 private void SetupScene(
bool reuseTextures)
58 m_dtm.ReuseTextures = reuseTextures;
63 SceneHelpers.SetupSceneModules(m_scene, m_dtm, m_vrm);
69 TestHelpers.InMethod();
73 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
75 m_dtm.AddDynamicTextureData(
76 m_scene.RegionInfo.RegionID,
78 m_vrm.GetContentType(),
79 "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;",
83 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
89 TestHelpers.InMethod();
91 string dtText =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
96 m_dtm.AddDynamicTextureData(
97 m_scene.RegionInfo.RegionID,
99 m_vrm.GetContentType(),
104 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
106 m_dtm.AddDynamicTextureData(
107 m_scene.RegionInfo.RegionID,
109 m_vrm.GetContentType(),
114 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
120 TestHelpers.InMethod();
122 string dtText =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
127 m_dtm.AddDynamicTextureData(
128 m_scene.RegionInfo.RegionID,
130 m_vrm.GetContentType(),
135 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
137 m_dtm.AddDynamicTextureData(
138 m_scene.RegionInfo.RegionID,
140 m_vrm.GetContentType(),
145 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
151 TestHelpers.InMethod();
154 =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World; Image http://0.0.0.0/shouldnotexist.png";
159 m_dtm.AddDynamicTextureData(
160 m_scene.RegionInfo.RegionID,
162 m_vrm.GetContentType(),
167 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
169 m_dtm.AddDynamicTextureData(
170 m_scene.RegionInfo.RegionID,
172 m_vrm.GetContentType(),
177 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
183 TestHelpers.InMethod();
187 UUID originalTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
189 m_dtm.AddDynamicTextureData(
190 m_scene.RegionInfo.RegionID,
192 m_vrm.GetContentType(),
193 "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;",
197 Assert.That(originalTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
203 TestHelpers.InMethod();
206 string dtText =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
211 m_dtm.AddDynamicTextureData(
212 m_scene.RegionInfo.RegionID,
214 m_vrm.GetContentType(),
219 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
221 m_dtm.AddDynamicTextureData(
222 m_scene.RegionInfo.RegionID,
224 m_vrm.GetContentType(),
229 Assert.That(firstDynamicTextureID, Is.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
243 TestHelpers.InMethod();
246 string dtText =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
251 m_dtm.AddDynamicTextureData(
252 m_scene.RegionInfo.RegionID,
254 m_vrm.GetContentType(),
259 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
261 m_dtm.AddDynamicTextureData(
262 m_scene.RegionInfo.RegionID,
264 m_vrm.GetContentType(),
269 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
275 TestHelpers.InMethod();
277 string dtText =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;";
282 m_dtm.AddDynamicTextureData(
283 m_scene.RegionInfo.RegionID,
285 m_vrm.GetContentType(),
290 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
292 m_dtm.AddDynamicTextureData(
293 m_scene.RegionInfo.RegionID,
295 m_vrm.GetContentType(),
300 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
306 TestHelpers.InMethod();
309 =
"PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World; Image http://0.0.0.0/shouldnotexist.png";
314 m_dtm.AddDynamicTextureData(
315 m_scene.RegionInfo.RegionID,
317 m_vrm.GetContentType(),
322 UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID;
324 m_dtm.AddDynamicTextureData(
325 m_scene.RegionInfo.RegionID,
327 m_vrm.GetContentType(),
332 Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID));
void TestDrawReusingTexture()
A scene object group is conceptually an object in the scene. The object is constituted of SceneObject...
void TestRepeatSameDrawContainingImage()
void TestRepeatSameDrawDifferentExtraParamsReusingTexture()
void TestRepeatSameDrawLowDataTexture()
Test a low data dynamically generated texture such that it is treated as a low data texture that caus...
Helpers for setting up scenes.
void TestRepeatSameDraw()
Interactive OpenSim region server
void TestRepeatSameDrawReusingTexture()
void TestRepeatSameDrawDifferentExtraParams()
void TestRepeatSameDrawContainingImageReusingTexture()