summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
committerKelly Washington <kelly@lindenlab.com>2007-06-21 22:40:22 +0000
commite03bb0606a10f29c8b94909a713a5bb5c69e88b7 (patch)
tree6d8d07894579438c8cc70e08f5730c3c95dfe768 /indra/newview/lldrawpool.cpp
parent2638f12f95eea692502836cf6548b4a0b234d009 (diff)
merge -r62831:64079 branches/maintenance to release
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r--indra/newview/lldrawpool.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index b2e7272336..2626a8bd31 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -466,15 +466,20 @@ void LLRenderPass::renderInvisible(U32 mask)
std::vector<LLDrawInfo*>& draw_info = gPipeline.mRenderMap[LLRenderPass::PASS_INVISIBLE];
- U32* indices_pointer = NULL;
for (std::vector<LLDrawInfo*>::iterator i = draw_info.begin(); i != draw_info.end(); ++i)
{
LLDrawInfo& params = **i;
- params.mVertexBuffer->setBuffer(mask);
- indices_pointer = (U32*) params.mVertexBuffer->getIndicesPointer();
- glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
- GL_UNSIGNED_INT, indices_pointer+params.mOffset);
- gPipeline.mTrianglesDrawn += params.mCount/3;
+
+ if (params.mVertexBuffer)
+ {
+ params.mVertexBuffer->setBuffer(mask);
+ U32 *indices_pointer =
+ (U32 *) params.mVertexBuffer->getIndicesPointer();
+ glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd,
+ params.mCount, GL_UNSIGNED_INT,
+ indices_pointer + params.mOffset);
+ gPipeline.mTrianglesDrawn += params.mCount / 3;
+ }
}
}