summaryrefslogtreecommitdiff
path: root/indra/llrender/llimagegl.cpp
diff options
context:
space:
mode:
authorXiaohong Bao <bao@lindenlab.com>2009-07-16 23:51:22 +0000
committerXiaohong Bao <bao@lindenlab.com>2009-07-16 23:51:22 +0000
commit6a198eed3b784a0495e9710288bddcf73b44ae15 (patch)
tree8075adc5e517a23645867c8c194eac8d69240a04 /indra/llrender/llimagegl.cpp
parent4b1ce391d4e9cd4139ffef65cf9071bed7f888d0 (diff)
add a flag in LLImageGL to turn off calling LLImageGL::analyzeAlpha() and LLImageGL::updatePickMask().
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r--indra/llrender/llimagegl.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp
index a86a0aac23..311009064f 100644
--- a/indra/llrender/llimagegl.cpp
+++ b/indra/llrender/llimagegl.cpp
@@ -362,6 +362,7 @@ void LLImageGL::init(BOOL usemipmaps)
mGLTextureCreated = FALSE ;
mIsMask = FALSE;
+ mNeedsAlpahAndPickMask = TRUE ;
}
void LLImageGL::cleanup()
@@ -1356,6 +1357,11 @@ void LLImageGL::setTarget(const LLGLenum target, const LLTexUnit::eTextureType b
void LLImageGL::analyzeAlpha(const void* data_in, S32 w, S32 h)
{
+ if(!mNeedsAlpahAndPickMask)
+ {
+ return ;
+ }
+
if (mFormatType != GL_UNSIGNED_BYTE)
{
llwarns << "Cannot analyze alpha for image with format type " << std::hex << mFormatType << std::dec << llendl;
@@ -1416,6 +1422,11 @@ void LLImageGL::analyzeAlpha(const void* data_in, S32 w, S32 h)
//----------------------------------------------------------------------------
void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
{
+ if(!mNeedsAlpahAndPickMask)
+ {
+ return ;
+ }
+
if (mFormatType != GL_UNSIGNED_BYTE ||
mFormatPrimary != GL_RGBA)
{