summaryrefslogtreecommitdiff
path: root/indra/newview/llvopartgroup.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2012-06-15 16:07:06 -0500
committerDave Parks <davep@lindenlab.com>2012-06-15 16:07:06 -0500
commita1d0d67e05c45bdc1a7a8bb0aad79772a2a94f6e (patch)
tree2a35cd0bfc9749122bb48636c1738752710efada /indra/newview/llvopartgroup.cpp
parent99dc246ac843114f20f7aa99531451fcf46df3ed (diff)
MAINT-775 Fix for particle index pool corruption on teleport.
Diffstat (limited to 'indra/newview/llvopartgroup.cpp')
-rw-r--r--indra/newview/llvopartgroup.cpp10
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp
index 02282fd6a6..9cce68fff6 100644
--- a/indra/newview/llvopartgroup.cpp
+++ b/indra/newview/llvopartgroup.cpp
@@ -52,8 +52,7 @@ LLPointer<LLVertexBuffer> LLVOPartGroup::sVB = NULL;
S32 LLVOPartGroup::sVBSlotFree[];
S32* LLVOPartGroup::sVBSlotCursor = NULL;
-//static
-void LLVOPartGroup::restoreGL()
+void LLVOPartGroup::initClass()
{
for (S32 i = 0; i < LL_MAX_PARTICLE_COUNT; ++i)
{
@@ -61,7 +60,11 @@ void LLVOPartGroup::restoreGL()
}
sVBSlotCursor = sVBSlotFree;
+}
+//static
+void LLVOPartGroup::restoreGL()
+{
sVB = new LLVertexBuffer(VERTEX_DATA_MASK, GL_STREAM_DRAW_ARB);
U32 count = LL_MAX_PARTICLE_COUNT;
sVB->allocateBuffer(count*4, count*6, true);
@@ -626,7 +629,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
LLFace* facep = *i;
LLAlphaObject* object = (LLAlphaObject*) facep->getViewerObject();
- if (facep->getIndicesStart() == 0xFFFFFFFF)
+ if (!facep->isState(LLFace::PARTICLE))
{ //set the indices of this face
S32 idx = LLVOPartGroup::findAvailableVBSlot();
if (idx >= 0)
@@ -635,6 +638,7 @@ void LLParticlePartition::getGeometry(LLSpatialGroup* group)
facep->setIndicesIndex(idx*6);
facep->setVertexBuffer(LLVOPartGroup::sVB);
facep->setPoolType(LLDrawPool::POOL_ALPHA);
+ facep->setState(LLFace::PARTICLE);
}
else
{