diff options
| author | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-08-01 14:07:24 -0700 |
|---|---|---|
| committer | simon@Simon-PC.lindenlab.com <simon@Simon-PC.lindenlab.com> | 2012-08-01 14:07:24 -0700 |
| commit | b7555a3309bda8e9689627901051aa90fcb7be34 (patch) | |
| tree | bbb84478c302539f434bab7a620fe23456926236 /indra/newview/llface.cpp | |
| parent | 62379fd7628afa5ce1b104ff66b26821ce740c29 (diff) | |
| parent | 92a0db2a4f5397067e087068f736181e618e9c0a (diff) | |
Merge back viewer-lion, which has viewer-development and down-stream fixes
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 { |
