summaryrefslogtreecommitdiff
path: root/indra/newview/lltexlayer.cpp
diff options
context:
space:
mode:
authorNyx (Neal Orman) <nyx@lindenlab.com>2009-11-30 15:22:12 -0500
committerNyx (Neal Orman) <nyx@lindenlab.com>2009-11-30 15:22:12 -0500
commit4c90bcd5745ef84133651fd6394e9a786b7b6256 (patch)
treef4d734245173fbd8b4e8b1b39e1684ecb20889c3 /indra/newview/lltexlayer.cpp
parent4899fea00652d37b35cbc32ad6f2ca05a5cffd6b (diff)
parent467125856922a715b3a3b3d02ed108240b2ce95d (diff)
Automated merge with ssh://hg.lindenlab.com/tulla/avatar-pipeline-2-0/
--HG-- branch : avatar-pipeline
Diffstat (limited to 'indra/newview/lltexlayer.cpp')
-rw-r--r--indra/newview/lltexlayer.cpp47
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;
}