diff options
Diffstat (limited to 'OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs index b50c0bd..41baccc 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/Tests/VectorRenderModuleTests.cs | |||
@@ -57,6 +57,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests | |||
57 | 57 | ||
58 | m_dtm = new DynamicTextureModule(); | 58 | m_dtm = new DynamicTextureModule(); |
59 | m_dtm.ReuseTextures = reuseTextures; | 59 | m_dtm.ReuseTextures = reuseTextures; |
60 | // m_dtm.ReuseLowDataTextures = reuseTextures; | ||
60 | 61 | ||
61 | m_vrm = new VectorRenderModule(); | 62 | m_vrm = new VectorRenderModule(); |
62 | 63 | ||
@@ -201,6 +202,7 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests | |||
201 | public void TestRepeatSameDrawReusingTexture() | 202 | public void TestRepeatSameDrawReusingTexture() |
202 | { | 203 | { |
203 | TestHelpers.InMethod(); | 204 | TestHelpers.InMethod(); |
205 | // TestHelpers.EnableLogging(); | ||
204 | 206 | ||
205 | string dtText = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;"; | 207 | string dtText = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;"; |
206 | 208 | ||
@@ -228,6 +230,46 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender.Tests | |||
228 | Assert.That(firstDynamicTextureID, Is.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); | 230 | Assert.That(firstDynamicTextureID, Is.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); |
229 | } | 231 | } |
230 | 232 | ||
233 | /// <summary> | ||
234 | /// Test a low data dynamically generated texture such that it is treated as a low data texture that causes | ||
235 | /// problems for current viewers. | ||
236 | /// </summary> | ||
237 | /// <remarks> | ||
238 | /// As we do not set DynamicTextureModule.ReuseLowDataTextures = true in this test, it should not reuse the | ||
239 | /// texture | ||
240 | /// </remarks> | ||
241 | [Test] | ||
242 | public void TestRepeatSameDrawLowDataTexture() | ||
243 | { | ||
244 | TestHelpers.InMethod(); | ||
245 | // TestHelpers.EnableLogging(); | ||
246 | |||
247 | string dtText = "PenColour BLACK; MoveTo 40,220; FontSize 32; Text Hello World;"; | ||
248 | |||
249 | SetupScene(true); | ||
250 | SceneObjectGroup so = SceneHelpers.AddSceneObject(m_scene); | ||
251 | |||
252 | m_dtm.AddDynamicTextureData( | ||
253 | m_scene.RegionInfo.RegionID, | ||
254 | so.UUID, | ||
255 | m_vrm.GetContentType(), | ||
256 | dtText, | ||
257 | "1024", | ||
258 | 0); | ||
259 | |||
260 | UUID firstDynamicTextureID = so.RootPart.Shape.Textures.GetFace(0).TextureID; | ||
261 | |||
262 | m_dtm.AddDynamicTextureData( | ||
263 | m_scene.RegionInfo.RegionID, | ||
264 | so.UUID, | ||
265 | m_vrm.GetContentType(), | ||
266 | dtText, | ||
267 | "1024", | ||
268 | 0); | ||
269 | |||
270 | Assert.That(firstDynamicTextureID, Is.Not.EqualTo(so.RootPart.Shape.Textures.GetFace(0).TextureID)); | ||
271 | } | ||
272 | |||
231 | [Test] | 273 | [Test] |
232 | public void TestRepeatSameDrawDifferentExtraParamsReusingTexture() | 274 | public void TestRepeatSameDrawDifferentExtraParamsReusingTexture() |
233 | { | 275 | { |