aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:44 -0500
committerJacek Antonelli2008-08-15 23:45:44 -0500
commitacfdcf2b1deeb04698174c78e8cb22b093445bb1 (patch)
tree811293650bcf81d01ea7c54d7c2cf263110aa329 /linden/indra/newview/lldrawpool.cpp
parentSecond Life viewer sources 1.20.2 (diff)
downloadmeta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.zip
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.gz
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.bz2
meta-impy-acfdcf2b1deeb04698174c78e8cb22b093445bb1.tar.xz
Second Life viewer sources 1.20.3
Diffstat (limited to 'linden/indra/newview/lldrawpool.cpp')
-rw-r--r--linden/indra/newview/lldrawpool.cpp29
1 files changed, 2 insertions, 27 deletions
diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp
index 409439a..c579c68 100644
--- a/linden/indra/newview/lldrawpool.cpp
+++ b/linden/indra/newview/lldrawpool.cpp
@@ -115,7 +115,6 @@ LLDrawPool::LLDrawPool(const U32 type)
115 sNumDrawPools++; 115 sNumDrawPools++;
116 mId = sNumDrawPools; 116 mId = sNumDrawPools;
117 mVertexShaderLevel = 0; 117 mVertexShaderLevel = 0;
118 mIndicesDrawn = 0;
119} 118}
120 119
121LLDrawPool::~LLDrawPool() 120LLDrawPool::~LLDrawPool()
@@ -136,24 +135,6 @@ void LLDrawPool::beginRenderPass( S32 pass )
136//virtual 135//virtual
137void LLDrawPool::endRenderPass( S32 pass ) 136void LLDrawPool::endRenderPass( S32 pass )
138{ 137{
139 glDisableClientState ( GL_TEXTURE_COORD_ARRAY );
140 glDisableClientState ( GL_COLOR_ARRAY );
141 glDisableClientState ( GL_NORMAL_ARRAY );
142}
143
144U32 LLDrawPool::getTrianglesDrawn() const
145{
146 return mIndicesDrawn / 3;
147}
148
149void LLDrawPool::resetTrianglesDrawn()
150{
151 mIndicesDrawn = 0;
152}
153
154void LLDrawPool::addIndicesDrawn(const U32 indices)
155{
156 mIndicesDrawn += indices;
157} 138}
158 139
159//============================= 140//=============================
@@ -224,7 +205,7 @@ void LLFacePool::drawLoop()
224{ 205{
225 if (!mDrawFace.empty()) 206 if (!mDrawFace.empty())
226 { 207 {
227 mIndicesDrawn += drawLoop(mDrawFace); 208 drawLoop(mDrawFace);
228 } 209 }
229} 210}
230 211
@@ -382,10 +363,6 @@ void LLRenderPass::renderTexture(U32 type, U32 mask)
382 363
383void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture) 364void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture)
384{ 365{
385#if !LL_RELEASE_FOR_DOWNLOAD
386 LLGLState::checkClientArrays(mask);
387#endif
388
389 for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i) 366 for (LLCullResult::drawinfo_list_t::iterator i = gPipeline.beginRenderMap(type); i != gPipeline.endRenderMap(type); ++i)
390 { 367 {
391 LLDrawInfo* pparams = *i; 368 LLDrawInfo* pparams = *i;
@@ -436,9 +413,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture)
436 if (params.mVertexBuffer.notNull()) 413 if (params.mVertexBuffer.notNull())
437 { 414 {
438 params.mVertexBuffer->setBuffer(mask); 415 params.mVertexBuffer->setBuffer(mask);
439 U16* indices_pointer = (U16*) params.mVertexBuffer->getIndicesPointer(); 416 params.mVertexBuffer->drawRange(LLVertexBuffer::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset);
440 glDrawRangeElements(GL_TRIANGLES, params.mStart, params.mEnd, params.mCount,
441 GL_UNSIGNED_SHORT, indices_pointer+params.mOffset);
442 gPipeline.addTrianglesDrawn(params.mCount/3); 417 gPipeline.addTrianglesDrawn(params.mCount/3);
443 } 418 }
444 419