diff options
author | Callum Prentice <callum@lindenlab.com> | 2010-01-20 15:30:07 -0800 |
---|---|---|
committer | Callum Prentice <callum@lindenlab.com> | 2010-01-20 15:30:07 -0800 |
commit | 8aadfb1cb63a9527835c6c5127d041d924455505 (patch) | |
tree | 3fd5f231cae133ec25f0d0d4bf9eda53d0d4c0e4 /indra/llrender/llimagegl.cpp | |
parent | 622f8b59ceb286f955351b6185a98919f03ed136 (diff) | |
parent | 20af2d325a4340aca997efbea752849e9f15d041 (diff) |
Merge with tip
Diffstat (limited to 'indra/llrender/llimagegl.cpp')
-rw-r--r-- | indra/llrender/llimagegl.cpp | 69 |
1 files changed, 38 insertions, 31 deletions
diff --git a/indra/llrender/llimagegl.cpp b/indra/llrender/llimagegl.cpp index f8d7ea00e0..d873005fd9 100644 --- a/indra/llrender/llimagegl.cpp +++ b/indra/llrender/llimagegl.cpp @@ -428,49 +428,56 @@ 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. + + mTextureMemory = 0; + mLastBindTime = 0.f; + + mPickMask = NULL; + mUseMipMaps = usemipmaps; + mHasExplicitFormat = FALSE; + mAutoGenMips = FALSE; + + mIsMask = FALSE; + mNeedsAlphaAndPickMask = TRUE ; + mAlphaStride = 0 ; + mAlphaOffset = 0 ; + + mGLTextureCreated = FALSE ; + mTexName = 0; + mWidth = 0; + mHeight = 0; + mCurrentDiscardLevel = -1; - mPickMask = NULL; - mTextureMemory = 0; - mLastBindTime = 0.f; + mDiscardLevelInAtlas = -1 ; + mTexelsInAtlas = 0 ; + mTexelsInGLTexture = 0 ; - mTarget = GL_TEXTURE_2D; - mBindTarget = LLTexUnit::TT_TEXTURE; - mUseMipMaps = usemipmaps; - mHasMipMaps = false; - mAutoGenMips = FALSE; - mTexName = 0; - mIsResident = 0; + mTarget = GL_TEXTURE_2D; + mBindTarget = LLTexUnit::TT_TEXTURE; + mHasMipMaps = false; + + 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; mFormatInternal = -1; mFormatPrimary = (LLGLenum) 0; mFormatType = GL_UNSIGNED_BYTE; mFormatSwapBytes = FALSE; - mHasExplicitFormat = FALSE; - - mGLTextureCreated = FALSE ; - mIsMask = FALSE; - mCategory = -1 ; - mAlphaStride = 0 ; - mAlphaOffset = 0 ; - mNeedsAlphaAndPickMask = TRUE ; +#ifdef DEBUG_MISS + mMissed = FALSE; +#endif - mDiscardLevelInAtlas = -1 ; - mTexelsInAtlas = 0 ; - mTexelsInGLTexture = 0 ; + mCategory = -1; } void LLImageGL::cleanup() @@ -1669,7 +1676,7 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) } if (mFormatType != GL_UNSIGNED_BYTE || - mFormatPrimary != GL_RGBA) + mFormatPrimary != GL_RGBA) { //cannot generate a pick mask for this texture delete [] mPickMask; |