summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2008-04-28 23:29:46 +0000
committerSteven Bennetts <steve@lindenlab.com>2008-04-28 23:29:46 +0000
commit16baf6c9d43fc29e697b5a460439ca664897450c (patch)
tree6c3ae45c538cbc90408ab72f3a02564cf5dce754 /indra/newview/lldrawpool.cpp
parent75ee8558abb662b6a0a6b559c61a9549818d2962 (diff)
merge release-QAR-499 Viewer 1.20 RC 3
merge release-QAR-508 Viewer 1.20 RC 4 merge Branch_1-20-Viewer -r 85278 : 85828 -> release
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r--indra/newview/lldrawpool.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index c987f3e035..6cd2152a28 100644
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -115,7 +115,6 @@ LLDrawPool::LLDrawPool(const U32 type)
sNumDrawPools++;
mId = sNumDrawPools;
mVertexShaderLevel = 0;
- mIndicesDrawn = 0;
}
LLDrawPool::~LLDrawPool()
@@ -136,24 +135,6 @@ void LLDrawPool::beginRenderPass( S32 pass )
//virtual
void LLDrawPool::endRenderPass( S32 pass )
{
- glDisableClientState ( GL_TEXTURE_COORD_ARRAY );
- glDisableClientState ( GL_COLOR_ARRAY );
- glDisableClientState ( GL_NORMAL_ARRAY );
-}
-
-U32 LLDrawPool::getTrianglesDrawn() const
-{
- return mIndicesDrawn / 3;
-}
-
-void LLDrawPool::resetTrianglesDrawn()
-{
- mIndicesDrawn = 0;
-}
-
-void LLDrawPool::addIndicesDrawn(const U32 indices)
-{
- mIndicesDrawn += indices;
}
//=============================
@@ -224,7 +205,7 @@ void LLFacePool::drawLoop()
{
if (!mDrawFace.empty())
{
- mIndicesDrawn += drawLoop(mDrawFace);
+ drawLoop(mDrawFace);
}
}
@@ -382,10 +363,6 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture)
{
-#if !LL_RELEASE_FOR_DOWNLOAD
- LLGLState::checkClientArrays(mask);
-#endif
-
for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
{
LLDrawInfo* pparams = *i;
@@ -436,9 +413,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
if (params.mVertexBuffer.notNull())
{
params.mVertexBuffer->setBuffer(mask);
- U16* indices_pointer = (U16*) params.mVertexBuffer->getIndicesPointer();
- glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
- GL_UNSIGNED_SHORT, indices_pointer+params.mOffset);
+ params.mVertexBuffer->drawRange(LLVertexBuffer::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
gPipeline.addTrianglesDrawn(params.mCount/3);
}