summaryrefslogtreecommitdiff
path: root/indra/newview/llvovolume.cpp
diff options
context:
space:
mode:
authorRichard Linden <none@none>2012-09-06 11:47:48 -0700
committerRichard Linden <none@none>2012-09-06 11:47:48 -0700
commit371b66a6ef7eb2568e3127c1c59326bce6e26ab8 (patch)
tree9154fa799fc37df8cb493f921b41ad79596e903c /indra/newview/llvovolume.cpp
parente3b4b3875a6d8c7857ba948a662ace4731913ecf (diff)
parent2cdfb170216c798c637081b0e28ec8921f0b777b (diff)
Automated merge with http://bitbucket.org/lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llvovolume.cpp')
-rw-r--r--indra/newview/llvovolume.cpp19
1 files changed, 10 insertions, 9 deletions
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index e99898a83c..813fa72cc3 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3961,7 +3961,6 @@ static LLFastTimer::DeclareTimer FTM_REGISTER_FACE("Register Face");
void LLVolumeGeometryManager::registerFace(LLSpatialGroup* group, LLFace* facep, U32 type)
{
LLFastTimer t(FTM_REGISTER_FACE);
- LLMemType mt(LLMemType::MTYPE_SPACE_PARTITION);
if (facep->getViewerObject()->isSelected() && LLSelectMgr::getInstance()->mHideSelectedObjects)
{
@@ -4888,11 +4887,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)
@@ -4918,12 +4925,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;