summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolbump.cpp
diff options
context:
space:
mode:
authorDave Parks <davep@lindenlab.com>2010-05-04 00:45:28 -0500
committerDave Parks <davep@lindenlab.com>2010-05-04 00:45:28 -0500
commiteb283701afc7ecbe3009a9fb75be1dcb222a383b (patch)
treeffd5490ac1ee3706f70884eb3d582ed4bb006505 /indra/newview/lldrawpoolbump.cpp
parent58defe76b0eed6f773b961e8ba5cd3aeb856467a (diff)
Deferred pipeline integration of rigged attachments and cleanup.
Diffstat (limited to 'indra/newview/lldrawpoolbump.cpp')
-rw-r--r--indra/newview/lldrawpoolbump.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/indra/newview/lldrawpoolbump.cpp b/indra/newview/lldrawpoolbump.cpp
index 2f449fa42f..906615ade8 100644
--- a/indra/newview/lldrawpoolbump.cpp
+++ b/indra/newview/lldrawpoolbump.cpp
@@ -591,18 +591,37 @@ void LLDrawPoolBump::renderGroup(LLSpatialGroup* group, U32 type, U32 mask, BOOL
// static
BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
{
- LLViewerTexture* bump = NULL;
-
U8 bump_code = params.mBump;
+ return bindBumpMap(bump_code, params.mTexture, params.mVSize, channel);
+}
+
+//static
+BOOL LLDrawPoolBump::bindBumpMap(LLFace* face, S32 channel)
+{
+ const LLTextureEntry* te = face->getTextureEntry();
+ if (te)
+ {
+ U8 bump_code = te->getBumpmap();
+ return bindBumpMap(bump_code, face->getTexture(), face->getVirtualSize(), channel);
+ }
+
+ return FALSE;
+}
+
+//static
+BOOL LLDrawPoolBump::bindBumpMap(U8 bump_code, LLViewerTexture* texture, F32 vsize, S32 channel)
+{
//Note: texture atlas does not support bump texture now.
- LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(params.mTexture) ;
+ LLViewerFetchedTexture* tex = LLViewerTextureManager::staticCastToFetchedTexture(texture) ;
if(!tex)
{
//if the texture is not a fetched texture
return FALSE;
}
+ LLViewerTexture* bump = NULL;
+
switch( bump_code )
{
case BE_NO_BUMP:
@@ -616,7 +635,7 @@ BOOL LLDrawPoolBump::bindBumpMap(LLDrawInfo& params, S32 channel)
if( bump_code < LLStandardBumpmap::sStandardBumpmapCount )
{
bump = gStandardBumpmapList[bump_code].mImage;
- gBumpImageList.addTextureStats(bump_code, tex->getID(), params.mVSize);
+ gBumpImageList.addTextureStats(bump_code, tex->getID(), vsize);
}
break;
}