diff options
author | Tonya Souther <tonya.souther@gmail.com> | 2013-01-31 11:40:16 -0600 |
---|---|---|
committer | Tonya Souther <tonya.souther@gmail.com> | 2013-01-31 11:40:16 -0600 |
commit | c1b110dd1d002b2bcb340dad9350b9717e1ca325 (patch) | |
tree | 6466c6c9a1481ef1ced85d5a1a22bdd0978a11ec /indra/newview/lldrawable.cpp | |
parent | d53f69b67f2aed05fd763932f25cc8b5c40ec774 (diff) | |
parent | d1b224158da7b2e6f7329eadfbd555e9941e1bf9 (diff) |
Merging in main repository.
Diffstat (limited to 'indra/newview/lldrawable.cpp')
-rw-r--r-- | indra/newview/lldrawable.cpp | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/indra/newview/lldrawable.cpp b/indra/newview/lldrawable.cpp index 4894d63e13..1ca2344c41 100644 --- a/indra/newview/lldrawable.cpp +++ b/indra/newview/lldrawable.cpp @@ -300,6 +300,53 @@ LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep) } +LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp) +{ + LLMemType mt(LLMemType::MTYPE_DRAWABLE); + + LLFace *face; + face = new LLFace(this, mVObjp); + + face->setTEOffset(mFaces.size()); + face->setTexture(texturep); + face->setNormalMap(normalp); + face->setPoolType(gPipeline.getPoolTypeFromTE(te, texturep)); + + mFaces.push_back(face); + + if (isState(UNLIT)) + { + face->setState(LLFace::FULLBRIGHT); + } + + return face; + +} + +LLFace* LLDrawable::addFace(const LLTextureEntry *te, LLViewerTexture *texturep, LLViewerTexture *normalp, LLViewerTexture *specularp) +{ + LLMemType mt(LLMemType::MTYPE_DRAWABLE); + + LLFace *face; + face = new LLFace(this, mVObjp); + + face->setTEOffset(mFaces.size()); + face->setTexture(texturep); + face->setNormalMap(normalp); + face->setSpecularMap(specularp); + face->setPoolType(gPipeline.getPoolTypeFromTE(te, texturep)); + + mFaces.push_back(face); + + if (isState(UNLIT)) + { + face->setState(LLFace::FULLBRIGHT); + } + + return face; + +} + void LLDrawable::setNumFaces(const S32 newFaces, LLFacePool *poolp, LLViewerTexture *texturep) { if (newFaces == (S32)mFaces.size()) |