From d0cc016d6268af11672b1895a325368eabc96c4a Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Tue, 27 Apr 2010 00:13:51 -0500 Subject: Stop z-fighting in glow pass. (transplanted from a1ec712ffcf5a8b21d2d441b348022fa8e4a44c2) --- indra/newview/lldrawpoolsimple.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/indra/newview/lldrawpoolsimple.cpp b/indra/newview/lldrawpoolsimple.cpp index ca7a1b47c2..c8e6f95ab6 100644 --- a/indra/newview/lldrawpoolsimple.cpp +++ b/indra/newview/lldrawpoolsimple.cpp @@ -55,6 +55,10 @@ void LLDrawPoolGlow::render(S32 pass) LLFastTimer t(FTM_RENDER_GLOW); LLGLEnable blend(GL_BLEND); LLGLDisable test(GL_ALPHA_TEST); + gGL.flush(); + /// Get rid of z-fighting with non-glow pass. + LLGLEnable polyOffset(GL_POLYGON_OFFSET_FILL); + glPolygonOffset(-1.0f, -1.0f); gGL.setSceneBlendType(LLRender::BT_ADD); U32 shader_level = LLViewerShaderMgr::instance()->getVertexShaderLevel(LLViewerShaderMgr::SHADER_OBJECT); -- cgit v1.2.3