diff options
author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-10 16:09:42 -0500 |
---|---|---|
committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2010-02-10 16:09:42 -0500 |
commit | cc8b983398b66253d9331f3b9d6055f8b00998b9 (patch) | |
tree | 2c901fc33f6a390ef5b15c0446365b70074bbfa1 /indra/newview/llface.cpp | |
parent | 662ce9b1fd6fcdf817e8fd825ce2c35e4fa52ca3 (diff) | |
parent | da3ad612dffa422deabc5cc9afb775442f13bb45 (diff) |
merge
Diffstat (limited to 'indra/newview/llface.cpp')
-rw-r--r-- | indra/newview/llface.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 965ac1cad0..d12fd48ffb 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -301,7 +301,8 @@ void LLFace::switchTexture(LLViewerTexture* new_texture) if(!new_texture) { - llerrs << "Can not switch to a null texture." << llendl ; + llerrs << "Can not switch to a null texture." << llendl; + return; } new_texture->addTextureStats(mTexture->getMaxVirtualSize()) ; @@ -1040,17 +1041,20 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (rebuild_color) { - GLfloat alpha[4] = - { - 0.00f, - 0.25f, - 0.5f, - 0.75f - }; - - if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + if (tep) { - color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + GLfloat alpha[4] = + { + 0.00f, + 0.25f, + 0.5f, + 0.75f + }; + + if (getPoolType() != LLDrawPool::POOL_ALPHA && (LLPipeline::sRenderDeferred || (LLPipeline::sRenderBump && tep->getShiny()))) + { + color.mV[3] = U8 (alpha[tep->getShiny()] * 255); + } } } |