From 6db6d81b0a90fe7b48a3ccf64ba768e5772397c8 Mon Sep 17 00:00:00 2001 From: Eric Tulla Date: Thu, 5 Mar 2009 00:29:27 +0000 Subject: Merging in Avatar Pipeline work for Viewer 1.23 (QAR-1272). No conflicts in the merge. Result of: svn merge -r113372:113479 $branches/avatar-pipeline/avatar-pipeline-merge-r113370 . --- indra/llrender/llimagegl.cpp | 4 +--- indra/llrender/llrender.cpp | 20 +++++++++++++------- 2 files changed, 14 insertions(+), 10 deletions(-) (limited to 'indra/llrender') diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index 307147798e..c784019cd9 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -510,10 +510,8 @@ void LLImageGL::setImage(const U8* data_in, BOOL data_hasmips) is_compressed = true; } - { // LLFastTimer t2(LLFastTimer::FTM_TEMP2); - llverify(gGL.getTexUnit(0)->bind(this)); - } + gGL.getTexUnit(0)->bind(this); if (mUseMipMaps) { diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index bee41f556e..ba95a19787 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -197,8 +197,8 @@ bool LLTexUnit::bind(LLImageGL* texture, bool forceBind) return texture->bindDefaultImage(mIndex); } - - if (texture != NULL && ((mCurrTexture != texture->getTexName()) || forceBind)) + + if ((mCurrTexture != texture->getTexName()) || forceBind) { activate(); enable(texture->getTarget()); @@ -213,9 +213,8 @@ bool LLTexUnit::bind(LLImageGL* texture, bool forceBind) setTextureAddressMode(texture->mAddressMode); setTextureFilteringOption(texture->mFilterOption); } - return true; } - return false; + return true; } bool LLTexUnit::bind(LLCubeMap* cubeMap) @@ -224,7 +223,13 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap) gGL.flush(); - if (cubeMap != NULL && mCurrTexture != cubeMap->mImages[0]->getTexName()) + if (cubeMap == NULL) + { + llwarns << "NULL LLTexUnit::bind cubemap" << llendl; + return false; + } + + if (mCurrTexture != cubeMap->mImages[0]->getTexName()) { if (gGLManager.mHasCubeMap && LLCubeMap::sUseCubeMaps) { @@ -244,10 +249,11 @@ bool LLTexUnit::bind(LLCubeMap* cubeMap) } else { - llwarns << "Using cube map without extension!" << llendl + llwarns << "Using cube map without extension!" << llendl; + return false; } } - return false; + return true; } // LLRenderTarget is unavailible on the mapserver since it uses FBOs. -- cgit v1.2.3