summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpool.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/lldrawpool.cpp')
-rwxr-xr-xindra/newview/lldrawpool.cpp45
1 files changed, 45 insertions, 0 deletions
diff --git a/indra/newview/lldrawpool.cpp b/indra/newview/lldrawpool.cpp
index f74164aea6..a6cf917cbd 100755
--- a/indra/newview/lldrawpool.cpp
+++ b/indra/newview/lldrawpool.cpp
@@ -473,6 +473,10 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
if (params.mTextureList[i].notNull())
{
gGL.getTexUnit(i)->bind(params.mTextureList[i], TRUE);
+ if (LLViewerTexture::MEDIA_TEXTURE == params.mTextureList[i]->getType())
+ {
+ gGL.setInverseTexCoordByY(true);
+ }
}
}
}
@@ -482,13 +486,54 @@ void LLRenderPass::pushBatch(LLDrawInfo& params, U32 mask, BOOL texture, BOOL ba
{
params.mTexture->addTextureStats(params.mVSize);
gGL.getTexUnit(0)->bind(params.mTexture, TRUE) ;
+
+ if (!gPipeline.mVertexShadersEnabled)
+ {
+ if (LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType() && !params.mTextureMatrix)
+ {
+ static const float fIdntInvY[] = {
+ 1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+ };
+
+ gGL.getTexUnit(0)->activate();
+ gGL.matrixMode(LLRender::MM_TEXTURE);
+ gGL.loadMatrix((GLfloat*)fIdntInvY);
+ gPipeline.mTextureMatrixOps++;
+
+ tex_setup = true;
+ }
+ }
+ else
+ {
+ gGL.setInverseTexCoordByY(LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType());
+ }
+
if (params.mTextureMatrix)
{
tex_setup = true;
gGL.getTexUnit(0)->activate();
gGL.matrixMode(LLRender::MM_TEXTURE);
gGL.loadMatrix((GLfloat*) params.mTextureMatrix->mMatrix);
+
+ if (LLViewerTexture::MEDIA_TEXTURE == params.mTexture->getType() && !gPipeline.mVertexShadersEnabled)
+ {
+ static const float fIdntInvY[] = {
+ 1, 0, 0, 0,
+ 0, -1, 0, 0,
+ 0, 0, 1, 0,
+ 0, 0, 0, 1
+ };
+
+ gGL.multMatrix(fIdntInvY);
+ gPipeline.mMatrixOpCount++;
+ }
+
gPipeline.mTextureMatrixOps++;
+
+ tex_setup = true;
}
}
else