diff options
Diffstat (limited to 'linden/indra/newview/lldrawpool.cpp')
-rw-r--r-- | linden/indra/newview/lldrawpool.cpp | 29 |
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 | ||
121 | LLDrawPool::~LLDrawPool() | 120 | LLDrawPool::~LLDrawPool() |
@@ -136,24 +135,6 @@ void LLDrawPool::beginRenderPass( S32 pass ) | |||
136 | //virtual | 135 | //virtual |
137 | void LLDrawPool::endRenderPass( S32 pass ) | 136 | void LLDrawPool::endRenderPass( S32 pass ) |
138 | { | 137 | { |
139 | glDisableClientState ( GL_TEXTURE_COORD_ARRAY ); | ||
140 | glDisableClientState ( GL_COLOR_ARRAY ); | ||
141 | glDisableClientState ( GL_NORMAL_ARRAY ); | ||
142 | } | ||
143 | |||
144 | U32 LLDrawPool::getTrianglesDrawn() const | ||
145 | { | ||
146 | return mIndicesDrawn / 3; | ||
147 | } | ||
148 | |||
149 | void LLDrawPool::resetTrianglesDrawn() | ||
150 | { | ||
151 | mIndicesDrawn = 0; | ||
152 | } | ||
153 | |||
154 | void 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 | ||
383 | void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture) | 364 | void 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 | ||