diff options
author | Nyx Linden <nyx@lindenlab.com> | 2012-10-19 21:49:26 +0000 |
---|---|---|
committer | Nyx Linden <nyx@lindenlab.com> | 2012-10-19 21:49:26 +0000 |
commit | 3ac3f76fc36332e02551ed68c361c9808a8459e1 (patch) | |
tree | 99380df94911d297f2f2932961a481d96e1f0daf | |
parent | a55fff2c60eae842c99a95765b28e894edb9ddfb (diff) |
FIX: fixed broken baked texture rendering in lltexlayer, by enforcing correct gl state in lltexlayer.cpp
FIX: updated appearance utility source package
-rw-r--r-- | autobuild.xml | 4 | ||||
-rw-r--r-- | indra/llappearance/lltexlayer.cpp | 41 |
2 files changed, 26 insertions, 19 deletions
diff --git a/autobuild.xml b/autobuild.xml index cb86a21880..415858d274 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -1290,9 +1290,9 @@ <key>archive</key> <map> <key>hash</key> - <string>6d3959428402ef091863ef2a163ec629</string> + <string>57598f72d41ea0f3c2b4ed4804856636</string> <key>url</key> - <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/265640/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121006.tar.bz2</string> + <string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/266096/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121019.tar.bz2</string> </map> <key>name</key> <string>linux</string> diff --git a/indra/llappearance/lltexlayer.cpp b/indra/llappearance/lltexlayer.cpp index b8c8228f85..c44799f40d 100644 --- a/indra/llappearance/lltexlayer.cpp +++ b/indra/llappearance/lltexlayer.cpp @@ -148,6 +148,8 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet() bool use_shaders = LLGLSLShader::sNoFixedFunction; + LLGLEnable(GL_ALPHA_TEST); + if (use_shaders) { gAlphaMaskProgram.bind(); @@ -155,7 +157,7 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet() } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } LLVertexBuffer::unbind(); @@ -395,6 +397,7 @@ 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); + LLGLEnable(GL_ALPHA_TEST); // clear buffer area to ensure we don't pick up UI elements { @@ -406,7 +409,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -421,7 +424,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } @@ -455,7 +458,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -471,7 +474,7 @@ BOOL LLTexLayerSet::render( S32 x, S32 y, S32 width, S32 height ) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } @@ -564,6 +567,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, gGL.setColorMask(false, true); gGL.setSceneBlendType(LLRender::BT_REPLACE); + LLGLEnable(GL_ALPHA_TEST); // (Optionally) replace alpha with a single component image from a tga file. if (!info->mStaticAlphaFileName.empty()) @@ -592,7 +596,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -607,7 +611,7 @@ void LLTexLayerSet::renderAlphaMaskTextures(S32 x, S32 y, S32 width, S32 height, } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } @@ -1117,6 +1121,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) //gPipeline.disableLights(); stop_glerror(); glDisable(GL_LIGHTING); + glEnable(GL_ALPHA_TEST); stop_glerror(); bool use_shaders = LLGLSLShader::sNoFixedFunction; @@ -1211,7 +1216,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } } @@ -1232,7 +1237,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } @@ -1274,7 +1279,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); @@ -1286,7 +1291,7 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } @@ -1376,6 +1381,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) gGL.flush(); bool use_shaders = LLGLSLShader::sNoFixedFunction; + LLGLEnable(GL_ALPHA_TEST); if( !getInfo()->mStaticImageFileName.empty() ) { @@ -1389,7 +1395,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->bind(tex, TRUE); @@ -1401,7 +1407,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } } else @@ -1423,7 +1429,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } gGL.getTexUnit(0)->bind(tex); @@ -1436,7 +1442,7 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height) } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } } } @@ -1459,6 +1465,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC llassert( !mParamAlphaList.empty() ); bool use_shaders = LLGLSLShader::sNoFixedFunction; + LLGLEnable(GL_ALPHA_TEST); if (use_shaders) { @@ -1466,7 +1473,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } else { - glAlphaFunc(GL_GEQUAL, 0.0f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.0f); } @@ -1551,7 +1558,7 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC } else { - glAlphaFunc(GL_GEQUAL, 0.004f); + gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.004f); } LLGLSUIDefault gls_ui; |