Possibly fixed pickmask (altcam+alpha issues). Uninitialized variables.

This commit is contained in:
Shyotl
2011-03-02 20:23:37 -06:00
parent 30b1bd7abb
commit 56b327ff97

View File

@@ -416,48 +416,58 @@ LLImageGL::~LLImageGL()
void LLImageGL::init(BOOL usemipmaps)
{
#ifdef DEBUG_MISS
mMissed = FALSE;
#endif
// keep these members in the same order as declared in llimagehl.h
// so that it is obvious by visual inspection if we forgot to
// init a field.
mPickMask = NULL;
mTextureState = NO_DELETE ;
mTextureMemory = 0;
mLastBindTime = 0.f;
mTextureMemory = 0;
mLastBindTime = 0.f;
mPickMask = NULL;
mPickMaskWidth = 0;
mPickMaskHeight = 0;
mUseMipMaps = usemipmaps;
mHasExplicitFormat = FALSE;
mAutoGenMips = FALSE;
mIsMask = FALSE;
mNeedsAlphaAndPickMask = TRUE ;
mAlphaStride = 0 ;
mAlphaOffset = 0 ;
mGLTextureCreated = FALSE ;
mTexName = 0;
mWidth = 0;
mHeight = 0;
mCurrentDiscardLevel = -1;
mTarget = GL_TEXTURE_2D;
mBindTarget = LLTexUnit::TT_TEXTURE;
mUseMipMaps = usemipmaps;
mHasMipMaps = false;
mAutoGenMips = FALSE;
mTexName = 0;
mIsResident = 0;
mIsResident = 0;
mComponents = 0;
mMaxDiscardLevel = MAX_DISCARD_LEVEL;
mTexOptionsDirty = true;
mAddressMode = LLTexUnit::TAM_WRAP;
mFilterOption = LLTexUnit::TFO_ANISOTROPIC;
mWidth = 0;
mHeight = 0;
mComponents = 0;
mMaxDiscardLevel = MAX_DISCARD_LEVEL;
mCurrentDiscardLevel = -1;
mDontDiscard = FALSE;
mFormatInternal = -1;
mFormatPrimary = (LLGLenum) 0;
mFormatType = GL_UNSIGNED_BYTE;
mFormatSwapBytes = FALSE;
mHasExplicitFormat = FALSE;
mGLTextureCreated = FALSE ;
#ifdef DEBUG_MISS
mMissed = FALSE;
#endif
mIsMask = FALSE;
mCategory = -1 ;
//LLTexture stuff
mDontDiscard = FALSE;
mTextureState = NO_DELETE ;
}
void LLImageGL::cleanup()