summaryrefslogtreecommitdiff
path: root/indra/newview/lldynamictexture.cpp
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2020-04-20 21:21:12 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2020-04-20 21:21:12 +0300
commit7a311fe30ee3c4a4de0149822b0670f612eb4a67 (patch)
treeaacf08a74bf2214c17d6de7c5edaa1a6da8d9eec /indra/newview/lldynamictexture.cpp
parent6666fdb5d6f52df3d68bed35a4ad05139f49f93c (diff)
parentd7f1c88c35849e56f5b352f13c16a08467d1533b (diff)
Merge branch 'master' into DRTVWR-497
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
-rw-r--r--indra/newview/lldynamictexture.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp
index 8ef0dd2865..1e8c57ac6a 100644
--- a/indra/newview/lldynamictexture.cpp
+++ b/indra/newview/lldynamictexture.cpp
@@ -129,7 +129,7 @@ void LLViewerDynamicTexture::preRender(BOOL clear_depth)
llassert(mFullHeight <= 512);
llassert(mFullWidth <= 512);
- if (gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI)
+ if (gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete())
{ //using offscreen render target, just use the bottom left corner
mOrigin.set(0, 0);
}
@@ -216,11 +216,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
return TRUE;
}
- bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI;
+ bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete();
if (use_fbo)
{
- gPipeline.mWaterDis.bindTarget();
+ gPipeline.mBake.bindTarget();
+ gPipeline.mBake.clear();
}
LLGLSLShader::bindNoShader();
@@ -240,6 +241,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
gDepthDirty = TRUE;
gGL.color4f(1,1,1,1);
+ dynamicTexture->setBoundTarget(use_fbo ? &gPipeline.mBake : nullptr);
dynamicTexture->preRender(); // Must be called outside of startRender()
result = FALSE;
if (dynamicTexture->render())
@@ -250,7 +252,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
}
gGL.flush();
LLVertexBuffer::unbind();
-
+ dynamicTexture->setBoundTarget(nullptr);
dynamicTexture->postRender(result);
}
}
@@ -258,9 +260,11 @@ BOOL LLViewerDynamicTexture::updateAllInstances()
if (use_fbo)
{
- gPipeline.mWaterDis.flush();
+ gPipeline.mBake.flush();
}
+ gGL.flush();
+
return ret;
}