diff options
author | Graham Linden <graham@lindenlab.com> | 2019-07-16 14:12:37 -0700 |
---|---|---|
committer | Graham Linden <graham@lindenlab.com> | 2019-07-16 14:12:37 -0700 |
commit | dc7aa170b80bb7d3f7725b5bddce08ff2da5a7a7 (patch) | |
tree | 3af060312fac8222ba29628baf994c4d8c7afc58 /indra/newview/lldynamictexture.cpp | |
parent | 00590defe4f525229c392b6f345695a09ac6b679 (diff) |
SL-11610
Give bake its own RT to avoid issues with sharing the water distortion map.
Use glFinish to insure RTs will be complete.
Diffstat (limited to 'indra/newview/lldynamictexture.cpp')
-rw-r--r-- | indra/newview/lldynamictexture.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/lldynamictexture.cpp b/indra/newview/lldynamictexture.cpp index e1f41a9bd7..13d539b55f 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() && !gGLManager.mIsATI) { //using offscreen render target, just use the bottom left corner mOrigin.set(0, 0); } @@ -216,11 +216,12 @@ BOOL LLViewerDynamicTexture::updateAllInstances() return FALSE; } - bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mWaterDis.isComplete() && !gGLManager.mIsATI; + bool use_fbo = gGLManager.mHasFramebufferObject && gPipeline.mBake.isComplete() && !gGLManager.mIsATI; if (use_fbo) { - gPipeline.mWaterDis.bindTarget(); + gPipeline.mBake.bindTarget(); + gPipeline.mBake.clear(); } LLGLSLShader::bindNoShader(); @@ -240,7 +241,7 @@ BOOL LLViewerDynamicTexture::updateAllInstances() gDepthDirty = TRUE; gGL.color4f(1,1,1,1); - dynamicTexture->setBoundTarget(use_fbo ? &gPipeline.mWaterDis : nullptr); + dynamicTexture->setBoundTarget(use_fbo ? &gPipeline.mBake : nullptr); dynamicTexture->preRender(); // Must be called outside of startRender() result = FALSE; if (dynamicTexture->render()) @@ -257,9 +258,11 @@ BOOL LLViewerDynamicTexture::updateAllInstances() } } + glFinish(); + if (use_fbo) { - gPipeline.mWaterDis.flush(); + gPipeline.mBake.flush(); } gGL.flush(); |