From 8a5c983640ac23f6a588d78c433d2a36ddf4fa70 Mon Sep 17 00:00:00 2001
From: Dave Parks <davep@lindenlab.com>
Date: Tue, 27 Sep 2011 14:55:00 -0500
Subject: [PATCH] SH-2505 Fix for some objects appearing as blobs of busted
 geometry on vertex buffer update.

---
 indra/newview/pipeline.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp
index 8c1bb0f6280..2bbb2edc1a1 100644
--- a/indra/newview/pipeline.cpp
+++ b/indra/newview/pipeline.cpp
@@ -2752,6 +2752,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
 			{
 				markVisible(*i, camera);
 			}
+
+			if (!sDelayVBUpdate)
+			{ //rebuild mesh as soon as we know it's visible
+				group->rebuildMesh();
+			}
 		}
 	}
 
@@ -2802,6 +2807,11 @@ void LLPipeline::stateSort(LLCamera& camera, LLCullResult &result)
 		{
 			group->setVisible();
 			stateSort(group, camera);
+
+			if (!sDelayVBUpdate)
+			{ //rebuild mesh as soon as we know it's visible
+				group->rebuildMesh();
+			}
 		}
 	}
 	
-- 
GitLab