diff options
| -rw-r--r-- | indra/newview/lldrawpoolavatar.cpp | 3 | ||||
| -rw-r--r-- | indra/newview/llvovolume.cpp | 18 | 
2 files changed, 13 insertions, 8 deletions
| diff --git a/indra/newview/lldrawpoolavatar.cpp b/indra/newview/lldrawpoolavatar.cpp index 730ad1a364..59161d063e 100644 --- a/indra/newview/lldrawpoolavatar.cpp +++ b/indra/newview/lldrawpoolavatar.cpp @@ -1272,6 +1272,9 @@ void LLDrawPoolAvatar::updateRiggedFaceVertexBuffer(LLVOAvatar* avatar, LLFace*  		face->setGeomIndex(0);  		face->setIndicesIndex(0); +		//rigged faces do not batch textures +		face->setTextureIndex(255); +  		if (buffer.isNull() || buffer->getTypeMask() != data_mask || !buffer->isWriteable())  		{ //make a new buffer  			if (sShaderLevel > 0) diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp index c2318f9cf4..59166df9f6 100644 --- a/indra/newview/llvovolume.cpp +++ b/indra/newview/llvovolume.cpp @@ -4867,11 +4867,19 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  				facep->setTextureIndex(cur_tex);  				texture_list.push_back(tex); -				//if (can_batch_texture(facep)) -				{ +				if (can_batch_texture(facep)) +				{ //populate texture_list with any textures that can be batched +				  //move i to the next unbatchable face  					while (i != faces.end())  					{  						facep = *i; +						 +						if (!can_batch_texture(facep)) +						{ //face is bump mapped or has an animated texture matrix -- can't  +							//batch more than 1 texture at a time +							break; +						} +  						if (facep->getTexture() != tex)  						{  							if (distance_sort) @@ -4897,12 +4905,6 @@ void LLVolumeGeometryManager::genDrawInfo(LLSpatialGroup* group, U32 mask, std::  								cur_tex++;  							} -							if (!can_batch_texture(facep)) -							{ //face is bump mapped or has an animated texture matrix -- can't  -								//batch more than 1 texture at a time -								break; -							} -  							if (cur_tex >= texture_index_channels)  							{ //cut batches when index channels are depleted  								break; | 
