From 7137b234b4e99d8d19e83dfb5268674c72f46479 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Wed, 3 Oct 2012 19:33:28 +0100 Subject: introduce a ODEMeshWorker class, should be pure cosmetic changes for now --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 3c4f737..143648e 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -763,6 +763,11 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } + public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) + { + return null; + } + public void ReleaseMesh(IMesh imesh) { } public void ExpireReleaseMeshs() { } } -- cgit v1.1 From 4a87a8f3b949d299ca83c99d8f0fda8597187c23 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 Oct 2012 06:11:51 +0100 Subject: comment out a spam coment on core Meshmerizer --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 30 ++++----------------------- 1 file changed, 4 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 3c4f737..236adb0 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -74,8 +74,6 @@ namespace OpenSim.Region.Physics.Meshing #endif private bool cacheSculptMaps = true; - private bool cacheSculptAlphaMaps = true; - private string decodedSculptMapPath = null; private bool useMeshiesPhysicsMesh = false; @@ -89,16 +87,7 @@ namespace OpenSim.Region.Physics.Meshing IConfig mesh_config = config.Configs["Mesh"]; decodedSculptMapPath = start_config.GetString("DecodedSculptMapPath","j2kDecodeCache"); - cacheSculptMaps = start_config.GetBoolean("CacheSculptMaps", cacheSculptMaps); - - if (Environment.OSVersion.Platform == PlatformID.Unix) - { - cacheSculptAlphaMaps = false; - } - else - cacheSculptAlphaMaps = cacheSculptMaps; - if(mesh_config != null) useMeshiesPhysicsMesh = mesh_config.GetBoolean("UseMeshiesPhysicsMesh", useMeshiesPhysicsMesh); @@ -279,18 +268,15 @@ namespace OpenSim.Region.Physics.Meshing { if (!GenerateCoordsAndFacesFromPrimSculptData(primName, primShape, size, lod, out coords, out faces)) return null; - // Remove the reference to any JPEG2000 sculpt data so it can be GCed - // don't loose it - // primShape.SculptData = Utils.EmptyBytes; } -// primShape.SculptDataLoaded = true; } else { if (!GenerateCoordsAndFacesFromPrimShapeData(primName, primShape, size, lod, out coords, out faces)) return null; } - // keep compatible + + // Remove the reference to any JPEG2000 sculpt data so it can be GCed primShape.SculptData = Utils.EmptyBytes; int numCoords = coords.Count; @@ -335,7 +321,7 @@ namespace OpenSim.Region.Physics.Meshing if (primShape.SculptData.Length <= 0) { - m_log.InfoFormat("[MESH]: asset data for {0} is zero length", primName); +// m_log.ErrorFormat("[MESH]: asset data for {0} is zero length", primName); return false; } @@ -496,8 +482,7 @@ namespace OpenSim.Region.Physics.Meshing //idata = CSJ2K.J2kImage.FromBytes(primShape.SculptData); - if (cacheSculptMaps && (cacheSculptAlphaMaps || (((ImageFlags)(idata.Flags) & ImageFlags.HasAlpha) ==0))) - // don't cache images with alpha channel in linux since mono can't load them correctly) + if (cacheSculptMaps) { try { idata.Save(decodedSculptFileName, ImageFormat.MemoryBmp); } catch (Exception e) { m_log.Error("[SCULPT]: unable to cache sculpt map " + decodedSculptFileName + " " + e.Message); } @@ -717,11 +702,6 @@ namespace OpenSim.Region.Physics.Meshing return CreateMesh(primName, primShape, size, lod, false); } - public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) - { - return CreateMesh(primName, primShape, size, lod, false); - } - public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) { #if SPAM @@ -763,7 +743,5 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } - public void ReleaseMesh(IMesh imesh) { } - public void ExpireReleaseMeshs() { } } } -- cgit v1.1 From c42df1259fa02aea21817749d65a4e468166c022 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 Oct 2012 06:16:47 +0100 Subject: fix wrong file commited --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 7a3f343..236adb0 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -743,15 +743,5 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } -<<<<<<< HEAD - public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) - { - return null; - } - - public void ReleaseMesh(IMesh imesh) { } - public void ExpireReleaseMeshs() { } -======= ->>>>>>> avination } } -- cgit v1.1 From a0b4e68060b51deba6262b0c81873ce734cb0089 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sun, 7 Oct 2012 06:33:13 +0100 Subject: refix so we can compile it, loosing alpha scultps fix on core meshmerizer --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index 236adb0..b462713 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -702,6 +702,10 @@ namespace OpenSim.Region.Physics.Meshing return CreateMesh(primName, primShape, size, lod, false); } + public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) + { + return CreateMesh(primName, primShape, size, lod, false); + } public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) { #if SPAM @@ -743,5 +747,12 @@ namespace OpenSim.Region.Physics.Meshing return mesh; } + public IMesh GetMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) + { + return null; + } + + public void ReleaseMesh(IMesh imesh) { } + public void ExpireReleaseMeshs() { } } } -- cgit v1.1 From 87175412882e8e4b7cd9d92d6a9be8546ec7e9e9 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 9 Oct 2012 04:31:50 +0100 Subject: force allocation of mesh data on creation ( messy code version ) --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index b462713..fd4ac7f 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -702,10 +702,11 @@ namespace OpenSim.Region.Physics.Meshing return CreateMesh(primName, primShape, size, lod, false); } - public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex) + public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical, bool convex, bool forOde) { return CreateMesh(primName, primShape, size, lod, false); } + public IMesh CreateMesh(String primName, PrimitiveBaseShape primShape, Vector3 size, float lod, bool isPhysical) { #if SPAM -- cgit v1.1 From 5986b4ee3980d27d6e8524c4b8f5ad4c9a701288 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Sat, 13 Oct 2012 22:30:34 +0100 Subject: add mesh cache expire on region startup. Expires will be relative to previus expire (assumed done only once at startup). File 'cntr' on cache folder stores time. Deleting it will force a skip on expire. Default time is 48hours before previus startup to account for failed ones etc. --- OpenSim/Region/Physics/Meshing/Meshmerizer.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/Physics/Meshing/Meshmerizer.cs') diff --git a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs index fd4ac7f..f629c4d 100644 --- a/OpenSim/Region/Physics/Meshing/Meshmerizer.cs +++ b/OpenSim/Region/Physics/Meshing/Meshmerizer.cs @@ -755,5 +755,6 @@ namespace OpenSim.Region.Physics.Meshing public void ReleaseMesh(IMesh imesh) { } public void ExpireReleaseMeshs() { } + public void ExpireFileCache() { } } } -- cgit v1.1