diff options
author | Dave SIMmONs <simon@lindenlab.com> | 2011-06-29 11:36:19 -0700 |
---|---|---|
committer | Dave SIMmONs <simon@lindenlab.com> | 2011-06-29 11:36:19 -0700 |
commit | cc73cf15e6c2a361df278cb0b66c4d68c6acfbcd (patch) | |
tree | 27140b901d74acd106c5fc4c7a96a2e578635347 /indra/newview/llvopartgroup.cpp | |
parent | 1fbf3e0ec297004879d766cad11c5e9e15b86d4b (diff) | |
parent | a300902494f76b9542c3978c2ca80726cefbc942 (diff) |
Merge latest from lindenlab/viewer-development
Diffstat (limited to 'indra/newview/llvopartgroup.cpp')
-rw-r--r-- | indra/newview/llvopartgroup.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/indra/newview/llvopartgroup.cpp b/indra/newview/llvopartgroup.cpp index 6f354b78b1..a4b0910c92 100644 --- a/indra/newview/llvopartgroup.cpp +++ b/indra/newview/llvopartgroup.cpp @@ -324,10 +324,18 @@ void LLVOPartGroup::getGeometry(S32 idx, LLVector3 normal = -LLViewerCamera::getInstance()->getXAxis(); - + + //HACK -- the verticesp->mV[3] = 0.f here are to set the texture index to 0 (particles don't use texture batching, maybe they should) + // this works because there is actually a 4th float stored after the vertex position which is used as a texture index + // also, somebody please VECTORIZE THIS + + verticesp->mV[3] = 0.f; *verticesp++ = part_pos_agent + up - right; + verticesp->mV[3] = 0.f; *verticesp++ = part_pos_agent - up - right; + verticesp->mV[3] = 0.f; *verticesp++ = part_pos_agent + up + right; + verticesp->mV[3] = 0.f; *verticesp++ = part_pos_agent - up + right; *colorsp++ = part.mColor; @@ -360,7 +368,7 @@ U32 LLVOPartGroup::getPartitionType() const } LLParticlePartition::LLParticlePartition() -: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK, TRUE, GL_STREAM_DRAW_ARB) +: LLSpatialPartition(LLDrawPoolAlpha::VERTEX_DATA_MASK | LLVertexBuffer::MAP_TEXTURE_INDEX, TRUE, GL_STREAM_DRAW_ARB) { mRenderPass = LLRenderPass::PASS_ALPHA; mDrawableType = LLPipeline::RENDER_TYPE_PARTICLES; @@ -418,6 +426,7 @@ void LLParticlePartition::addGeometryCount(LLSpatialGroup* group, U32& vertex_co mFaceList.push_back(facep); vertex_count += facep->getGeomCount(); index_count += facep->getIndicesCount(); + llassert(facep->getIndicesCount() < 65536); } obj->mDepth /= count; |