summaryrefslogtreecommitdiff
path: root/indra/newview/llvograss.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2013-01-09 22:44:44 -0700
committerXiaohong Bao <bao@lindenlab.com>2013-01-09 22:44:44 -0700
commitcda5666dc765c4988b4f01ab34b8a008039ae261 (patch)
tree06c00e15896998d373810465d8eb161358dcb340 /indra/newview/llvograss.cpp
parent27bec2b2f21f19a7c04707b03f83c8caa855872d (diff)
parent7cc37d949e9319a5b60641ff8453a0fed763d817 (diff)
Automated merge with https://hg.lindenlab.com/richard/viewer-interesting
Diffstat (limited to 'indra/newview/llvograss.cpp')
-rw-r--r--indra/newview/llvograss.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/indra/newview/llvograss.cpp b/indra/newview/llvograss.cpp
index 4dca87652d..d378ed2577 100644
--- a/indra/newview/llvograss.cpp
+++ b/indra/newview/llvograss.cpp
@@ -603,8 +603,8 @@ U32 LLVOGrass::getPartitionType() const
return LLViewerRegion::PARTITION_GRASS;
}
-LLGrassPartition::LLGrassPartition()
-: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB)
+LLGrassPartition::LLGrassPartition(LLViewerRegion* regionp)
+: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB, regionp)
{
mDrawableType = LLPipeline::RENDER_TYPE_GRASS;
mPartitionType = LLViewerRegion::PARTITION_GRASS;
@@ -624,9 +624,9 @@ void LLGrassPartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_count
LLViewerCamera* camera = LLViewerCamera::getInstance();
for (LLSpatialGroup::element_iter i = group->getDataBegin(); i != group->getDataEnd(); ++i)
{
- LLDrawable* drawablep = *i;
+ LLDrawable* drawablep = (LLDrawable*)(*i)->getDrawable();
- if (drawablep->isDead())
+ if (!drawablep || drawablep->isDead())
{
continue;
}
@@ -738,8 +738,10 @@ void LLGrassPartition::getGeometry(LLSpatialGroup* group)
LLDrawInfo* info = new LLDrawInfo(start,end,count,offset,facep->getTexture(),
//facep->getTexture(),
buffer, fullbright);
- info->mExtents[0] = group->mObjectExtents[0];
- info->mExtents[1] = group->mObjectExtents[1];
+
+ const LLVector4a* exts = group->getObjectExtents();
+ info->mExtents[0] = exts[0];
+ info->mExtents[1] = exts[1];
info->mVSize = vsize;
draw_vec.push_back(info);
//for alpha sorting