diff options
Diffstat (limited to 'indra')
38 files changed, 139 insertions, 340 deletions
| diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 24528a8ce9..1f15d5465c 100755 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -96,6 +96,15 @@ const S32 SCULPT_MIN_AREA_DETAIL = 1;  extern BOOL gDebugGL; +void assert_aligned(void* ptr, U32 alignment) +{ +	U32 t = (U32) ptr; +	if (t%alignment != 0) +	{ +		llerrs << "WTF?" << llendl; +	} +} +  BOOL check_same_clock_dir( const LLVector3& pt1, const LLVector3& pt2, const LLVector3& pt3, const LLVector3& norm)  {      	LLVector3 test = (pt2-pt1)%(pt3-pt2); @@ -1990,7 +1999,7 @@ void LLVolumeFace::VertexData::init()  {  	if (!mData)  	{ -		mData = new LLVector4a[2]; +		mData = (LLVector4a*) malloc(sizeof(LLVector4a)*2);  	}  } @@ -2011,7 +2020,7 @@ const LLVolumeFace::VertexData& LLVolumeFace::VertexData::operator=(const LLVolu  	if (this != &rhs)  	{  		init(); -		LLVector4a::memcpyNonAliased16((F32*) mData, (F32*) rhs.mData, 8*sizeof(F32)); +		LLVector4a::memcpyNonAliased16((F32*) mData, (F32*) rhs.mData, 2*sizeof(LLVector4a));  		mTexCoord = rhs.mTexCoord;  	}  	return *this; @@ -2019,7 +2028,8 @@ const LLVolumeFace::VertexData& LLVolumeFace::VertexData::operator=(const LLVolu  LLVolumeFace::VertexData::~VertexData()  { -	delete [] mData; +	free(mData); +	mData = NULL;  }  LLVector4a& LLVolumeFace::VertexData::getPosition() @@ -2578,14 +2588,12 @@ void LLVolume::copyVolumeFaces(const LLVolume* volume)  S32	LLVolume::getNumFaces() const  { -#if LL_MESH_ENABLED  	U8 sculpt_type = (mParams.getSculptType() & LL_SCULPT_TYPE_MASK);  	if (sculpt_type == LL_SCULPT_TYPE_MESH)  	{  		return LL_SCULPT_MESH_MAX_FACES;  	} -#endif  	return (S32)mProfilep->mFaces.size();  } @@ -4166,12 +4174,10 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,  	normals.clear();  	segments.clear(); -#if LL_MESH_ENABLED  	if ((mParams.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)  	{  		return;  	} -#endif  	S32 cur_index = 0;  	//for each face @@ -5230,7 +5236,7 @@ LLVolumeFace::LLVolumeFace() :  	mWeights(NULL),  	mOctree(NULL)  { -	mExtents = new LLVector4a[3]; +	mExtents = (LLVector4a*) malloc(sizeof(LLVector4a)*3);  	mCenter = mExtents+2;  } @@ -5251,7 +5257,7 @@ LLVolumeFace::LLVolumeFace(const LLVolumeFace& src)  	mWeights(NULL),  	mOctree(NULL)  {  -	mExtents = new LLVector4a[3]; +	mExtents = (LLVector4a*) malloc(sizeof(LLVector4a)*3);  	mCenter = mExtents+2;  	*this = src;  } @@ -5279,7 +5285,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)  	freeData(); -	LLVector4a::memcpyNonAliased16((F32*) mExtents, (F32*) src.mExtents, 12*sizeof(F32)); +	LLVector4a::memcpyNonAliased16((F32*) mExtents, (F32*) src.mExtents, 3*sizeof(LLVector4a));  	resizeVertices(src.mNumVertices);  	resizeIndices(src.mNumIndices); @@ -5287,7 +5293,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)  	if (mNumVertices)  	{  		S32 vert_size = mNumVertices*sizeof(LLVector4a); -		S32 tc_size = (mNumVertices*8+0xF) & ~0xF; +		S32 tc_size = (mNumVertices*sizeof(LLVector2)+0xF) & ~0xF;  		LLVector4a::memcpyNonAliased16((F32*) mPositions, (F32*) src.mPositions, vert_size);  		LLVector4a::memcpyNonAliased16((F32*) mNormals, (F32*) src.mNormals, vert_size); @@ -5301,7 +5307,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)  		}  		else  		{ -			delete [] mBinormals; +			free(mBinormals);  			mBinormals = NULL;  		} @@ -5312,14 +5318,14 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)  		}  		else  		{ -			delete [] mWeights; +			free(mWeights);  			mWeights = NULL;  		}  	}  	if (mNumIndices)  	{ -		S32 idx_size = (mNumIndices*2+0xF) & ~0xF; +		S32 idx_size = (mNumIndices*sizeof(U16)+0xF) & ~0xF;  		LLVector4a::memcpyNonAliased16((F32*) mIndices, (F32*) src.mIndices, idx_size);  	} @@ -5330,7 +5336,7 @@ LLVolumeFace& LLVolumeFace::operator=(const LLVolumeFace& src)  LLVolumeFace::~LLVolumeFace()  { -	delete [] mExtents; +	free(mExtents);  	mExtents = NULL;  	freeData(); @@ -5338,17 +5344,17 @@ LLVolumeFace::~LLVolumeFace()  void LLVolumeFace::freeData()  { -	delete [] mPositions; +	free(mPositions);  	mPositions = NULL; -	delete []  mNormals; +	free( mNormals);  	mNormals = NULL; -	delete [] mTexCoords; +	free(mTexCoords);  	mTexCoords = NULL; -	delete [] mIndices; +	free(mIndices);  	mIndices = NULL; -	delete [] mBinormals; +	free(mBinormals);  	mBinormals = NULL; -	delete [] mWeights; +	free(mWeights);  	mWeights = NULL;  	delete mOctree; @@ -5402,13 +5408,14 @@ bool LLVolumeFace::VertexMapData::ComparePosition::operator()(const LLVector3& a  		return a.mV[1] < b.mV[1];  	} -	return a.mV[2] < b.mV[2];			 +	return a.mV[2] < b.mV[2];  }  void LLVolumeFace::optimize(F32 angle_cutoff)  {  	LLVolumeFace new_face; +	//map of points to vector of vertices at that point  	VertexMapData::PointMap point_map;  	//remove redundant vertices @@ -6161,21 +6168,24 @@ void LLVolumeFace::createBinormals()  void LLVolumeFace::resizeVertices(S32 num_verts)  { -	delete [] mPositions; -	delete [] mNormals; -	delete [] mBinormals; -	delete [] mTexCoords; +	free(mPositions); +	free(mNormals); +	free(mBinormals); +	free(mTexCoords);  	mBinormals = NULL;  	if (num_verts)  	{ -		mPositions = new LLVector4a[num_verts];  -		mNormals = new LLVector4a[num_verts];  +		mPositions = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); +		assert_aligned(mPositions, 16); +		mNormals = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts); +		assert_aligned(mNormals, 16);  		//pad texture coordinate block end to allow for QWORD reads -		S32 size = ((num_verts*8) + 0xF) & ~0xF; -		mTexCoords = new LLVector2[size/8]; +		S32 size = ((num_verts*sizeof(LLVector2)) + 0xF) & ~0xF; +		mTexCoords = (LLVector2*) malloc(size); +		assert_aligned(mTexCoords, 16);  	}  	else  	{ @@ -6196,42 +6206,21 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con  {  	S32 new_verts = mNumVertices+1;  	S32 new_size = new_verts*16; -	S32 old_size = mNumVertices*16; +//	S32 old_size = mNumVertices*16;  	//positions -	LLVector4a* dst = new LLVector4a[new_verts]; -	if (mPositions) -	{ -		LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mPositions, old_size); -		delete [] mPositions; -	} -	mPositions = dst; - +	mPositions = (LLVector4a*) realloc(mPositions, new_size); +	  	//normals -	dst = new LLVector4a[new_verts];  -	if (mNormals) -	{ -		LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mNormals, old_size); -		delete [] mNormals; -	} -	mNormals = dst; - +	mNormals = (LLVector4a*) realloc(mNormals, new_size); +	  	//tex coords  	new_size = ((new_verts*8)+0xF) & ~0xF; -	old_size = ((mNumVertices*8)+0xF) & ~0xF; - -	{ -		LLVector2* dst = new LLVector2[new_size/8];  -		if (mTexCoords) -		{ -			LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mTexCoords, old_size); -			delete [] mTexCoords; -		} -		mTexCoords = dst; -	} +	mTexCoords = (LLVector2*) realloc(mTexCoords, new_size); +	  	//just clear binormals -	delete [] mBinormals; +	free(mBinormals);  	mBinormals = NULL;  	mPositions[mNumVertices] = pos; @@ -6243,26 +6232,26 @@ void LLVolumeFace::pushVertex(const LLVector4a& pos, const LLVector4a& norm, con  void LLVolumeFace::allocateBinormals(S32 num_verts)  { -	delete [] mBinormals; -	mBinormals = new LLVector4a[num_verts];  +	free(mBinormals); +	mBinormals = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts);  }  void LLVolumeFace::allocateWeights(S32 num_verts)  { -	delete [] mWeights;  -	mWeights = new LLVector4a[num_verts];  +	free(mWeights); +	mWeights = (LLVector4a*) malloc(sizeof(LLVector4a)*num_verts);  }  void LLVolumeFace::resizeIndices(S32 num_indices)  { -	delete [] mIndices; +	free(mIndices);  	if (num_indices)  	{  		//pad index block end to allow for QWORD reads -		S32 size = ((num_indices*2) + 0xF) & ~0xF; +		S32 size = ((num_indices*sizeof(U16)) + 0xF) & ~0xF; -		mIndices = new U16[size/2]; +		mIndices = (U16*) malloc(size);  	}  	else  	{ @@ -6280,13 +6269,7 @@ void LLVolumeFace::pushIndex(const U16& idx)  	S32 old_size = ((mNumIndices*2)+0xF) & ~0xF;  	if (new_size != old_size)  	{ -		U16* dst = new U16[new_size/2]; -		if (mIndices) -		{ -			LLVector4a::memcpyNonAliased16((F32*) dst, (F32*) mIndices, old_size); -			delete [] mIndices; -		} -		mIndices = dst; +		mIndices = (U16*) realloc(mIndices, new_size);  	}  	mIndices[mNumIndices++] = idx; @@ -6327,28 +6310,13 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat  	}  	//allocate new buffer space -	LLVector4a* new_pos = new LLVector4a[new_count]; -	LLVector4a* new_norm = new LLVector4a[new_count]; -	LLVector2* new_tc = new LLVector2[((new_count*8+0xF) & ~0xF)/8]; +	mPositions = (LLVector4a*) realloc(mPositions, new_count*sizeof(LLVector4a)); +	assert_aligned(mPositions, 16); +	mNormals = (LLVector4a*) realloc(mNormals, new_count*sizeof(LLVector4a)); +	assert_aligned(mNormals, 16); +	mTexCoords = (LLVector2*) realloc(mTexCoords, (new_count*sizeof(LLVector2)+0xF) & ~0xF); +	assert_aligned(mTexCoords, 16); - -	if (mNumVertices > 0) -	{ //copy old buffers -		LLVector4a::memcpyNonAliased16((F32*) new_pos, (F32*) mPositions, mNumVertices*4*sizeof(F32)); -		LLVector4a::memcpyNonAliased16((F32*) new_norm, (F32*) mNormals, mNumVertices*4*sizeof(F32)); -		LLVector4a::memcpyNonAliased16((F32*) new_tc, (F32*) mTexCoords, mNumVertices*2*sizeof(F32)); -	} - -	//free old buffer space -	delete [] mPositions; -	delete [] mNormals; -	delete [] mTexCoords; -	 -	//point to new buffers -	mPositions = new_pos; -	mNormals = new_norm; -	mTexCoords = new_tc; -  	mNumVertices = new_count;  	//get destination address of appended face @@ -6393,19 +6361,8 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat  	new_count = mNumIndices + face.mNumIndices;  	//allocate new index buffer -	U16* new_indices = new U16[((new_count*2+0xF) & ~0xF)/2]; -	if (mNumIndices > 0) -	{ //copy old index buffer -		S32 old_size = (mNumIndices*2+0xF) & ~0xF; -		LLVector4a::memcpyNonAliased16((F32*) new_indices, (F32*) mIndices, old_size); -	} - -	//free old index buffer -	delete [] mIndices; +	mIndices = (U16*) realloc(mIndices, (new_count*sizeof(U16)+0xF) & ~0xF); -	//point to new index buffer -	mIndices = new_indices; -  	//get destination address into new index buffer  	U16* dst_idx = mIndices+mNumIndices;  	mNumIndices = new_count; @@ -6447,14 +6404,10 @@ BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)  		resizeVertices(num_vertices);  		resizeIndices(num_indices); -#if LL_MESH_ENABLED  		if ((volume->getParams().getSculptType() & LL_SCULPT_TYPE_MASK) != LL_SCULPT_TYPE_MESH)  		{  			mEdge.resize(num_indices);  		} -#else -		mEdge.resize(num_indices); -#endif  	}  	LLVector4a* pos = (LLVector4a*) mPositions; diff --git a/indra/llmath/llvolume.h b/indra/llmath/llvolume.h index 32364bd4b8..b4b59fd402 100755 --- a/indra/llmath/llvolume.h +++ b/indra/llmath/llvolume.h @@ -41,8 +41,6 @@ class LLVolumeParams;  class LLProfile;  class LLPath; -#define LL_MESH_ENABLED 1 -  template <class T> class LLOctreeNode;  class LLVector4a; @@ -192,15 +190,9 @@ const U8 LL_SCULPT_TYPE_SPHERE    = 1;  const U8 LL_SCULPT_TYPE_TORUS     = 2;  const U8 LL_SCULPT_TYPE_PLANE     = 3;  const U8 LL_SCULPT_TYPE_CYLINDER  = 4; -#if LL_MESH_ENABLED  const U8 LL_SCULPT_TYPE_MESH      = 5; -  const U8 LL_SCULPT_TYPE_MASK      = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE |  	LL_SCULPT_TYPE_CYLINDER | LL_SCULPT_TYPE_MESH; -#else -const U8 LL_SCULPT_TYPE_MASK      = LL_SCULPT_TYPE_SPHERE | LL_SCULPT_TYPE_TORUS | LL_SCULPT_TYPE_PLANE | -	LL_SCULPT_TYPE_CYLINDER; -#endif  const U8 LL_SCULPT_FLAG_INVERT    = 64;  const U8 LL_SCULPT_FLAG_MIRROR    = 128; diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index e4b7cd80ce..349c844470 100755 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -41,7 +41,6 @@  #include "dom/domMesh.h"  #include "zlib/zlib.h" -#if LL_MESH_ENABLED  std::string model_names[] =  { @@ -120,7 +119,7 @@ void load_face_from_dom_inputs(LLVolumeFace& face, const domInputLocalOffset_Arr  			{  				LLVector4a* norm = (LLVector4a*) face.mNormals + (j-min_idx);  				norm->set(n[j*3+0], n[j*3+1], n[j*3+2]); -				norm->normalize3fast(); +				norm->normalize3();  			}  		}  		else if (strcmp(COMMON_PROFILE_INPUT_TEXCOORD, inputs[j]->getSemantic()) == 0) @@ -1041,6 +1040,12 @@ void LLModel::smoothNormals(F32 angle_cutoff)  	{  		LLVolumeFace& vol_face = mVolumeFaces[j]; +		if (vol_face.mNumIndices > 65535) +		{ +			llwarns << "Too many vertices for normal generation to work." << llendl; +			continue; +		} +  		//create faceted copy of current face with no texture coordinates (step 1)  		LLVolumeFace faceted; @@ -1048,16 +1053,16 @@ void LLModel::smoothNormals(F32 angle_cutoff)  		//LLVector4a* src_norm = (LLVector4a*) vol_face.mNormals; -		//bake out triangles into temporary face, clearing normals and texture coordinates +		faceted.resizeVertices(vol_face.mNumIndices); +		faceted.resizeIndices(vol_face.mNumIndices); +		//bake out triangles into temporary face, clearing texture coordinates  		for (U32 i = 0; i < vol_face.mNumIndices; ++i)  		{  			U32 idx = vol_face.mIndices[i]; -			LLVolumeFace::VertexData v; -			v.setPosition(src_pos[idx]);  -			v.getNormal().clear(); -			v.mTexCoord.clear(); -			faceted.pushVertex(v); -			faceted.pushIndex(i); +		 +			faceted.mPositions[i] = src_pos[idx]; +			faceted.mTexCoords[i] = LLVector2(0,0); +			faceted.mIndices[i] = i;  		}  		//generate normals for temporary face @@ -1080,7 +1085,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)  			rhs.setSub(p2, p0);  			n0.setCross3(lhs, rhs); -			n0.normalize3fast(); +			n0.normalize3();  			n1 = n0;  			n2 = n0;  		} @@ -1126,7 +1131,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)  		for (U32 i = 0; i < faceted.mNumVertices; ++i)  		{ -			faceted.mNormals[i].normalize3fast(); +			faceted.mNormals[i].normalize3();  			LLVolumeFace::VertexMapData v;  			v.setPosition(faceted.mPositions[i]); @@ -1139,16 +1144,17 @@ void LLModel::smoothNormals(F32 angle_cutoff)  		LLVolumeFace new_face;  		//bake out triangles into new face +		new_face.resizeIndices(vol_face.mNumIndices); +		new_face.resizeVertices(vol_face.mNumIndices); +		  		for (U32 i = 0; i < vol_face.mNumIndices; ++i)  		{  			U32 idx = vol_face.mIndices[i];  			LLVolumeFace::VertexData v; -			v.setPosition(vol_face.mPositions[idx]); -			v.setNormal(vol_face.mNormals[idx]); -			v.mTexCoord = vol_face.mTexCoords[idx]; - -			new_face.pushVertex(v); -			new_face.pushIndex(i); +			new_face.mPositions[i] = vol_face.mPositions[idx]; +			new_face.mNormals[i].clear(); +			new_face.mTexCoords[i] = vol_face.mTexCoords[idx]; +			new_face.mIndices[i] = i;  		}  		//generate normals for new face @@ -1171,7 +1177,7 @@ void LLModel::smoothNormals(F32 angle_cutoff)  			rhs.setSub(p2, p0);  			n0.setCross3(lhs, rhs); -			n0.normalize3fast(); +			n0.normalize3();  			n1 = n0;  			n2 = n0;  		} @@ -1703,5 +1709,4 @@ LLModel::weight_list& LLModel::getJointInfluences(const LLVector3& pos)  	}					  } -#endif diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index a91c80d5b7..ea703d7228 100755 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -36,8 +36,6 @@  #include "v4math.h"  #include "m4math.h" -#if LL_MESH_ENABLED -  class daeElement;  class domMesh; @@ -173,7 +171,4 @@ protected:  	virtual BOOL createVolumeFacesFromDomMesh(domMesh *mesh);  }; - -#endif -  #endif //LL_LLMODEL_H diff --git a/indra/llrender/llvertexbuffer.cpp b/indra/llrender/llvertexbuffer.cpp index 71620feed3..66beb5f003 100755 --- a/indra/llrender/llvertexbuffer.cpp +++ b/indra/llrender/llvertexbuffer.cpp @@ -603,7 +603,7 @@ void LLVertexBuffer::createGLBuffer()  	{  		static int gl_buffer_idx = 0;  		mGLBuffer = ++gl_buffer_idx; -		mMappedData = (U8*) ll_aligned_malloc_16(size); +		mMappedData = (U8*) malloc(size);  	}  } @@ -637,7 +637,7 @@ void LLVertexBuffer::createGLIndices()  	}  	else  	{ -		mMappedIndexData = (U8*) ll_aligned_malloc_16(size); +		mMappedIndexData = (U8*) malloc(size);  		static int gl_buffer_idx = 0;  		mGLIndices = ++gl_buffer_idx;  	} @@ -658,7 +658,7 @@ void LLVertexBuffer::destroyGLBuffer()  		}  		else  		{ -			ll_aligned_free_16(mMappedData); +			free(mMappedData);  			mMappedData = NULL;  			mEmpty = TRUE;  		} @@ -685,7 +685,7 @@ void LLVertexBuffer::destroyGLIndices()  		}  		else  		{ -			ll_aligned_free_16(mMappedIndexData); +			free(mMappedIndexData);  			mMappedIndexData = NULL;  			mEmpty = TRUE;  		} @@ -818,8 +818,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)  			{  				if (!useVBOs())  				{ -					ll_aligned_free_16(mMappedData); -					mMappedData = (U8*) ll_aligned_malloc_16(newsize); +					free(mMappedData); +					mMappedData = (U8*) malloc(newsize);  				}  				mResized = TRUE;  			} @@ -839,8 +839,8 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)  			{  				if (!useVBOs())  				{ -					ll_aligned_free_16(mMappedIndexData); -					mMappedIndexData = (U8*) ll_aligned_malloc_16(new_index_size); +					free(mMappedIndexData); +					mMappedIndexData = (U8*) malloc(new_index_size);  				}  				mResized = TRUE;  			} diff --git a/indra/llvfs/llvfs.cpp b/indra/llvfs/llvfs.cpp index 2b01288fd7..ddb76fb2ba 100755 --- a/indra/llvfs/llvfs.cpp +++ b/indra/llvfs/llvfs.cpp @@ -2041,11 +2041,9 @@ std::string get_extension(LLAssetType::EType type)  	case LLAssetType::AT_ANIMATION:  		extension = ".lla";  		break; -#if LL_MESH_ENABLED  	case LLAssetType::AT_MESH:  		extension = ".slm";  		break; -#endif  	default:  		// Just use the asset server filename extension in most cases  		extension += "."; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index f140547497..c07d891800 100755 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -1360,10 +1360,8 @@ bool LLAppViewer::cleanup()  	llinfos << "Cleaning Up" << llendflush; -#if LL_MESH_ENABLED  	// shut down mesh streamer  	gMeshRepo.shutdown(); -#endif  	// Must clean up texture references before viewer window is destroyed.  	LLHUDManager::getInstance()->updateEffects(); @@ -1761,10 +1759,8 @@ bool LLAppViewer::initThreads()  		mFastTimerLogThread->start();  	} -#if LL_MESH_ENABLED  	// Mesh streaming and caching  	gMeshRepo.init(); -#endif  	LLFilePickerThread::initClass(); diff --git a/indra/newview/llassetuploadresponders.cpp b/indra/newview/llassetuploadresponders.cpp index afb76735ec..d44fb84f14 100755 --- a/indra/newview/llassetuploadresponders.cpp +++ b/indra/newview/llassetuploadresponders.cpp @@ -305,7 +305,6 @@ void LLAssetUploadResponder::uploadComplete(const LLSD& content)  {  } -#if LL_MESH_ENABLED  LLNewAgentInventoryResponder::LLNewAgentInventoryResponder(  	const LLSD& post_data,  	const LLUUID& vfile_id, @@ -427,7 +426,6 @@ void LLNewAgentInventoryResponder::uploadComplete(const LLSD& content)  	LLImportColladaAssetCache::getInstance()->assetUploaded(mVFileID, content["new_asset"], TRUE);  } -#endif  LLSendTexLayerResponder::LLSendTexLayerResponder(const LLSD& post_data,  												 const LLUUID& vfile_id, @@ -677,7 +675,6 @@ void LLUpdateTaskInventoryResponder::uploadComplete(const LLSD& content)  } -#if LL_MESH_ENABLED  /////////////////////////////////////////////////////  // LLNewAgentInventoryVariablePriceResponder::Impl //  ///////////////////////////////////////////////////// @@ -1145,5 +1142,5 @@ void LLNewAgentInventoryVariablePriceResponder::showConfirmationDialog(  				boost::intrusive_ptr<LLNewAgentInventoryVariablePriceResponder>(this)));  	}  } -#endif + diff --git a/indra/newview/llassetuploadresponders.h b/indra/newview/llassetuploadresponders.h index a85e84e9f8..268220d4a6 100755 --- a/indra/newview/llassetuploadresponders.h +++ b/indra/newview/llassetuploadresponders.h @@ -34,7 +34,6 @@  #define LL_LLASSETUPLOADRESPONDER_H  #include "llhttpclient.h" -#include "llvolume.h" //for LL_MESH_ENABLED  // Abstract class for supporting asset upload  // via capabilities @@ -62,7 +61,6 @@ protected:  	std::string mFileName;  }; -#if LL_MESH_ENABLED  // TODO*: Remove this once deprecated  class LLNewAgentInventoryResponder : public LLAssetUploadResponder  { @@ -116,7 +114,6 @@ private:  	class Impl;  	Impl* mImpl;  }; -#endif  struct LLBakedUploadData;  class LLSendTexLayerResponder : public LLAssetUploadResponder diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 5cf6082f12..e09e40671d 100755 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -105,7 +105,6 @@ S32 normal_channel = -1;  S32 specular_channel = -1;  S32 cube_channel = -1; -#if LL_MESH_ENABLED  static const U32 rigged_data_mask[] = {  	LLDrawPoolAvatar::RIGGED_SIMPLE_MASK,  	LLDrawPoolAvatar::RIGGED_FULLBRIGHT_MASK, @@ -117,7 +116,6 @@ static const U32 rigged_data_mask[] = {  	LLDrawPoolAvatar::RIGGED_DEFERRED_BUMP_MASK,						   	LLDrawPoolAvatar::RIGGED_DEFERRED_SIMPLE_MASK,  }; -#endif  static LLFastTimer::DeclareTimer FTM_SHADOW_AVATAR("Avatar Shadow"); @@ -198,14 +196,12 @@ void LLDrawPoolAvatar::beginDeferredPass(S32 pass)  	case 2:  		beginDeferredSkinned();  		break; -#if LL_MESH_ENABLED  	case 3:  		beginDeferredRiggedSimple();  		break;  	case 4:  		beginDeferredRiggedBump();  		break; -#endif  	}  } @@ -232,14 +228,12 @@ void LLDrawPoolAvatar::endDeferredPass(S32 pass)  	case 2:  		endDeferredSkinned();  		break; -#if LL_MESH_ENABLED  	case 3:  		endDeferredRiggedSimple();  		break;  	case 4:  		endDeferredRiggedBump();  		break; -#endif  	}  } @@ -250,11 +244,7 @@ void LLDrawPoolAvatar::renderDeferred(S32 pass)  S32 LLDrawPoolAvatar::getNumPostDeferredPasses()  { -#if LL_MESH_ENABLED  	return 6; -#else -	return 1; -#endif  }  void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass) @@ -264,7 +254,6 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)  	case 0:  		beginPostDeferredAlpha();  		break; -#if LL_MESH_ENABLED  	case 1:  		beginRiggedFullbright();  		break; @@ -280,7 +269,6 @@ void LLDrawPoolAvatar::beginPostDeferredPass(S32 pass)  	case 5:  		beginRiggedGlow();  		break; -#endif  	}  } @@ -298,7 +286,6 @@ void LLDrawPoolAvatar::beginPostDeferredAlpha()  	enable_vertex_weighting(sVertexProgram->mAttribute[LLViewerShaderMgr::AVATAR_WEIGHT]);  } -#if LL_MESH_ENABLED  void LLDrawPoolAvatar::beginDeferredRiggedAlpha()  {  	sVertexProgram = &gDeferredSkinnedAlphaProgram; @@ -316,7 +303,6 @@ void LLDrawPoolAvatar::endDeferredRiggedAlpha()  	LLVertexBuffer::sWeight4Loc = -1;  	sVertexProgram = NULL;  } -#endif  void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)  { @@ -325,7 +311,6 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)  	case 0:  		endPostDeferredAlpha();  		break; -#if LL_MESH_ENABLED  	case 1:  		endRiggedFullbright();  		break; @@ -341,7 +326,6 @@ void LLDrawPoolAvatar::endPostDeferredPass(S32 pass)  	case 5:  		endRiggedGlow();  		break; -#endif  	}  } @@ -375,11 +359,7 @@ void LLDrawPoolAvatar::renderPostDeferred(S32 pass)  S32 LLDrawPoolAvatar::getNumShadowPasses()  { -#if LL_MESH_ENABLED  	return 2; -#else -	return 1; -#endif  }  void LLDrawPoolAvatar::beginShadowPass(S32 pass) @@ -470,7 +450,6 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)  		avatarp->renderSkinned(AVATAR_RENDER_PASS_SINGLE);  	} -#if LL_MESH_ENABLED  	else  	{  		renderRigged(avatarp, RIGGED_SIMPLE); @@ -480,12 +459,10 @@ void LLDrawPoolAvatar::renderShadow(S32 pass)  		renderRigged(avatarp, RIGGED_SHINY);  		renderRigged(avatarp, RIGGED_FULLBRIGHT_ALPHA);  	} -#endif  }  S32 LLDrawPoolAvatar::getNumPasses()  { -#if LL_MESH_ENABLED  	if (LLPipeline::sImpostorRender)  	{  		return 8; @@ -494,7 +471,6 @@ S32 LLDrawPoolAvatar::getNumPasses()  	{  		return 10;  	} -#else  	if (LLPipeline::sImpostorRender)  	{  		return 1; @@ -503,7 +479,6 @@ S32 LLDrawPoolAvatar::getNumPasses()  	{  		return 3;  	} -#endif  } @@ -554,7 +529,6 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)  	case 2:  		beginSkinned();  		break; -#if LL_MESH_ENABLED  	case 3:  		beginRiggedSimple();  		break; @@ -576,7 +550,6 @@ void LLDrawPoolAvatar::beginRenderPass(S32 pass)  	case 9:  		beginRiggedGlow();  		break; -#endif  	}  } @@ -600,7 +573,6 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)  	case 2:  		endSkinned();  		break; -#if LL_MESH_ENABLED  	case 3:  		endRiggedSimple();  		break; @@ -622,7 +594,6 @@ void LLDrawPoolAvatar::endRenderPass(S32 pass)  	case 9:  		endRiggedGlow();  		break; -#endif  	}  } @@ -808,7 +779,6 @@ void LLDrawPoolAvatar::endSkinned()  	gGL.getTexUnit(0)->activate();  } -#if LL_MESH_ENABLED  void LLDrawPoolAvatar::beginRiggedSimple()  {  	if (sShaderLevel > 0) @@ -1056,7 +1026,6 @@ void LLDrawPoolAvatar::endDeferredRiggedBump()  	sDiffuseChannel = 0;  	sVertexProgram = NULL;  } -#endif  void LLDrawPoolAvatar::beginDeferredSkinned()  { @@ -1202,7 +1171,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)  		return;  	} -#if LL_MESH_ENABLED  	if (pass == 3)  	{  		if (is_deferred_render) @@ -1284,7 +1252,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)  		gGL.setSceneBlendType(LLRender::BT_ALPHA);  		return;  	} -#endif  	if (sShaderLevel > 0)  	{ @@ -1322,7 +1289,6 @@ void LLDrawPoolAvatar::renderAvatars(LLVOAvatar* single_avatar, S32 pass)  	}  } -#if LL_MESH_ENABLED  void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace* face, const LLMeshSkinInfo* skin, LLVolume* volume, const LLVolumeFace& vol_face)  {  	LLVector4a* weight = vol_face.mWeights; @@ -1631,8 +1597,6 @@ void LLDrawPoolAvatar::renderRiggedGlow(LLVOAvatar* avatar)  {  	renderRigged(avatar, RIGGED_GLOW, true);  } -#endif -  //----------------------------------------------------------------------------- @@ -1733,7 +1697,6 @@ LLColor3 LLDrawPoolAvatar::getDebugColor() const  	return LLColor3(0.f, 1.f, 0.f);  } -#if LL_MESH_ENABLED  void LLDrawPoolAvatar::addRiggedFace(LLFace* facep, U32 type)  {  	if (facep->mRiggedIndex.empty()) @@ -1788,7 +1751,6 @@ void LLDrawPoolAvatar::removeRiggedFace(LLFace* facep)  		}  	}  } -#endif  LLVertexBufferAvatar::LLVertexBufferAvatar()  : LLVertexBuffer(sDataMask,  diff --git a/indra/newview/lldrawpoolavatar.h b/indra/newview/lldrawpoolavatar.h index d08ae04516..7d7f9319ed 100755 --- a/indra/newview/lldrawpoolavatar.h +++ b/indra/newview/lldrawpoolavatar.h @@ -34,7 +34,6 @@  #define LL_LLDRAWPOOLAVATAR_H  #include "lldrawpool.h" -#include "llvolume.h" // for LL_MESH_ENABLED  class LLVOAvatar;  class LLGLSLShader; @@ -113,7 +112,6 @@ public:  	void beginPostDeferredAlpha();  	void endPostDeferredAlpha(); -#if LL_MESH_ENABLED  	void beginRiggedSimple();  	void beginRiggedFullbright();  	void beginRiggedFullbrightShiny(); @@ -205,7 +203,6 @@ public:  	void removeRiggedFace(LLFace* facep);   	std::vector<LLFace*> mRiggedFace[NUM_RIGGED_PASSES]; -#endif  	/*virtual*/ LLViewerTexture *getDebugTexture();  	/*virtual*/ LLColor3 getDebugColor() const; // For AGP debug display diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 3fa60e9f1e..29edbc2b03 100755 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -212,13 +212,11 @@ void LLFace::destroy()  	if (mDrawPoolp)  	{ -#if LL_MESH_ENABLED  		if (this->isState(LLFace::RIGGED) && mDrawPoolp->getType() == LLDrawPool::POOL_AVATAR)  		{  			((LLDrawPoolAvatar*) mDrawPoolp)->removeRiggedFace(this);  		}  		else -#endif  		{  			mDrawPoolp->removeFace(this);  		} diff --git a/indra/newview/llfloaterimportcollada.cpp b/indra/newview/llfloaterimportcollada.cpp index 476c02cd46..000347f68c 100755 --- a/indra/newview/llfloaterimportcollada.cpp +++ b/indra/newview/llfloaterimportcollada.cpp @@ -74,8 +74,6 @@  // floater  // -#if LL_MESH_ENABLED -  LLFloaterImportCollada::LLFloaterImportCollada(const LLSD& key)  	: LLFloater(key)  { @@ -1113,4 +1111,3 @@ void LLImportCollada::onCommitCancel(LLUICtrl*, void*)  	getInstance()->endImport();  } -#endif diff --git a/indra/newview/llfloaterimportcollada.h b/indra/newview/llfloaterimportcollada.h index 818b19e403..4eb263901b 100755 --- a/indra/newview/llfloaterimportcollada.h +++ b/indra/newview/llfloaterimportcollada.h @@ -34,9 +34,6 @@  #define LL_LLFLOATERIMPORTCOLLADA_H  #include "llfloater.h" -#include "llvolume.h" //for LL_MESH_ENABLED - -#if LL_MESH_ENABLED  class LLFloaterImportCollada : public LLFloater  { @@ -138,6 +135,4 @@ private:  	LLMatrix4   mSceneTransformation;  }; -#endif -  #endif // LL_LLFLOATERIMPORTCOLLADA_H diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 3ef892f739..8be56009aa 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -98,9 +98,6 @@  #include "glod/glod.h" - -#if LL_MESH_ENABLED -  //static  S32 LLFloaterModelPreview::sUploadAmount = 10;  LLFloaterModelPreview* LLFloaterModelPreview::sInstance = NULL; @@ -1992,13 +1989,13 @@ void LLModelPreview::loadModel(std::string filename, S32 lod)  	if (lod == 3 && !mGroup.empty())  	{ -		for (std::map<LLModel*, U32>::iterator iter = mGroup.begin(); iter != mGroup.end(); ++iter) +		for (std::map<LLPointer<LLModel>, U32>::iterator iter = mGroup.begin(); iter != mGroup.end(); ++iter)  		{  			glodDeleteGroup(iter->second);  			stop_gloderror();  		} -		for (std::map<LLModel*, U32>::iterator iter = mObject.begin(); iter != mObject.end(); ++iter) +		for (std::map<LLPointer<LLModel>, U32>::iterator iter = mObject.begin(); iter != mObject.end(); ++iter)  		{  			glodDeleteObject(iter->second);  			stop_gloderror(); @@ -2058,6 +2055,11 @@ void LLModelPreview::loadModelCallback(S32 lod)  	mScene[lod] = mModelLoader->mScene;  	mVertexBuffer[lod].clear(); +	if (lod == LLModel::LOD_PHYSICS) +	{ +		mPhysicsMesh.clear(); +	} +  	setPreviewLOD(lod); @@ -2341,6 +2343,11 @@ void LLModelPreview::genLODs(S32 which_lod)  		return;  	} +	if (which_lod == LLModel::LOD_PHYSICS) +	{ //clear physics mesh map +		mPhysicsMesh.clear(); +	} +  	LLVertexBuffer::unbind();  	stop_gloderror(); @@ -2368,6 +2375,14 @@ void LLModelPreview::genLODs(S32 which_lod)  	U32 type_mask = LLVertexBuffer::MAP_VERTEX | LLVertexBuffer::MAP_NORMAL | LLVertexBuffer::MAP_TEXCOORD0; +	if (mGroup[mBaseModel[0]] == 0) +	{ //clear LOD maps +		mGroup.clear(); +		mObject.clear(); +		mPercentage.clear(); +		mPatch.clear(); +	} +  	for (LLModelLoader::model_list::iterator iter = mBaseModel.begin(); iter != mBaseModel.end(); ++iter)  	{ //build GLOD objects for each model in base model list  		LLModel* mdl = *iter; @@ -3121,7 +3136,7 @@ BOOL LLModelPreview::render()  						{  							LLMutexLock(decomp->mMutex); -							std::map<LLModel*, std::vector<LLPointer<LLVertexBuffer> > >::iterator iter =  +							std::map<LLPointer<LLModel>, std::vector<LLPointer<LLVertexBuffer> > >::iterator iter =   								mPhysicsMesh.find(model);  							if (iter != mPhysicsMesh.end())  							{ @@ -3409,7 +3424,7 @@ void LLFloaterModelPreview::onDecompose(void* user_data)  void LLFloaterModelPreview::onModelDecompositionComplete(LLModel* model, std::vector<LLPointer<LLVertexBuffer> >& physics_mesh)  {  	if (sInstance && sInstance->mModelPreview) -	{ +	{   		sInstance->mModelPreview->mPhysicsMesh[model] = physics_mesh;  		sInstance->mModelPreview->mDirty = true; @@ -3437,5 +3452,3 @@ void LLModelPreview::textureLoadedCallback( BOOL success, LLViewerFetchedTexture  	preview->refresh();  } -#endif - diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 97e681a6a8..d8f06295ac 100755 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -40,7 +40,6 @@  #include "llmodel.h"  #include "llthread.h" -#if LL_MESH_ENABLED  class LLComboBox;  class LLJoint;  class LLViewerJointMesh; @@ -169,12 +168,12 @@ class LLModelPreview : public LLViewerDynamicTexture, public LLMutex  	LLModelLoader::model_list mModel[LLModel::NUM_LODS];  	LLModelLoader::model_list mBaseModel; -	std::map<LLModel*, U32> mGroup; -	std::map<LLModel*, U32> mObject; -	std::map<LLModel*, std::vector<U32> > mPatch; +	std::map<LLPointer<LLModel>, U32> mGroup; +	std::map<LLPointer<LLModel>, U32> mObject; +	std::map<LLPointer<LLModel>, std::vector<U32> > mPatch; +	std::map<LLPointer<LLModel>, F32> mPercentage; -	std::map<LLModel*, F32> mPercentage; -	std::map<LLModel*, std::vector<LLPointer<LLVertexBuffer> > > mPhysicsMesh; +	std::map<LLPointer<LLModel>, std::vector<LLPointer<LLVertexBuffer> > > mPhysicsMesh;  	LLMeshUploadThread::instance_list mUploadData;  	std::set<LLPointer<LLViewerFetchedTexture> > mTextureSet; @@ -272,6 +271,4 @@ protected:  	static S32		sUploadAmount;  }; -#endif -  #endif  // LL_LLFLOATERMODELPREVIEW_H diff --git a/indra/newview/llinventorybridge.cpp b/indra/newview/llinventorybridge.cpp index b03947f54d..eb23ab95dd 100755 --- a/indra/newview/llinventorybridge.cpp +++ b/indra/newview/llinventorybridge.cpp @@ -920,7 +920,6 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,  			// Only should happen for broken links.  			new_listener = new LLLinkItemBridge(inventory, root, uuid);  			break; -#if LL_MESH_ENABLED  	    case LLAssetType::AT_MESH:  			if(!(inv_type == LLInventoryType::IT_MESH))  			{ @@ -928,7 +927,6 @@ LLInvFVBridge* LLInvFVBridge::createBridge(LLAssetType::EType asset_type,  			}  			new_listener = new LLMeshBridge(inventory, root, uuid);  			break; -#endif  		default:  			llinfos << "Unhandled asset type (llassetstorage.h): " @@ -2690,9 +2688,7 @@ BOOL LLFolderBridge::dragOrDrop(MASK mask, BOOL drop,  		case DAD_ANIMATION:  		case DAD_GESTURE:  		case DAD_LINK: -#if LL_MESH_ENABLED  		case DAD_MESH: -#endif  			accept = dragItemIntoFolder((LLInventoryItem*)cargo_data,  										drop);  			break; @@ -3602,9 +3598,7 @@ BOOL LLCallingCardBridge::dragOrDrop(MASK mask, BOOL drop,  			case DAD_BODYPART:  			case DAD_ANIMATION:  			case DAD_GESTURE: -#if LL_MESH_ENABLED  			case DAD_MESH: -#endif  			{  				LLInventoryItem* inv_item = (LLInventoryItem*)cargo_data;  				const LLPermissions& perm = inv_item->getPermissions(); @@ -4793,7 +4787,6 @@ void LLLinkItemBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  	hide_context_entries(menu, items, disabled_items);  } -#if LL_MESH_ENABLED  // +=================================================+  // |        LLMeshBridge                             |  // +=================================================+ @@ -4850,7 +4843,6 @@ void LLMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  	hide_context_entries(menu, items, disabled_items);  } -#endif  // +=================================================+  // |        LLLinkBridge                             | diff --git a/indra/newview/llinventorybridge.h b/indra/newview/llinventorybridge.h index 4c6c3ab82f..e1bfff7e0c 100755 --- a/indra/newview/llinventorybridge.h +++ b/indra/newview/llinventorybridge.h @@ -40,7 +40,6 @@  #include "llinventoryobserver.h"  #include "llviewercontrol.h"  #include "llwearable.h" -#include "llvolume.h"  //for LL_MESH_ENABLED  class LLInventoryPanel;  class LLInventoryModel; @@ -530,7 +529,6 @@ protected:  }; -#if LL_MESH_ENABLED  class LLMeshBridge : public LLItemBridge  {  	friend class LLInvFVBridge; @@ -546,8 +544,6 @@ protected:  		     const LLUUID& uuid) :                         LLItemBridge(inventory, root, uuid) {}  }; -#endif -  //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/indra/newview/llmeshreduction.cpp b/indra/newview/llmeshreduction.cpp index e785784a32..f56d97abbf 100755 --- a/indra/newview/llmeshreduction.cpp +++ b/indra/newview/llmeshreduction.cpp @@ -37,8 +37,6 @@  #include "glod/glod.h" -#if LL_MESH_ENABLED -  static BOOL stop_gloderror()  {  	GLuint error = glodGetError(); @@ -287,5 +285,4 @@ LLPointer<LLModel> LLMeshReduction::reduce(LLModel* in_model, F32 limit, S32 mod  	return out_model;  } -#endif diff --git a/indra/newview/llmeshreduction.h b/indra/newview/llmeshreduction.h index d86696978d..9a7eaa082f 100755 --- a/indra/newview/llmeshreduction.h +++ b/indra/newview/llmeshreduction.h @@ -34,8 +34,6 @@  #include "llmodel.h" -#if LL_MESH_ENABLED -  class LLMeshReduction  {   public: @@ -54,6 +52,4 @@ private:  	U32 mCounter;  }; -#endif -  #endif  // LL_LLMESHREDUCTION_H diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index 069642b711..ecf75415ab 100755 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -68,8 +68,6 @@  #include <queue> -#if LL_MESH_ENABLED -  LLFastTimer::DeclareTimer FTM_MESH_UPDATE("Mesh Update");  LLFastTimer::DeclareTimer FTM_LOAD_MESH("Load Mesh"); @@ -2395,6 +2393,13 @@ LLSD LLMeshUploadThread::createObject(LLModelInstance& instance)  	extra_parameter["param_data"] = v;  	object_params["extra_parameters"].append(extra_parameter); +	LLPermissions perm; +	perm.setNextOwnerBits(gAgent.getID(), LLUUID::null, TRUE, LLFloaterPerms::getNextOwnerPerms()); +	perm.setGroupBits(gAgent.getID(), LLUUID::null, TRUE, LLFloaterPerms::getGroupPerms()); +	perm.setEveryoneBits(gAgent.getID(), LLUUID::null, TRUE, LLFloaterPerms::getEveryonePerms()); + +	object_params["permissions"] = ll_create_sd_from_permissions(perm); +  	return object_params;  } @@ -2696,5 +2701,4 @@ void LLPhysicsDecomp::run()  	mDone = true;  } -#endif diff --git a/indra/newview/llmeshrepository.h b/indra/newview/llmeshrepository.h index b26598ce31..a2f403e214 100755 --- a/indra/newview/llmeshrepository.h +++ b/indra/newview/llmeshrepository.h @@ -39,8 +39,6 @@  #include "llviewertexture.h"  #include "llvolume.h" -#if LL_MESH_ENABLED -  #define LLCONVEXDECOMPINTER_STATIC 1  #include "llconvexdecomposition.h" @@ -466,5 +464,3 @@ extern LLMeshRepository gMeshRepo;  #endif -#endif - diff --git a/indra/newview/llpanelgroupnotices.cpp b/indra/newview/llpanelgroupnotices.cpp index 91166b0f5b..e900c0bdaf 100755 --- a/indra/newview/llpanelgroupnotices.cpp +++ b/indra/newview/llpanelgroupnotices.cpp @@ -159,9 +159,7 @@ BOOL LLGroupDropTarget::handleDragAndDrop(S32 x, S32 y, MASK mask, BOOL drop,  		case DAD_ANIMATION:  		case DAD_GESTURE:  		case DAD_CALLINGCARD: -#if LL_MESH_ENABLED  		case DAD_MESH: -#endif  		{  			LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;  			if(gInventory.getItem(inv_item->getUUID()) diff --git a/indra/newview/llpanelobjectinventory.cpp b/indra/newview/llpanelobjectinventory.cpp index a2dd8b4d6d..87c3ee4552 100755 --- a/indra/newview/llpanelobjectinventory.cpp +++ b/indra/newview/llpanelobjectinventory.cpp @@ -818,9 +818,7 @@ BOOL LLTaskCategoryBridge::dragOrDrop(MASK mask, BOOL drop,  		case DAD_ANIMATION:  		case DAD_GESTURE:  		case DAD_CALLINGCARD: -#if LL_MESH_ENABLED  		case DAD_MESH: -#endif  			accept = LLToolDragAndDrop::isInventoryDropAcceptable(object, (LLViewerInventoryItem*)cargo_data);  			if(accept && drop)  			{ @@ -1246,7 +1244,6 @@ LLUIImagePtr LLTaskWearableBridge::getIcon() const  	return LLInventoryIcon::getIcon(mAssetType, mInventoryType, mFlags, FALSE );  } -#if LL_MESH_ENABLED  ///----------------------------------------------------------------------------  /// Class LLTaskMeshBridge  ///---------------------------------------------------------------------------- @@ -1358,8 +1355,6 @@ void LLTaskMeshBridge::buildContextMenu(LLMenuGL& menu, U32 flags)  	hide_context_entries(menu, items, disabled_items);  } -#endif -  ///----------------------------------------------------------------------------  /// LLTaskInvFVBridge impl  //---------------------------------------------------------------------------- @@ -1439,13 +1434,11 @@ LLTaskInvFVBridge* LLTaskInvFVBridge::createObjectBridge(LLPanelObjectInventory*  						 object->getUUID(),  						 object->getName());  		break; -#if LL_MESH_ENABLED  	case LLAssetType::AT_MESH:  		new_bridge = new LLTaskMeshBridge(panel,  										  object->getUUID(),  										  object->getName());  		break; -#endif  	default:  		llinfos << "Unhandled inventory type (llassetstorage.h): "  				<< (S32)type << llendl; diff --git a/indra/newview/llspatialpartition.cpp b/indra/newview/llspatialpartition.cpp index 0f9f35dc57..56be8af599 100755 --- a/indra/newview/llspatialpartition.cpp +++ b/indra/newview/llspatialpartition.cpp @@ -2789,7 +2789,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)  	U32 data_mask = LLVertexBuffer::MAP_VERTEX; -#if LL_MESH_ENABLED  	if (volume->isMesh())  	{			  		LLUUID mesh_id = volume->getVolume()->getParams().getSculptID(); @@ -2826,7 +2825,6 @@ void renderPhysicsShape(LLDrawable* drawable, LLVOVolume* volume)  			return;  		}  	} -#endif //LL_MESH_ENABLED  	//push faces  	glColor3fv(color.mV); diff --git a/indra/newview/lltexturectrl.cpp b/indra/newview/lltexturectrl.cpp index 3aaf5f0c9f..3d290b7875 100755 --- a/indra/newview/lltexturectrl.cpp +++ b/indra/newview/lltexturectrl.cpp @@ -295,10 +295,8 @@ BOOL LLFloaterTexturePicker::handleDragAndDrop(  {  	BOOL handled = FALSE; -	bool is_mesh = false; -#if LL_MESH_ENABLED -	is_mesh = cargo_type == DAD_MESH; -#endif +	bool is_mesh = cargo_type == DAD_MESH; +  	if ((cargo_type == DAD_TEXTURE) || is_mesh)  	{  		LLInventoryItem *item = (LLInventoryItem *)cargo_data; @@ -1214,10 +1212,8 @@ BOOL LLTextureCtrl::handleDragAndDrop(S32 x, S32 y, MASK mask,  	// returns true, then the cast was valid, and we can perform  	// the third test without problems.  	LLInventoryItem* item = (LLInventoryItem*)cargo_data;  -	bool is_mesh = false; -#if LL_MESH_ENABLED -	is_mesh = cargo_type == DAD_MESH; -#endif +	bool is_mesh = cargo_type == DAD_MESH; +  	if (getEnabled() &&  		((cargo_type == DAD_TEXTURE) || is_mesh) &&  		 allowDrop(item)) diff --git a/indra/newview/lltooldraganddrop.cpp b/indra/newview/lltooldraganddrop.cpp index b7dc624beb..6f38b0cd65 100755 --- a/indra/newview/lltooldraganddrop.cpp +++ b/indra/newview/lltooldraganddrop.cpp @@ -331,9 +331,7 @@ LLToolDragAndDrop::LLDragAndDropDictionary::LLDragAndDropDictionary()  	addEntry(DAD_ANIMATION, 	new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL,	&LLToolDragAndDrop::dad3dNULL,					&LLToolDragAndDrop::dad3dGiveInventory,		&LLToolDragAndDrop::dad3dUpdateInventory,			&LLToolDragAndDrop::dad3dNULL));  	addEntry(DAD_GESTURE, 		new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL,	&LLToolDragAndDrop::dad3dActivateGesture,		&LLToolDragAndDrop::dad3dGiveInventory,		&LLToolDragAndDrop::dad3dUpdateInventory,			&LLToolDragAndDrop::dad3dNULL));  	addEntry(DAD_LINK, 			new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL,	&LLToolDragAndDrop::dad3dNULL,					&LLToolDragAndDrop::dad3dNULL,					&LLToolDragAndDrop::dad3dNULL,						&LLToolDragAndDrop::dad3dNULL)); -#if LL_MESH_ENABLED  	addEntry(DAD_MESH, 			new DragAndDropEntry(&LLToolDragAndDrop::dad3dNULL,	&LLToolDragAndDrop::dad3dNULL,					&LLToolDragAndDrop::dad3dGiveInventory,		&LLToolDragAndDrop::dad3dMeshObject,			&LLToolDragAndDrop::dad3dNULL)); -#endif  	// TODO: animation on self could play it?  edit it?  	// TODO: gesture on self could play it?  edit it?  }; @@ -1037,7 +1035,6 @@ void LLToolDragAndDrop::dropTextureAllFaces(LLViewerObject* hit_obj,  	hit_obj->sendTEUpdate();  } -#if LL_MESH_ENABLED  void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,  								 LLInventoryItem* item,  								 LLToolDragAndDrop::ESource source, @@ -1062,7 +1059,6 @@ void LLToolDragAndDrop::dropMesh(LLViewerObject* hit_obj,  	dialog_refresh_all();  } -#endif  /*  void LLToolDragAndDrop::dropTextureOneFaceAvatar(LLVOAvatar* avatar, S32 hit_face, LLInventoryItem* item) @@ -1505,9 +1501,7 @@ bool LLToolDragAndDrop::handleGiveDragAndDrop(LLUUID dest_agent, LLUUID session_  	case DAD_ANIMATION:  	case DAD_GESTURE:  	case DAD_CALLINGCARD: -#if LL_MESH_ENABLED  	case DAD_MESH: -#endif  	{  		LLViewerInventoryItem* inv_item = (LLViewerInventoryItem*)cargo_data;  		if(gInventory.getItem(inv_item->getUUID()) @@ -1864,12 +1858,10 @@ EAcceptance LLToolDragAndDrop::dad3dApplyToObject(  				dropTextureOneFace(obj, face, item, mSource, mSourceID);  			}  		} -#if LL_MESH_ENABLED  		else if (cargo_type == DAD_MESH)  		{  			dropMesh(obj, item, mSource, mSourceID);  		} -#endif  		else  		{  			llwarns << "unsupported asset type" << llendl; @@ -1894,15 +1886,11 @@ EAcceptance LLToolDragAndDrop::dad3dTextureObject(  	return dad3dApplyToObject(obj, face, mask, drop, DAD_TEXTURE);  } -#if LL_MESH_ENABLED  EAcceptance LLToolDragAndDrop::dad3dMeshObject(  	LLViewerObject* obj, S32 face, MASK mask, BOOL drop)  {  	return dad3dApplyToObject(obj, face, mask, drop, DAD_MESH);  } -#endif - -  /* diff --git a/indra/newview/lltooldraganddrop.h b/indra/newview/lltooldraganddrop.h index 09da4c2955..596cc2ee88 100755 --- a/indra/newview/lltooldraganddrop.h +++ b/indra/newview/lltooldraganddrop.h @@ -43,7 +43,6 @@  #include "llpermissions.h"  #include "llwindow.h"  #include "llviewerinventory.h" -#include "llvolume.h" //for LL_MESH_ENABLED  class LLToolDragAndDrop;  class LLViewerRegion; @@ -155,10 +154,8 @@ protected:  							   MASK mask, BOOL drop);  	EAcceptance dad3dTextureObject(LLViewerObject* obj, S32 face,  								   MASK mask, BOOL drop); -#if LL_MESH_ENABLED  	EAcceptance dad3dMeshObject(LLViewerObject* obj, S32 face,  								   MASK mask, BOOL drop); -#endif  //	EAcceptance dad3dTextureSelf(LLViewerObject* obj, S32 face,  //								 MASK mask, BOOL drop);  	EAcceptance dad3dWearItem(LLViewerObject* obj, S32 face, @@ -245,12 +242,10 @@ public:  									LLInventoryItem* item,  									ESource source,  									const LLUUID& src_id); -#if LL_MESH_ENABLED  	static void dropMesh(LLViewerObject* hit_obj,  						 LLInventoryItem* item,  						 ESource source,  						 const LLUUID& src_id); -#endif  	//static void	dropTextureOneFaceAvatar(LLVOAvatar* avatar,S32 hit_face,  	//									 LLInventoryItem* item) diff --git a/indra/newview/llviewerassettype.cpp b/indra/newview/llviewerassettype.cpp index 370767002a..4c088a72b7 100755 --- a/indra/newview/llviewerassettype.cpp +++ b/indra/newview/llviewerassettype.cpp @@ -85,9 +85,7 @@ LLViewerAssetDictionary::LLViewerAssetDictionary()  	addEntry(LLViewerAssetType::AT_LINK, 				new ViewerAssetEntry(DAD_LINK));  	addEntry(LLViewerAssetType::AT_LINK_FOLDER, 		new ViewerAssetEntry(DAD_LINK)); -#if LL_MESH_ENABLED  	addEntry(LLViewerAssetType::AT_MESH, 				new ViewerAssetEntry(DAD_MESH)); -#endif  	addEntry(LLViewerAssetType::AT_NONE, 				new ViewerAssetEntry(DAD_NONE));  }; diff --git a/indra/newview/llviewerfloaterreg.cpp b/indra/newview/llviewerfloaterreg.cpp index 680a4f1ffa..e1cdca01a5 100755 --- a/indra/newview/llviewerfloaterreg.cpp +++ b/indra/newview/llviewerfloaterreg.cpp @@ -175,9 +175,7 @@ void LLViewerFloaterReg::registerFloaters()  	LLFloaterReg::add("hud", "floater_hud.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterHUD>);  	LLFloaterReg::add("impanel", "floater_im_session.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloater>); -#if LL_MESH_ENABLED  	LLFloaterReg::add("import_collada", "floater_import_collada.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImportCollada>); -#endif  	LLFloaterReg::add("im_container", "floater_im_container.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMFloaterContainer>);  	LLFloaterReg::add("im_well_window", "floater_sys_well.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIMWellWindow>);  	LLFloaterReg::add("incoming_call", "floater_incoming_call.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLIncomingCallDialog>); @@ -256,9 +254,7 @@ void LLViewerFloaterReg::registerFloaters()  	LLFloaterReg::add("upload_anim", "floater_animation_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterAnimPreview>, "upload");  	LLFloaterReg::add("upload_image", "floater_image_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterImagePreview>, "upload");  	LLFloaterReg::add("upload_sound", "floater_sound_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterSoundPreview>, "upload"); -#if LL_MESH_ENABLED  	LLFloaterReg::add("upload_model", "floater_model_preview.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterModelPreview>, "upload"); -#endif  	LLFloaterReg::add("voice_controls", "floater_voice_controls.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLCallFloater>);  	LLFloaterReg::add("voice_effect", "floater_voice_effect.xml", (LLFloaterBuildFunc)&LLFloaterReg::build<LLFloaterVoiceEffect>); diff --git a/indra/newview/llviewermenufile.cpp b/indra/newview/llviewermenufile.cpp index 20de01b78a..0460ac0988 100755 --- a/indra/newview/llviewermenufile.cpp +++ b/indra/newview/llviewermenufile.cpp @@ -350,7 +350,6 @@ class LLFileUploadImage : public view_listener_t  	}  }; -#if LL_MESH_ENABLED  class LLFileUploadScene : public view_listener_t  {  	bool handleEvent(const LLSD& userdata) @@ -377,7 +376,6 @@ class LLFileUploadModel : public view_listener_t  		return TRUE;  	}  }; -#endif  class LLFileUploadSound : public view_listener_t  { @@ -1186,7 +1184,6 @@ void upload_new_resource(  	lldebugs << "Folder: " << gInventory.findCategoryUUIDForType((destination_folder_type == LLFolderType::FT_NONE) ? LLFolderType::assetTypeToFolderType(asset_type) : destination_folder_type) << llendl;  	lldebugs << "Asset Type: " << LLAssetType::lookup(asset_type) << llendl; -#if LL_MESH_ENABLED  	std::string url = gAgent.getRegion()->getCapability(  		"NewFileAgentInventory"); @@ -1216,7 +1213,6 @@ void upload_new_resource(  		LLHTTPClient::post(url, body, new LLNewAgentInventoryResponder(body, uuid, asset_type));  	}  	else -#endif  	{  		llinfos << "NewAgentInventory capability not found, new agent inventory via asset system." << llendl;  		// check for adequate funds @@ -1264,7 +1260,6 @@ void upload_new_resource(  	}  } -#if LL_MESH_ENABLED  BOOL upload_new_variable_price_resource(  	const LLTransactionID &tid,   	LLAssetType::EType asset_type, @@ -1336,7 +1331,6 @@ BOOL upload_new_variable_price_resource(  		return FALSE;  	}  } -#endif  LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid)  { @@ -1407,10 +1401,8 @@ void init_menu_file()  	view_listener_t::addCommit(new LLFileUploadImage(), "File.UploadImage");  	view_listener_t::addCommit(new LLFileUploadSound(), "File.UploadSound");  	view_listener_t::addCommit(new LLFileUploadAnim(), "File.UploadAnim"); -#if LL_MESH_ENABLED  	view_listener_t::addCommit(new LLFileUploadModel(), "File.UploadModel");  	view_listener_t::addCommit(new LLFileUploadScene(), "File.UploadScene"); -#endif  	view_listener_t::addCommit(new LLFileUploadBulk(), "File.UploadBulk");  	view_listener_t::addCommit(new LLFileCloseWindow(), "File.CloseWindow");  	view_listener_t::addCommit(new LLFileCloseAllWindows(), "File.CloseAllWindows"); diff --git a/indra/newview/llviewermenufile.h b/indra/newview/llviewermenufile.h index bb7cfce862..08444551a9 100755 --- a/indra/newview/llviewermenufile.h +++ b/indra/newview/llviewermenufile.h @@ -74,7 +74,6 @@ void upload_new_resource(  	S32 expected_upload_cost,  	void *userdata); -#if LL_MESH_ENABLED  // TODO* : Move all uploads to use this new function  // since at some point, that upload path will be deprecated and no longer  // used @@ -92,7 +91,6 @@ BOOL upload_new_variable_price_resource(  	U32 everyone_perms,  	const std::string& display_name,  	const LLSD& asset_resources); -#endif  LLAssetID generate_asset_id_for_new_upload(const LLTransactionID& tid);  void increase_new_upload_stats(LLAssetType::EType asset_type); diff --git a/indra/newview/llviewertexteditor.cpp b/indra/newview/llviewertexteditor.cpp index 84a42611a4..109add5552 100755 --- a/indra/newview/llviewertexteditor.cpp +++ b/indra/newview/llviewertexteditor.cpp @@ -543,9 +543,7 @@ LLUIImagePtr LLEmbeddedItems::getItemImage(llwchar ext_char) const  			case LLAssetType::AT_BODYPART:		img_name = "Inv_Skin";		break;  			case LLAssetType::AT_ANIMATION:		img_name = "Inv_Animation";	break;  			case LLAssetType::AT_GESTURE:		img_name = "Inv_Gesture";	break; -#if LL_MESH_ENABLED  			case LLAssetType::AT_MESH:          img_name = "Inv_Mesh";	    break; -#endif  			default: llassert(0);  		} diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index 430f83307a..28bcdff7bd 100755 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -604,10 +604,8 @@ public:  		if (gSavedSettings.getBOOL("DebugShowUploadCost"))  		{ -#if LL_MESH_ENABLED  			addText(xpos, ypos, llformat("       Meshes: L$%d", gPipeline.mDebugMeshUploadCost));  			ypos += y_inc/2; -#endif  			addText(xpos, ypos, llformat("    Sculpties: L$%d", gPipeline.mDebugSculptUploadCost));  			ypos += y_inc/2;  			addText(xpos, ypos, llformat("     Textures: L$%d", gPipeline.mDebugTextureUploadCost)); @@ -617,7 +615,6 @@ public:  			ypos += y_inc;  		} -#if LL_MESH_ENABLED  		//temporary hack to give feedback on mesh upload progress  		if (!gMeshRepo.mUploads.empty())  		{ @@ -647,7 +644,6 @@ public:  			ypos += y_inc;  		} -#endif  	}  	void draw() diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index f09ce5b363..4ef050e71f 100755 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -946,7 +946,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool  	BOOL is404 = FALSE; -#if LL_MESH_ENABLED  	if (isSculpted())  	{  		// if it's a mesh @@ -966,7 +965,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool  			}  		}  	} -#endif  	// Check if we need to change implementations  	bool is_flexible = (volume_params.getPathParams().getCurveType() == LL_PCODE_PATH_FLEXIBLE); @@ -1015,7 +1013,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool  		if (isSculpted())  		{  			updateSculptTexture(); -#if LL_MESH_ENABLED  			// if it's a mesh  			if ((volume_params.getSculptType() & LL_SCULPT_TYPE_MASK) == LL_SCULPT_TYPE_MESH)  			{ @@ -1031,7 +1028,6 @@ BOOL LLVOVolume::setVolume(const LLVolumeParams ¶ms, const S32 detail, bool  				}  			}  			else // otherwise is sculptie -#endif  			{  				if (mSculptTexture.notNull())  				{ @@ -1360,7 +1356,7 @@ BOOL LLVOVolume::genBBoxes(BOOL force_global)  	BOOL rebuild = mDrawable->isState(LLDrawable::REBUILD_VOLUME | LLDrawable::REBUILD_POSITION | LLDrawable::REBUILD_RIGGED); -	bool rigged = false; +//	bool rigged = false;  	LLVolume* volume = mRiggedVolume;  	if (!volume)  	{ @@ -2725,7 +2721,6 @@ BOOL LLVOVolume::isSculpted() const  BOOL LLVOVolume::isMesh() const  { -#if LL_MESH_ENABLED  	if (isSculpted())  	{  		LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); @@ -2737,8 +2732,6 @@ BOOL LLVOVolume::isMesh() const  			return TRUE;	  		}  	} -#endif -  	return FALSE;  } @@ -3258,7 +3251,6 @@ F32 LLVOVolume::getBinRadius()  	F32 scale = 1.f; -#if LL_MESH_ENABLED  	if (isSculpted())  	{  		LLSculptParams *sculpt_params = (LLSculptParams *)getParameterEntry(LLNetworkData::PARAMS_SCULPT); @@ -3280,7 +3272,6 @@ F32 LLVOVolume::getBinRadius()  			scale = 1.f/llmax(vert_count/1024.f, 1.f);  		}  	} -#endif  	const LLVector4a* ext = mDrawable->getSpatialExtents(); @@ -3912,7 +3903,6 @@ void LLVolumeGeometryManager::getGeometry(LLSpatialGroup* group)  static LLFastTimer::DeclareTimer FTM_REBUILD_VOLUME_VB("Volume");  static LLFastTimer::DeclareTimer FTM_REBUILD_VBO("VBO Rebuilt"); -#if LL_MESH_ENABLED  static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj)  {  	LLVOAvatar* avatar = vobj->getAvatar(); @@ -3939,7 +3929,6 @@ static LLDrawPoolAvatar* get_avatar_drawpool(LLViewerObject* vobj)  	return NULL;  } -#endif		  void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  { @@ -4006,11 +3995,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  		drawablep->clearState(LLDrawable::HAS_ALPHA); -#if LL_MESH_ENABLED  		bool rigged = vobj->isAttachment() &&   					vobj->isMesh() &&   					gMeshRepo.getSkinInfo(vobj->getVolume()->getParams().getSculptID()); -#endif  		bool bake_sunlight = LLPipeline::sBakeSunlight && drawablep->isStatic(); @@ -4023,7 +4010,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  			drawablep->updateFaceSize(i);  			LLFace* facep = drawablep->getFace(i); -#if LL_MESH_ENABLED  			if (rigged)   			{  				if (!facep->isState(LLFace::RIGGED)) @@ -4129,7 +4115,6 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)  					facep->clearState(LLFace::RIGGED);  				}  			} -#endif  			if (cur_total > max_total || facep->getIndicesCount() <= 0 || facep->getGeomCount() <= 0)  			{ diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index 8b4feac3cd..9ad1df02b8 100755 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -2039,9 +2039,7 @@ void LLPipeline::rebuildPriorityGroups()  	assertInitialized(); -#if LL_MESH_ENABLED  	gMeshRepo.notifyLoadedMeshes(); -#endif  	// Iterate through all drawables on the priority build queue,  	for (LLSpatialGroup::sg_vector_t::iterator iter = mGroupQ1.begin(); @@ -3857,7 +3855,6 @@ void LLPipeline::renderDebug()  		gPipeline.mDebugTextureUploadCost = textures.size() * 10;  		gPipeline.mDebugSculptUploadCost = sculpts.size()*10; -#if LL_MESH_ENABLED  		U32 mesh_cost = 0;  		for (std::set<LLUUID>::iterator iter = meshes.begin(); iter != meshes.end(); ++iter) @@ -3866,7 +3863,6 @@ void LLPipeline::renderDebug()  		}  		gPipeline.mDebugMeshUploadCost = mesh_cost; -#endif  	}  	for (LLCullResult::bridge_list_t::const_iterator i = sCull->beginVisibleBridge(); i != sCull->endVisibleBridge(); ++i) diff --git a/indra/newview/pipeline.h b/indra/newview/pipeline.h index bed4155d15..cddcfc2132 100755 --- a/indra/newview/pipeline.h +++ b/indra/newview/pipeline.h @@ -45,7 +45,6 @@  #include "llgl.h"  #include "lldrawable.h"  #include "llrendertarget.h" -#include "llmodel.h" //for LL_MESH_ENaBLED  #include <stack> @@ -67,9 +66,7 @@ class LLVOAvatar;  class LLGLSLShader;  class LLCurlRequest; -#if LL_MESH_ENABLED  class LLMeshResponder; -#endif  typedef enum e_avatar_skinning_method  { @@ -475,9 +472,7 @@ public:  	S32						 mDebugTextureUploadCost;  	S32						 mDebugSculptUploadCost; -#if LL_MESH_ENABLED  	S32						 mDebugMeshUploadCost; -#endif  	S32						 mLightingChanges;  	S32						 mGeometryChanges; diff --git a/indra/newview/skins/default/xui/en/floater_tools.xml b/indra/newview/skins/default/xui/en/floater_tools.xml index bd07c473de..6b2b5d7d7e 100755 --- a/indra/newview/skins/default/xui/en/floater_tools.xml +++ b/indra/newview/skins/default/xui/en/floater_tools.xml @@ -2163,6 +2163,10 @@ even though the user gets a free copy.                   label="Cylinder"                   name="Cylinder"                   value="Cylinder" /> +              <combo_box.item +                 label="Mesh" +                 name="Mesh" +                 value="Mesh" />              </combo_box>          </panel>          <panel | 
