aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llmath/llvolume.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llmath/llvolume.cpp32
1 files changed, 29 insertions, 3 deletions
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp
index d87bae3..5603a9c 100644
--- a/linden/indra/llmath/llvolume.cpp
+++ b/linden/indra/llmath/llvolume.cpp
@@ -3,7 +3,7 @@
3 * 3 *
4 * $LicenseInfo:firstyear=2002&license=viewergpl$ 4 * $LicenseInfo:firstyear=2002&license=viewergpl$
5 * 5 *
6 * Copyright (c) 2002-2008, Linden Research, Inc. 6 * Copyright (c) 2002-2009, Linden Research, Inc.
7 * 7 *
8 * Second Life Viewer Source Code 8 * Second Life Viewer Source Code
9 * The source code in this file ("Source Code") is provided by Linden Lab 9 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -1650,9 +1650,13 @@ void LLPathParams::copyParams(const LLPathParams &params)
1650 setSkew(params.getSkew()); 1650 setSkew(params.getSkew());
1651} 1651}
1652 1652
1653S32 profile_delete_lock = 1 ;
1653LLProfile::~LLProfile() 1654LLProfile::~LLProfile()
1654{ 1655{
1655 1656 if(profile_delete_lock)
1657 {
1658 llerrs << "LLProfile should not be deleted here!" << llendl ;
1659 }
1656} 1660}
1657 1661
1658 1662
@@ -1709,7 +1713,11 @@ LLVolume::~LLVolume()
1709{ 1713{
1710 sNumMeshPoints -= mMesh.size(); 1714 sNumMeshPoints -= mMesh.size();
1711 delete mPathp; 1715 delete mPathp;
1716
1717 profile_delete_lock = 0 ;
1712 delete mProfilep; 1718 delete mProfilep;
1719 profile_delete_lock = 1 ;
1720
1713 mPathp = NULL; 1721 mPathp = NULL;
1714 mProfilep = NULL; 1722 mProfilep = NULL;
1715 mVolumeFaces.clear(); 1723 mVolumeFaces.clear();
@@ -1754,6 +1762,20 @@ BOOL LLVolume::generate()
1754 mLODScaleBias.setVec(0.6f, 0.6f, 0.6f); 1762 mLODScaleBias.setVec(0.6f, 0.6f, 0.6f);
1755 } 1763 }
1756 1764
1765 //********************************************************************
1766 //debug info, to be removed
1767 if((U32)(mPathp->mPath.size() * mProfilep->mProfile.size()) > (1u << 20))
1768 {
1769 llinfos << "sizeS: " << mPathp->mPath.size() << " sizeT: " << mProfilep->mProfile.size() << llendl ;
1770 llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ;
1771 llinfos << mParams << llendl ;
1772 llinfos << "more info to check if mProfilep is deleted or not." << llendl ;
1773 llinfos << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << llendl ;
1774
1775 llerrs << "LLVolume corrupted!" << llendl ;
1776 }
1777 //********************************************************************
1778
1757 BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split); 1779 BOOL regenPath = mPathp->generate(mParams.getPathParams(), path_detail, split);
1758 BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split); 1780 BOOL regenProf = mProfilep->generate(mParams.getProfileParams(), mPathp->isOpen(),profile_detail, split);
1759 1781
@@ -1762,16 +1784,20 @@ BOOL LLVolume::generate()
1762 S32 sizeS = mPathp->mPath.size(); 1784 S32 sizeS = mPathp->mPath.size();
1763 S32 sizeT = mProfilep->mProfile.size(); 1785 S32 sizeT = mProfilep->mProfile.size();
1764 1786
1765 //debug info 1787 //********************************************************************
1788 //debug info, to be removed
1766 if((U32)(sizeS * sizeT) > (1u << 20)) 1789 if((U32)(sizeS * sizeT) > (1u << 20))
1767 { 1790 {
1768 llinfos << "regenPath: " << (S32)regenPath << " regenProf: " << (S32)regenProf << llendl ; 1791 llinfos << "regenPath: " << (S32)regenPath << " regenProf: " << (S32)regenProf << llendl ;
1769 llinfos << "sizeS: " << sizeS << " sizeT: " << sizeT << llendl ; 1792 llinfos << "sizeS: " << sizeS << " sizeT: " << sizeT << llendl ;
1770 llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ; 1793 llinfos << "path_detail : " << path_detail << " split: " << split << " profile_detail: " << profile_detail << llendl ;
1771 llinfos << mParams << llendl ; 1794 llinfos << mParams << llendl ;
1795 llinfos << "more info to check if mProfilep is deleted or not." << llendl ;
1796 llinfos << mProfilep->mNormals.size() << " : " << mProfilep->mFaces.size() << " : " << mProfilep->mEdgeNormals.size() << " : " << mProfilep->mEdgeCenters.size() << llendl ;
1772 1797
1773 llerrs << "LLVolume corrupted!" << llendl ; 1798 llerrs << "LLVolume corrupted!" << llendl ;
1774 } 1799 }
1800 //********************************************************************
1775 1801
1776 sNumMeshPoints -= mMesh.size(); 1802 sNumMeshPoints -= mMesh.size();
1777 mMesh.resize(sizeT * sizeS); 1803 mMesh.resize(sizeT * sizeS);