diff options
author | Oz Linden <oz@lindenlab.com> | 2013-02-04 09:38:06 -0500 |
---|---|---|
committer | Oz Linden <oz@lindenlab.com> | 2013-02-04 09:38:06 -0500 |
commit | 68ec77127b158f0abffb6160eb7d870c85b278ad (patch) | |
tree | ad43a05bb4a45449d27f4c077ef8ca653f35d7b9 /indra/newview/lldrawable.cpp | |
parent | 19233999edfd143d0e7f8e3743dc07455d206172 (diff) | |
parent | 7cc7ae873c5aeca9b5939176fb70677365e25395 (diff) |
merge tonyas loop fixes
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()) |