diff options
author | Diva Canto | 2012-11-11 19:39:21 -0800 |
---|---|---|
committer | Diva Canto | 2012-11-11 19:39:21 -0800 |
commit | db418bff2bb6b2676c996e77b260b0977e886f5d (patch) | |
tree | 22efac35f69b9ac51bc784ffb8352339bc0f04f8 /OpenSim/Region/CoreModules/Scripting/VectorRender | |
parent | One more module converted: WebStatsModule. (diff) | |
download | opensim-SC_OLD-db418bff2bb6b2676c996e77b260b0977e886f5d.zip opensim-SC_OLD-db418bff2bb6b2676c996e77b260b0977e886f5d.tar.gz opensim-SC_OLD-db418bff2bb6b2676c996e77b260b0977e886f5d.tar.bz2 opensim-SC_OLD-db418bff2bb6b2676c996e77b260b0977e886f5d.tar.xz |
Fix issues with the DynamicTextureModule and corresponding unit tests.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs index efa99e9..689e8a7 100644 --- a/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/VectorRender/VectorRenderModule.cs | |||
@@ -58,21 +58,6 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
58 | 58 | ||
59 | private Scene m_scene; | 59 | private Scene m_scene; |
60 | private IDynamicTextureManager m_textureManager; | 60 | private IDynamicTextureManager m_textureManager; |
61 | private IDynamicTextureManager TextureManager | ||
62 | { | ||
63 | get | ||
64 | { | ||
65 | if (m_textureManager == null && m_scene != null) | ||
66 | { | ||
67 | m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>(); | ||
68 | if (m_textureManager != null) | ||
69 | { | ||
70 | m_textureManager.RegisterRender(GetContentType(), this); | ||
71 | } | ||
72 | } | ||
73 | return m_textureManager; | ||
74 | } | ||
75 | } | ||
76 | 61 | ||
77 | private Graphics m_graph; | 62 | private Graphics m_graph; |
78 | private string m_fontName = "Arial"; | 63 | private string m_fontName = "Arial"; |
@@ -121,8 +106,13 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
121 | 106 | ||
122 | public bool AsyncConvertData(UUID id, string bodyData, string extraParams) | 107 | public bool AsyncConvertData(UUID id, string bodyData, string extraParams) |
123 | { | 108 | { |
109 | if (m_textureManager == null) | ||
110 | { | ||
111 | m_log.Warn("[VECTORRENDERMODULE]: No texture manager. Can't function"); | ||
112 | return false; | ||
113 | } | ||
124 | // XXX: This isn't actually being done asynchronously! | 114 | // XXX: This isn't actually being done asynchronously! |
125 | TextureManager.ReturnData(id, ConvertData(bodyData, extraParams)); | 115 | m_textureManager.ReturnData(id, ConvertData(bodyData, extraParams)); |
126 | 116 | ||
127 | return true; | 117 | return true; |
128 | } | 118 | } |
@@ -180,6 +170,14 @@ namespace OpenSim.Region.CoreModules.Scripting.VectorRender | |||
180 | 170 | ||
181 | public void RegionLoaded(Scene scene) | 171 | public void RegionLoaded(Scene scene) |
182 | { | 172 | { |
173 | if (m_textureManager == null && m_scene == scene) | ||
174 | { | ||
175 | m_textureManager = m_scene.RequestModuleInterface<IDynamicTextureManager>(); | ||
176 | if (m_textureManager != null) | ||
177 | { | ||
178 | m_textureManager.RegisterRender(GetContentType(), this); | ||
179 | } | ||
180 | } | ||
183 | } | 181 | } |
184 | 182 | ||
185 | public void RemoveRegion(Scene scene) | 183 | public void RemoveRegion(Scene scene) |