aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs')
-rw-r--r--OpenSim/Capabilities/Handlers/GetMesh/GetMeshHandler.cs21
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 }