diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lldrawpool.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/linden/indra/newview/lldrawpool.cpp b/linden/indra/newview/lldrawpool.cpp index 9d8bd0a..196f8c1 100644 --- a/linden/indra/newview/lldrawpool.cpp +++ b/linden/indra/newview/lldrawpool.cpp | |||
@@ -194,7 +194,8 @@ S32 LLFacePool::drawLoopSetTex(face_array_t& face_list, S32 stage) | |||
194 | iter != face_list.end(); iter++) | 194 | iter != face_list.end(); iter++) |
195 | { | 195 | { |
196 | LLFace *facep = *iter; | 196 | LLFace *facep = *iter; |
197 | facep->bindTexture(stage); | 197 | gGL.getTexUnit(stage)->bind(facep->getTexture()); |
198 | gGL.getTexUnit(0)->activate(); | ||
198 | res += facep->renderIndexed(); | 199 | res += facep->renderIndexed(); |
199 | } | 200 | } |
200 | } | 201 | } |
@@ -395,7 +396,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) | |||
395 | { | 396 | { |
396 | if (params.mTexture.notNull()) | 397 | if (params.mTexture.notNull()) |
397 | { | 398 | { |
398 | params.mTexture->bind(); | 399 | gGL.getTexUnit(0)->bind(params.mTexture.get()); |
399 | if (params.mTextureMatrix) | 400 | if (params.mTextureMatrix) |
400 | { | 401 | { |
401 | glMatrixMode(GL_TEXTURE); | 402 | glMatrixMode(GL_TEXTURE); |
@@ -406,14 +407,14 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture) | |||
406 | } | 407 | } |
407 | else | 408 | else |
408 | { | 409 | { |
409 | LLImageGL::unbindTexture(0); | 410 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
410 | } | 411 | } |
411 | } | 412 | } |
412 | 413 | ||
413 | if (params.mVertexBuffer.notNull()) | 414 | if (params.mVertexBuffer.notNull()) |
414 | { | 415 | { |
415 | params.mVertexBuffer->setBuffer(mask); | 416 | params.mVertexBuffer->setBuffer(mask); |
416 | params.mVertexBuffer->drawRange(LLVertexBuffer::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); | 417 | params.mVertexBuffer->drawRange(LLRender::TRIANGLES, params.mStart, params.mEnd, params.mCount, params.mOffset); |
417 | gPipeline.addTrianglesDrawn(params.mCount/3); | 418 | gPipeline.addTrianglesDrawn(params.mCount/3); |
418 | } | 419 | } |
419 | 420 | ||