summaryrefslogtreecommitdiff
path: root/indra/llrender
diff options
context:
space:
mode:
authorEric Tulla <tulla@lindenlab.com>2009-03-05 00:29:27 +0000
committerEric Tulla <tulla@lindenlab.com>2009-03-05 00:29:27 +0000
commit6db6d81b0a90fe7b48a3ccf64ba768e5772397c8 (patch)
treec3b9f11fbbfa29cd23b7de22543fd80285ad810d /indra/llrender
parentc0af95e18c57a7e0578df780697042f8a6221431 (diff)
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 .
Diffstat (limited to 'indra/llrender')
-rw-r--r--indra/llrender/llimagegl.cpp4
-rw-r--r--indra/llrender/llrender.cpp20
2 files changed, 14 insertions, 10 deletions
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.