diff options
| author | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-08-02 11:53:42 -0400 |
|---|---|---|
| committer | Brad Payne (Vir Linden) <vir@lindenlab.com> | 2012-08-02 11:53:42 -0400 |
| commit | 86d33e21a73e1f9db5b88b7169e32070c488bb48 (patch) | |
| tree | 6c09925f34719c43c543dc23c8095af7a2c392d9 /indra/newview/llface.cpp | |
| parent | 22b1223ea7d68b27304cdd713f8e8b491b654060 (diff) | |
| parent | b7555a3309bda8e9689627901051aa90fcb7be34 (diff) | |
merge
Diffstat (limited to 'indra/newview/llface.cpp')
| -rw-r--r-- | indra/newview/llface.cpp | 21 |
1 files changed, 17 insertions, 4 deletions
diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index 829e326ec9..0de81c7eb0 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -166,8 +166,7 @@ void LLFace::init(LLDrawable* drawablep, LLViewerObject* objp) //special value to indicate uninitialized position mIndicesIndex = 0xFFFFFFFF; - - mIndexInTex = 0; + mTexture = NULL; mTEOffset = -1; mTextureIndex = 255; @@ -316,7 +315,20 @@ void LLFace::setTexture(LLViewerTexture* tex) void LLFace::dirtyTexture() { - gPipeline.markTextured(getDrawable()); + LLDrawable* drawablep = getDrawable(); + + if (mVObjp.notNull() && mVObjp->getVolume() && + mTexture.notNull() && mTexture->getComponents() == 4) + { //dirty texture on an alpha object should be treated as an LoD update + LLVOVolume* vobj = drawablep->getVOVolume(); + if (vobj) + { + vobj->mLODChanged = TRUE; + } + gPipeline.markRebuild(drawablep, LLDrawable::REBUILD_VOLUME, FALSE); + } + + gPipeline.markTextured(drawablep); } void LLFace::switchTexture(LLViewerTexture* new_texture) @@ -1628,7 +1640,8 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, if (!do_xform) { LLFastTimer t(FTM_FACE_TEX_QUICK_NO_XFORM); - LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, num_vertices*2*sizeof(F32)); + S32 tc_size = (num_vertices*2*sizeof(F32)+0xF) & ~0xF; + LLVector4a::memcpyNonAliased16((F32*) tex_coords.get(), (F32*) vf.mTexCoords, tc_size); } else { |
