summaryrefslogtreecommitdiff
path: root/indra/newview/llface.cpp
diff options
context:
space:
mode:
authorKitty Barnett <develop@catznip.com>2013-02-04 01:01:07 +0100
committerKitty Barnett <develop@catznip.com>2013-02-04 01:01:07 +0100
commitd149aea87c3214ea9510ea43a7e23e03cdcb27e6 (patch)
treefbda1184d646a86b63d5496fe64e9a7659788f1d /indra/newview/llface.cpp
parent0a99aadd7a9d5d5166ef4e581b935adc6fb034ea (diff)
parent132db13fb6bb6dd802d3ee000a10e91127403547 (diff)
Merged with viewer-dev-materials
Diffstat (limited to 'indra/newview/llface.cpp')
-rwxr-xr-xindra/newview/llface.cpp48
1 files changed, 46 insertions, 2 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp
index 605cb81c10..cd84815295 100755
--- a/indra/newview/llface.cpp
+++ b/indra/newview/llface.cpp
@@ -316,6 +316,48 @@ void LLFace::setTexture(LLViewerTexture* tex)
mTexture = tex ;
}
+void LLFace::setNormalMap(LLViewerTexture* tex)
+{
+ if(mNormalMap == tex)
+ {
+ return ;
+ }
+
+ if(mNormalMap.notNull())
+ {
+ mNormalMap->removeFace(this) ;
+ removeAtlas() ;
+ }
+
+ if(tex)
+ {
+ tex->addFace(this) ;
+ }
+
+ mNormalMap = tex ;
+}
+
+void LLFace::setSpecularMap(LLViewerTexture* tex)
+{
+ if(mSpecMap == tex)
+ {
+ return ;
+ }
+
+ if(mSpecMap.notNull())
+ {
+ mSpecMap->removeFace(this) ;
+ removeAtlas() ;
+ }
+
+ if(tex)
+ {
+ tex->addFace(this) ;
+ }
+
+ mSpecMap = tex ;
+}
+
void LLFace::dirtyTexture()
{
LLDrawable* drawablep = getDrawable();
@@ -2035,9 +2077,11 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume,
LLFastTimer t(FTM_FACE_GEOM_BINORMAL);
mVertexBuffer->getBinormalStrider(binorm, mGeomIndex, mGeomCount, map_range);
F32* binormals = (F32*) binorm.get();
-
+
+ mVObjp->getVolume()->genBinormals(f);
+
for (S32 i = 0; i < num_vertices; i++)
- {
+ {
LLVector4a binormal;
mat_normal.rotate(vf.mBinormals[i], binormal);
binormal.normalize3fast();