From 3750123e4382eca330018f7864e772964a9b4e9b Mon Sep 17 00:00:00 2001 From: Shyotl Date: Wed, 19 Dec 2012 19:08:10 -0600 Subject: [PATCH] Obsessive excessive clearing of glow rendertargets, as they still occasionally act weird. --- indra/newview/pipeline.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/indra/newview/pipeline.cpp b/indra/newview/pipeline.cpp index a2e64793c..1620f16b3 100644 --- a/indra/newview/pipeline.cpp +++ b/indra/newview/pipeline.cpp @@ -931,16 +931,26 @@ void LLPipeline::createGLBuffers() GLuint resX = gViewerWindow->getWorldViewWidthRaw(); GLuint resY = gViewerWindow->getWorldViewHeightRaw(); + + if (LLPipeline::sRenderGlow) { //screen space glow buffers const U32 glow_res = llmax(1, llmin(512, 1 << gSavedSettings.getS32("RenderGlowResolutionPow"))); + glClearColor(0,0,0,0); + gGL.setColorMask(true, true); for (U32 i = 0; i < 2; i++) { - mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE); + if(mGlow[i].allocate(512,glow_res,GL_RGBA,FALSE,FALSE)) + { + mGlow[i].bindTarget(); + mGlow[i].clear(); + mGlow[i].unbindTarget(); + } } + allocateScreenBuffer(resX,resY); }