diff options
author | skolb <none@none> | 2009-12-01 13:34:16 -0800 |
---|---|---|
committer | skolb <none@none> | 2009-12-01 13:34:16 -0800 |
commit | 0ab6d36094cc52eea063f6d3b05262c111857f29 (patch) | |
tree | 95840e0bf49f744520649b030d4bd65b99275bcf /indra/newview/lltexlayer.cpp | |
parent | 6dd3f54924b57224298f6d76c766b403d165783f (diff) | |
parent | 6a888b653a1ee5ed0eeedd8994ff59652f2913aa (diff) |
Merge
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r-- | indra/newview/lltexlayer.cpp | 47 |
1 files changed, 31 insertions, 16 deletions
diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index a90f3ee181..8d3dcf8a99 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -689,24 +689,24 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) } } + LLGLSUIDefault gls_ui; + LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); + gGL.setColorMask(true, true); + + // clear buffer area to ensure we don't pick up UI elements + { + gGL.flush(); + LLGLDisable no_alpha(GL_ALPHA_TEST); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.color4f( 0.f, 0.f, 0.f, 1.f ); + + gl_rect_2d_simple( width, height ); + + gGL.flush(); + } + if (mIsVisible) { - LLGLSUIDefault gls_ui; - LLGLDepthTest gls_depth(GL_FALSE, GL_FALSE); - gGL.setColorMask(true, true); - - // clear buffer area to ensure we don't pick up UI elements - { - gGL.flush(); - LLGLDisable no_alpha(GL_ALPHA_TEST); - gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); - gGL.color4f( 0.f, 0.f, 0.f, 1.f ); - - gl_rect_2d_simple( width, height ); - - gGL.flush(); - } - // composite color layers for( layer_list_t::iterator iter = mLayerList.begin(); iter != mLayerList.end(); iter++ ) { @@ -723,6 +723,21 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) stop_glerror(); } + else + { + gGL.flush(); + + gGL.setSceneBlendType(LLRender::BT_REPLACE); + LLGLDisable no_alpha(GL_ALPHA_TEST); + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + gGL.color4f( 0.f, 0.f, 0.f, 0.f ); + + gl_rect_2d_simple( width, height ); + gGL.setSceneBlendType(LLRender::BT_ALPHA); + + gGL.flush(); + + } return success; } |