Skip to content
Snippets Groups Projects
Commit 4c91f454 authored by Tofu Linden's avatar Tofu Linden
Browse files

Clean up the llimage init-ordering and header comments, to make it clearer...

Clean up the llimage init-ordering and header comments, to make it clearer when we miss initializing a member.  No semantic change.
parent 9e8037f9
No related branches found
No related tags found
No related merge requests found
...@@ -428,49 +428,56 @@ LLImageGL::~LLImageGL() ...@@ -428,49 +428,56 @@ LLImageGL::~LLImageGL()
void LLImageGL::init(BOOL usemipmaps) void LLImageGL::init(BOOL usemipmaps)
{ {
#ifdef DEBUG_MISS // keep these members in the same order as declared in llimagehl.h
mMissed = FALSE; // so that it is obvious by visual inspection if we forgot to
#endif // 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; mDiscardLevelInAtlas = -1 ;
mTextureMemory = 0; mTexelsInAtlas = 0 ;
mLastBindTime = 0.f; mTexelsInGLTexture = 0 ;
mTarget = GL_TEXTURE_2D; mTarget = GL_TEXTURE_2D;
mBindTarget = LLTexUnit::TT_TEXTURE; mBindTarget = LLTexUnit::TT_TEXTURE;
mUseMipMaps = usemipmaps; mHasMipMaps = false;
mHasMipMaps = false;
mAutoGenMips = FALSE; mIsResident = 0;
mTexName = 0;
mIsResident = 0; mComponents = 0;
mMaxDiscardLevel = MAX_DISCARD_LEVEL;
mTexOptionsDirty = true; mTexOptionsDirty = true;
mAddressMode = LLTexUnit::TAM_WRAP; mAddressMode = LLTexUnit::TAM_WRAP;
mFilterOption = LLTexUnit::TFO_ANISOTROPIC; mFilterOption = LLTexUnit::TFO_ANISOTROPIC;
mWidth = 0;
mHeight = 0;
mComponents = 0;
mMaxDiscardLevel = MAX_DISCARD_LEVEL;
mCurrentDiscardLevel = -1;
mFormatInternal = -1; mFormatInternal = -1;
mFormatPrimary = (LLGLenum) 0; mFormatPrimary = (LLGLenum) 0;
mFormatType = GL_UNSIGNED_BYTE; mFormatType = GL_UNSIGNED_BYTE;
mFormatSwapBytes = FALSE; mFormatSwapBytes = FALSE;
mHasExplicitFormat = FALSE;
mGLTextureCreated = FALSE ;
mIsMask = FALSE; #ifdef DEBUG_MISS
mCategory = -1 ; mMissed = FALSE;
mAlphaStride = 0 ; #endif
mAlphaOffset = 0 ;
mNeedsAlphaAndPickMask = TRUE ;
mDiscardLevelInAtlas = -1 ; mCategory = -1;
mTexelsInAtlas = 0 ;
mTexelsInGLTexture = 0 ;
} }
void LLImageGL::cleanup() void LLImageGL::cleanup()
...@@ -1669,7 +1676,7 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in) ...@@ -1669,7 +1676,7 @@ void LLImageGL::updatePickMask(S32 width, S32 height, const U8* data_in)
} }
if (mFormatType != GL_UNSIGNED_BYTE || if (mFormatType != GL_UNSIGNED_BYTE ||
mFormatPrimary != GL_RGBA) mFormatPrimary != GL_RGBA)
{ {
//cannot generate a pick mask for this texture //cannot generate a pick mask for this texture
delete [] mPickMask; delete [] mPickMask;
......
...@@ -224,7 +224,7 @@ class LLImageGL : public LLRefCount ...@@ -224,7 +224,7 @@ class LLImageGL : public LLRefCount
bool mTexOptionsDirty; bool mTexOptionsDirty;
LLTexUnit::eTextureAddressMode mAddressMode; // Defaults to TAM_WRAP LLTexUnit::eTextureAddressMode mAddressMode; // Defaults to TAM_WRAP
LLTexUnit::eTextureFilterOptions mFilterOption; // Defaults to TFO_TRILINEAR LLTexUnit::eTextureFilterOptions mFilterOption; // Defaults to TFO_ANISOTROPIC
LLGLint mFormatInternal; // = GL internalformat LLGLint mFormatInternal; // = GL internalformat
LLGLenum mFormatPrimary; // = GL format (pixel data format) LLGLenum mFormatPrimary; // = GL format (pixel data format)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment