diff options
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rw-r--r-- | indra/newview/lldrawpool.cpp | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp index 82888b2df6..2aee7b450a 100644 --- a/indra/newview/lldrawpool.cpp +++ b/indra/newview/lldrawpool.cpp @@ -127,7 +127,7 @@ LLDrawPool::LLDrawPool(const U32 type) mType = type; sNumDrawPools++; mId = sNumDrawPools; - mVertexShaderLevel = 0; + mShaderLevel = 0; mSkipRender = false; } @@ -141,7 +141,7 @@ LLViewerTexture *LLDrawPool::getDebugTexture() return NULL; } -//virtuals +//virtual void LLDrawPool::beginRenderPass( S32 pass ) { } @@ -406,9 +406,9 @@ void LLRenderPass::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL t } } -void LLRenderPass::renderTexture(U32 type, U32 mask) +void LLRenderPass::renderTexture(U32 type, U32 mask, BOOL batch_textures) { - pushBatches(type, mask, TRUE); + pushBatches(type, mask, true, batch_textures); } void LLRenderPass::pushBatches(U32 type, U32 mask, BOOL texture, BOOL batch_textures) @@ -449,10 +449,10 @@ void LLRenderPass::applyModelMatrix(const LLDrawInfo& params) if (params.mModelMatrix != gGLLastMatrix) { gGLLastMatrix = params.mModelMatrix; + gGL.matrixMode(LLRender::MM_MODELVIEW); gGL.loadMatrix(gGLModelView); if (params.mModelMatrix) { - llassert(gGL.getMatrixMode() == LLRender::MM_MODELVIEW); gGL.multMatrix((GLfloat*) params.mModelMatrix->mMatrix); } gPipeline.mMatrixOpCount++; @@ -461,6 +461,11 @@ void LLRenderPass::applyModelMatrix(const LLDrawInfo& params) void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL batch_textures) { + if (!params.mCount) + { + return; + } + applyModelMatrix(params); bool tex_setup = false; @@ -515,6 +520,7 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba if (tex_setup) { + gGL.matrixMode(LLRender::MM_TEXTURE0); gGL.loadIdentity(); gGL.matrixMode(LLRender::MM_MODELVIEW); } |