fix for EXT-1328: Alpha textures are not displayed correctly when first loaded.

to be reviewed by davep.
master
Xiaohong Bao 2009-10-12 05:32:52 +00:00
parent 18f1895bf2
commit c2ddcfae49
3 changed files with 11 additions and 2 deletions

View File

@ -280,6 +280,11 @@ void LLFace::setTexture(LLViewerTexture* tex)
mTexture = tex ;
}
void LLFace::dirtyTexture()
{
gPipeline.markTextured(getDrawable());
}
void LLFace::switchTexture(LLViewerTexture* new_texture)
{
if(mTexture == new_texture)
@ -295,7 +300,7 @@ void LLFace::switchTexture(LLViewerTexture* new_texture)
getViewerObject()->changeTEImage(mTEOffset, new_texture) ;
setTexture(new_texture) ;
gPipeline.markTextured(getDrawable());
dirtyTexture();
}
void LLFace::setTEOffset(const S32 te_offset)

View File

@ -90,6 +90,7 @@ public:
U16 getGeomStart() const { return mGeomIndex; } // index into draw pool
void setTexture(LLViewerTexture* tex) ;
void switchTexture(LLViewerTexture* new_texture);
void dirtyTexture();
LLXformMatrix* getXform() const { return mXform; }
BOOL hasGeometry() const { return mGeomCount > 0; }
LLVector3 getPositionAgent() const;

View File

@ -1315,7 +1315,10 @@ bool LLViewerFetchedTexture::updateFetch()
mComponents = mRawImage->getComponents();
mGLTexturep->setComponents(mComponents) ;
gTextureList.dirtyImage(this);
for(ll_face_list_t::iterator iter = mFaceList.begin(); iter != mFaceList.end(); ++iter)
{
(*iter)->dirtyTexture() ;
}
}
mIsRawImageValid = TRUE;
gTextureList.mCreateTextureList.insert(this);