diff options
Diffstat (limited to 'indra')
-rw-r--r-- | indra/newview/lldrawpoolpbropaque.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/indra/newview/lldrawpoolpbropaque.cpp b/indra/newview/lldrawpoolpbropaque.cpp index e1614904b4..71f648a714 100644 --- a/indra/newview/lldrawpoolpbropaque.cpp +++ b/indra/newview/lldrawpoolpbropaque.cpp @@ -148,6 +148,16 @@ void LLDrawPoolPBROpaque::renderDeferred(S32 pass) LLGLDisable cull_face(mat->mDoubleSided ? GL_CULL_FACE : 0); + bool tex_setup = false; + if (pparams->mTextureMatrix) + { //special case implementation of texture animation here because of special handling of textures for PBR batches + tex_setup = true; + gGL.getTexUnit(0)->activate(); + gGL.matrixMode(LLRender::MM_TEXTURE); + gGL.loadMatrix((GLfloat*)pparams->mTextureMatrix->mMatrix); + gPipeline.mTextureMatrixOps++; + } + if (rigged) { if (pparams->mAvatar.notNull() && (lastAvatar != pparams->mAvatar || lastMeshId != pparams->mSkinInfo->mHash)) @@ -163,6 +173,13 @@ void LLDrawPoolPBROpaque::renderDeferred(S32 pass) { pushBatch(*pparams, vertex_data_mask, FALSE, FALSE); } + + if (tex_setup) + { + gGL.matrixMode(LLRender::MM_TEXTURE0); + gGL.loadIdentity(); + gGL.matrixMode(LLRender::MM_MODELVIEW); + } } } |