diff options
author | Steve Bennetts <steve@lindenlab.com> | 2009-11-06 12:20:52 -0800 |
---|---|---|
committer | Steve Bennetts <steve@lindenlab.com> | 2009-11-06 12:20:52 -0800 |
commit | 0db73b1ac58650bf681803c93767c64c3d908e15 (patch) | |
tree | cba28950adfcf3b8040f1bc7cf449ddab6379b85 /indra/llrender/llrender.cpp | |
parent | 5b5df4769773025978409590e14a807ea2790c84 (diff) | |
parent | afe6350160aa93323a6a5d8ef8c6206bffc337e0 (diff) |
merge
Diffstat (limited to 'indra/llrender/llrender.cpp')
-rw-r--r-- | indra/llrender/llrender.cpp | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index b74d824c9e..fc45df8153 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -179,7 +179,7 @@ void LLTexUnit::disable(void) } } -bool LLTexUnit::bind(LLTexture* texture, bool forceBind) +bool LLTexUnit::bind(LLTexture* texture, bool for_rendering, bool forceBind) { stop_glerror(); if (mIndex < 0) return false; @@ -198,9 +198,19 @@ bool LLTexUnit::bind(LLTexture* texture, bool forceBind) //if deleted, will re-generate it immediately texture->forceImmediateUpdate() ; + gl_tex->forceUpdateBindStats() ; return texture->bindDefaultImage(mIndex); } + //in audit, replace the selected texture by the default one. + if(gAuditTexture && for_rendering && LLImageGL::sCurTexPickSize > 0) + { + if(texture->getWidth() * texture->getHeight() == LLImageGL::sCurTexPickSize) + { + gl_tex->updateBindStats(gl_tex->mTextureMemory); + return bind(LLImageGL::sHighlightTexturep.get()); + } + } if ((mCurrTexture != gl_tex->getTexName()) || forceBind) { activate(); @@ -223,7 +233,7 @@ bool LLTexUnit::bind(LLTexture* texture, bool forceBind) return true; } -bool LLTexUnit::bind(LLImageGL* texture, bool forceBind) +bool LLTexUnit::bind(LLImageGL* texture, bool for_rendering, bool forceBind) { stop_glerror(); if (mIndex < 0) return false; @@ -260,6 +270,7 @@ bool LLTexUnit::bind(LLImageGL* texture, bool forceBind) setTextureFilteringOption(texture->mFilterOption); } } + return true; } |