diff options
author | Melanie | 2012-11-20 01:21:15 +0000 |
---|---|---|
committer | Melanie | 2012-11-20 01:21:15 +0000 |
commit | decc5318a78cee5a8c18746363ab3b041d430289 (patch) | |
tree | e80b997dea1ac13d795ad9f22dfb02bc1a844b35 /OpenSim/Capabilities | |
parent | Merge commit 'e9153e1d1aae50024d8cd05fe14a9bce34343a0e' into careminster (diff) | |
parent | Merge branch 'teravuswork' into avination (diff) | |
download | opensim-SC_OLD-decc5318a78cee5a8c18746363ab3b041d430289.zip opensim-SC_OLD-decc5318a78cee5a8c18746363ab3b041d430289.tar.gz opensim-SC_OLD-decc5318a78cee5a8c18746363ab3b041d430289.tar.bz2 opensim-SC_OLD-decc5318a78cee5a8c18746363ab3b041d430289.tar.xz |
Merge branch 'avination' into careminster
Diffstat (limited to 'OpenSim/Capabilities')
-rw-r--r-- | OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs index da59294..380705f 100644 --- a/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs +++ b/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs | |||
@@ -152,6 +152,7 @@ namespace OpenSim.Capabilities.Handlers | |||
152 | responsedata["keepalive"] = false; | 152 | responsedata["keepalive"] = false; |
153 | responsedata["str_response_string"] = "This range doesnt exist."; | 153 | responsedata["str_response_string"] = "This range doesnt exist."; |
154 | responsedata["reusecontext"] = false; | 154 | responsedata["reusecontext"] = false; |
155 | responsedata["int_lod"] = 3; | ||
155 | return responsedata; | 156 | return responsedata; |
156 | } | 157 | } |
157 | else | 158 | else |
@@ -162,14 +163,28 @@ namespace OpenSim.Capabilities.Handlers | |||
162 | 163 | ||
163 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); | 164 | //m_log.Debug("Serving " + start + " to " + end + " of " + texture.Data.Length + " bytes for texture " + texture.ID); |
164 | 165 | ||
165 | 166 | if (start > 20000) | |
167 | { | ||
168 | responsedata["int_lod"] = 3; | ||
169 | } | ||
170 | else if (start < 4097) | ||
171 | { | ||
172 | responsedata["int_lod"] = 1; | ||
173 | } | ||
174 | else | ||
175 | { | ||
176 | responsedata["int_lod"] = 2; | ||
177 | } | ||
166 | 178 | ||
179 | |||
167 | if (start == 0 && len == mesh.Data.Length) // well redudante maybe | 180 | if (start == 0 && len == mesh.Data.Length) // well redudante maybe |
168 | { | 181 | { |
169 | responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK; | 182 | responsedata["int_response_code"] = (int) System.Net.HttpStatusCode.OK; |
170 | responsedata["bin_response_data"] = mesh.Data; | 183 | responsedata["bin_response_data"] = mesh.Data; |
171 | responsedata["int_bytes"] = mesh.Data.Length; | 184 | responsedata["int_bytes"] = mesh.Data.Length; |
172 | responsedata["reusecontext"] = false; | 185 | responsedata["reusecontext"] = false; |
186 | responsedata["int_lod"] = 3; | ||
187 | |||
173 | } | 188 | } |
174 | else | 189 | else |
175 | { | 190 | { |
@@ -193,6 +208,7 @@ namespace OpenSim.Capabilities.Handlers | |||
193 | responsedata["content_type"] = "application/vnd.ll.mesh"; | 208 | responsedata["content_type"] = "application/vnd.ll.mesh"; |
194 | responsedata["int_response_code"] = 200; | 209 | responsedata["int_response_code"] = 200; |
195 | responsedata["reusecontext"] = false; | 210 | responsedata["reusecontext"] = false; |
211 | responsedata["int_lod"] = 3; | ||
196 | } | 212 | } |
197 | } | 213 | } |
198 | else | 214 | else |
@@ -201,6 +217,7 @@ namespace OpenSim.Capabilities.Handlers | |||
201 | responsedata["content_type"] = "application/vnd.ll.mesh"; | 217 | responsedata["content_type"] = "application/vnd.ll.mesh"; |
202 | responsedata["int_response_code"] = 200; | 218 | responsedata["int_response_code"] = 200; |
203 | responsedata["reusecontext"] = false; | 219 | responsedata["reusecontext"] = false; |
220 | responsedata["int_lod"] = 3; | ||
204 | } | 221 | } |
205 | } | 222 | } |
206 | // Optionally add additional mesh types here | 223 | // Optionally add additional mesh types here |
@@ -211,6 +228,7 @@ namespace OpenSim.Capabilities.Handlers | |||
211 | responsedata["keepalive"] = false; | 228 | responsedata["keepalive"] = false; |
212 | responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh."; | 229 | responsedata["str_response_string"] = "Unfortunately, this asset isn't a mesh."; |
213 | responsedata["reusecontext"] = false; | 230 | responsedata["reusecontext"] = false; |
231 | responsedata["int_lod"] = 1; | ||
214 | return responsedata; | 232 | return responsedata; |
215 | } | 233 | } |
216 | } | 234 | } |
@@ -221,6 +239,7 @@ namespace OpenSim.Capabilities.Handlers | |||
221 | responsedata["keepalive"] = false; | 239 | responsedata["keepalive"] = false; |
222 | responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!"; | 240 | responsedata["str_response_string"] = "Your Mesh wasn't found. Sorry!"; |
223 | responsedata["reusecontext"] = false; | 241 | responsedata["reusecontext"] = false; |
242 | responsedata["int_lod"] = 0; | ||
224 | return responsedata; | 243 | return responsedata; |
225 | } | 244 | } |
226 | } | 245 | } |