aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Meshing/SculptMesh.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics/Meshing/SculptMesh.cs')
-rw-r--r--OpenSim/Region/Physics/Meshing/SculptMesh.cs9
1 files changed, 8 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/Meshing/SculptMesh.cs b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
index 924c4d3..1c4db15 100644
--- a/OpenSim/Region/Physics/Meshing/SculptMesh.cs
+++ b/OpenSim/Region/Physics/Meshing/SculptMesh.cs
@@ -48,8 +48,11 @@ namespace OpenSim.Region.Physics.Meshing
48 private int lod = 32; 48 private int lod = 32;
49 private const float RANGE = 128.0f; 49 private const float RANGE = 128.0f;
50 50
51 public SculptMesh(byte[] jpegData) 51 public SculptMesh(byte[] jpegData, float _lod)
52 { 52 {
53 if (_lod == 2f || _lod == 4f || _lod == 8f || _lod == 16f || _lod == 32f || _lod == 64f)
54 lod = (int)_lod;
55
53 idata = OpenJPEG.DecodeToImage(jpegData); 56 idata = OpenJPEG.DecodeToImage(jpegData);
54 if (idata != null) 57 if (idata != null)
55 { 58 {
@@ -61,6 +64,10 @@ namespace OpenSim.Region.Physics.Meshing
61 LoadPoles(); 64 LoadPoles();
62 65
63 processSculptTexture(); 66 processSculptTexture();
67
68 bLOD.Dispose();
69 bBitmap.Dispose();
70 idata.Dispose();
64 } 71 }
65 } 72 }
66 73