From ffc07281ad0525b2f9f4ed2000c5b8dc5df11f79 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Thu, 4 Nov 2010 16:30:59 -0400 Subject: SH-358 FIXED LLPipeline::renderBloom crash on Windows --- indra/newview/llviewerdisplay.cpp | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/indra/newview/llviewerdisplay.cpp b/indra/newview/llviewerdisplay.cpp index 6640e32cd2..137704e960 100644 --- a/indra/newview/llviewerdisplay.cpp +++ b/indra/newview/llviewerdisplay.cpp @@ -218,6 +218,16 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLMemType mt_render(LLMemType::MTYPE_RENDER); LLFastTimer t(FTM_RENDER); + if (gResizeScreenTexture) + { //skip render on frames where screen texture is resizing + gGL.flush(); + glClear(GL_COLOR_BUFFER_BIT); + gViewerWindow->mWindow->swapBuffers(); + gResizeScreenTexture = FALSE; + gPipeline.resizeScreenTexture(); + return; + } + if (LLPipeline::sRenderFrameTest) { send_agent_pause(); @@ -531,6 +541,7 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) gViewerWindow->setup3DViewport(); gPipeline.resetFrameStats(); // Reset per-frame statistics. + if (!gDisconnected) { LLMemType mt_du(LLMemType::MTYPE_DISPLAY_UPDATE); @@ -641,11 +652,11 @@ void display(BOOL rebuild, F32 zoom_factor, int subfield, BOOL for_snapshot) LLVertexBuffer::clientCopy(0.016); } - if (gResizeScreenTexture) - { - gResizeScreenTexture = FALSE; - gPipeline.resizeScreenTexture(); - } + //if (gResizeScreenTexture) + //{ + // gResizeScreenTexture = FALSE; + // gPipeline.resizeScreenTexture(); + //} gGL.setColorMask(true, true); glClearColor(0,0,0,0); -- cgit v1.2.3