From 4ec55cdb5b52d69a998630b1468a64982e612d7a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 13:14:41 -0400 Subject: EXT-7504 WIP Force decloud after timeout using lower res textures Trivial change to texture debug readout. --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index edd9ae16a9..fc611fa9c8 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -2289,7 +2289,7 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Uploaded:%d ] [ Timer:%d ] %s", + std::string text = llformat("[ HiRes:%d LoRes:%d Done:%d ] [ Timer:%d ] %s", is_high_res, num_low_res, is_uploaded, upload_time, local_texture_info.c_str()); -- cgit v1.2.3 From f457eaf67d60c8e526ae19950e4cc67fa290c2bb Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:14:36 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view Added color, emphasis, and more information to texture view. --- indra/newview/lltexlayer.cpp | 11 +++++++---- indra/newview/lltexlayer.h | 9 +++++++-- indra/newview/lltextureview.cpp | 16 ++++++++++++++-- 3 files changed, 28 insertions(+), 8 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index fc611fa9c8..1847ebb456 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -317,7 +317,7 @@ BOOL LLTexLayerSetBuffer::render() return success; } -bool LLTexLayerSetBuffer::isInitialized(void) const +BOOL LLTexLayerSetBuffer::isInitialized(void) const { return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } @@ -2287,10 +2287,13 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const BOOL is_high_res = !mNeedsUpload; const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); - const BOOL is_uploaded = !mUploadPending; const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string text = llformat("[ HiRes:%d LoRes:%d Done:%d ] [ Timer:%d ] %s", - is_high_res, num_low_res, is_uploaded, + std::string status = "CREATING "; + if (mUploadPending) status = "UPLOADING"; + if (!mNeedsUpload) status = " DONE "; + std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", + status.c_str(), + is_high_res, num_low_res, upload_time, local_texture_info.c_str()); return text; diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index 821e718347..fa49b245bc 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -275,12 +275,15 @@ public: virtual void postRender(BOOL success); virtual BOOL render(); BOOL updateImmediate(); - bool isInitialized(void) const; + + BOOL isInitialized(void) const; + BOOL uploadPending() const { return mUploadPending; } + BOOL uploadNeeded() const { return mNeedsUpload; } + /*virtual*/ BOOL needsRender(); void requestUpdate(); void requestUpload(); void cancelUpload(); - BOOL uploadPending() const { return mUploadPending; } BOOL render(S32 x, S32 y, S32 width, S32 height); void readBackAndUpload(); static void onTextureUploadComplete(const LLUUID& uuid, @@ -290,6 +293,8 @@ public: const std::string dumpTextureInfo() const; virtual void restoreGLTexture(); virtual void destroyGLTexture(); + + protected: void pushProjection() const; void popProjection() const; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 377449cc8b..9a946f4631 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -421,7 +421,6 @@ void LLAvatarTexBar::draw() //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; - LLColor4 text_color(1.f, 1.f, 1.f, 1.f); LLColor4 color; U32 line_num = 1; @@ -434,6 +433,17 @@ void LLAvatarTexBar::draw() if (!layerset) continue; const LLTexLayerSetBuffer *layerset_buffer = layerset->getComposite(); if (!layerset_buffer) continue; + + LLColor4 text_color = LLColor4::white; + + if (layerset_buffer->uploadNeeded()) + { + text_color = LLColor4::red; + } + if (layerset_buffer->uploadPending()) + { + text_color = LLColor4::magenta; + } std::string text = layerset_buffer->dumpTextureInfo(); LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num, text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); @@ -442,11 +452,13 @@ void LLAvatarTexBar::draw() const U32 texture_timeout = gSavedSettings.getU32("AvatarBakedTextureTimeout"); const U32 override_tex_discard_level = gSavedSettings.getU32("TextureDiscardLevel"); + LLColor4 header_color(1.f, 1.f, 1.f, 0.9f); + const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, - text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); } BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) -- cgit v1.2.3 From cfc98d7e374d0e9a236ed4e1bd78faeecfb5ba2a Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:17:13 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view Minor logic fix for status display. --- indra/newview/lltexlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 1847ebb456..871231a1f5 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -2289,8 +2289,8 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); std::string status = "CREATING "; - if (mUploadPending) status = "UPLOADING"; if (!mNeedsUpload) status = " DONE "; + if (mUploadPending) status = "UPLOADING"; std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", status.c_str(), is_high_res, num_low_res, -- cgit v1.2.3 From 36a10312a5c7d9dec7124cf969039ff5d1ac24c0 Mon Sep 17 00:00:00 2001 From: Loren Shih Date: Fri, 4 Jun 2010 14:56:24 -0400 Subject: EXT-7526 WIP Add baked texture information to texture view More informative logic added in to track when an upload is actually happening. Did some minor reformatting. --- indra/newview/lltexlayer.cpp | 25 +++++++++++++++++++++---- indra/newview/lltexlayer.h | 7 ++++--- indra/newview/lltextureview.cpp | 13 +++++++++---- indra/newview/llvoavatarself.cpp | 2 +- 4 files changed, 35 insertions(+), 12 deletions(-) (limited to 'indra') diff --git a/indra/newview/lltexlayer.cpp b/indra/newview/lltexlayer.cpp index 871231a1f5..d001d692a3 100644 --- a/indra/newview/lltexlayer.cpp +++ b/indra/newview/lltexlayer.cpp @@ -322,6 +322,21 @@ BOOL LLTexLayerSetBuffer::isInitialized(void) const return mGLTexturep.notNull() && mGLTexturep->isGLTextureCreated(); } +BOOL LLTexLayerSetBuffer::uploadPending() const +{ + return mUploadPending; +} + +BOOL LLTexLayerSetBuffer::uploadNeeded() const +{ + return mNeedsUpload; +} + +BOOL LLTexLayerSetBuffer::uploadInProgress() const +{ + return !mUploadID.isNull(); +} + BOOL LLTexLayerSetBuffer::isReadyToUpload() const { if (!mNeedsUpload) return FALSE; // Don't need to upload if we haven't requested one. @@ -2288,10 +2303,12 @@ const std::string LLTexLayerSetBuffer::dumpTextureInfo() const const U32 num_low_res = mNumLowresUploads; const U32 upload_time = (U32)mNeedsUploadTimer.getElapsedTimeF32(); const std::string local_texture_info = gAgentAvatarp->debugDumpLocalTextureDataInfo(mTexLayerSet); - std::string status = "CREATING "; - if (!mNeedsUpload) status = " DONE "; - if (mUploadPending) status = "UPLOADING"; - std::string text = llformat("[ %s ] [ HiRes:%d LoRes:%d ] [ Timer:%d ] %s", + + std::string status = "CREATING "; + if (!uploadNeeded()) status = "DONE "; + if (uploadInProgress()) status = "UPLOADING"; + + std::string text = llformat("[%s] [HiRes:%d LoRes:%d] [Elapsed:%d] %s", status.c_str(), is_high_res, num_low_res, upload_time, diff --git a/indra/newview/lltexlayer.h b/indra/newview/lltexlayer.h index fa49b245bc..cb2e1faaa6 100644 --- a/indra/newview/lltexlayer.h +++ b/indra/newview/lltexlayer.h @@ -277,8 +277,9 @@ public: BOOL updateImmediate(); BOOL isInitialized(void) const; - BOOL uploadPending() const { return mUploadPending; } - BOOL uploadNeeded() const { return mNeedsUpload; } + BOOL uploadPending() const; // We are expecting a new texture to be uploaded at some point + BOOL uploadNeeded() const; // We need to upload a new texture + BOOL uploadInProgress() const; // We have started uploading a new texture and are awaiting the result /*virtual*/ BOOL needsRender(); void requestUpdate(); @@ -305,7 +306,7 @@ private: LLTexLayerSet* const mTexLayerSet; BOOL mNeedsUpdate; // whether we need to update our baked textures BOOL mNeedsUpload; // whether we need to send our baked textures to the server - U32 mNumLowresUploads; // mumber of times we've sent a lowres version of our baked textures to the server + U32 mNumLowresUploads; // number of times we've sent a lowres version of our baked textures to the server BOOL mUploadPending; // whether we have received back the new baked textures LLUUID mUploadID; // the current upload process (null if none). Used to avoid overlaps, e.g. when the user rapidly makes two changes outside of Face Edit. static S32 sGLByteCount; diff --git a/indra/newview/lltextureview.cpp b/indra/newview/lltextureview.cpp index 9a946f4631..8ea4dbeb04 100644 --- a/indra/newview/lltextureview.cpp +++ b/indra/newview/lltextureview.cpp @@ -418,6 +418,7 @@ void LLAvatarTexBar::draw() const S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f); const S32 v_offset = 0; + const S32 l_offset = 3; //---------------------------------------------------------------------------- LLGLSUIDefault gls_ui; @@ -440,12 +441,12 @@ void LLAvatarTexBar::draw() { text_color = LLColor4::red; } - if (layerset_buffer->uploadPending()) + if (layerset_buffer->uploadInProgress()) { text_color = LLColor4::magenta; } std::string text = layerset_buffer->dumpTextureInfo(); - LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, v_offset + line_height*line_num, + LLFontGL::getFontMonospace()->renderUTF8(text, 0, l_offset, v_offset + line_height*line_num, text_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); line_num++; } @@ -457,7 +458,11 @@ void LLAvatarTexBar::draw() const std::string texture_timeout_str = texture_timeout ? llformat("%d",texture_timeout) : "Disabled"; const std::string override_tex_discard_level_str = override_tex_discard_level ? llformat("%d",override_tex_discard_level) : "Disabled"; std::string header_text = llformat("[ Timeout('AvatarBakedTextureTimeout'):%s ] [ LOD_Override('TextureDiscardLevel'):%s ]", texture_timeout_str.c_str(), override_tex_discard_level_str.c_str()); - LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, 0, v_offset + line_height*line_num, + LLFontGL::getFontMonospace()->renderUTF8(header_text, 0, l_offset, v_offset + line_height*line_num, + header_color, LLFontGL::LEFT, LLFontGL::TOP); //, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); + line_num++; + std::string section_text = "Avatar Textures Information:"; + LLFontGL::getFontMonospace()->renderUTF8(section_text, 0, 0, v_offset + line_height*line_num, header_color, LLFontGL::LEFT, LLFontGL::TOP, LLFontGL::BOLD, LLFontGL::DROP_SHADOW_SOFT); } @@ -469,7 +474,7 @@ BOOL LLAvatarTexBar::handleMouseDown(S32 x, S32 y, MASK mask) LLRect LLAvatarTexBar::getRequiredRect() { LLRect rect; - rect.mTop = 85; + rect.mTop = 100; if (!gSavedSettings.getBOOL("DebugAvatarRezTime")) rect.mTop = 0; return rect; } diff --git a/indra/newview/llvoavatarself.cpp b/indra/newview/llvoavatarself.cpp index e18b617120..4a04ec22c4 100644 --- a/indra/newview/llvoavatarself.cpp +++ b/indra/newview/llvoavatarself.cpp @@ -1884,7 +1884,7 @@ const std::string LLVOAvatarSelf::debugDumpLocalTextureDataInfo(const LLTexLayer if (layerset == mBakedTextureDatas[baked_index].mTexLayerSet) { const LLVOAvatarDictionary::BakedEntry *baked_dict = baked_iter->second; - text += llformat("[%d] '%s' ( ",baked_index, baked_dict->mName.c_str()); + text += llformat("%d-%s ( ",baked_index, baked_dict->mName.c_str()); for (texture_vec_t::const_iterator local_tex_iter = baked_dict->mLocalTextures.begin(); local_tex_iter != baked_dict->mLocalTextures.end(); ++local_tex_iter) -- cgit v1.2.3 From 6d840687a5306f9234444ed1bde1f6b877da3996 Mon Sep 17 00:00:00 2001 From: Monroe Linden Date: Fri, 4 Jun 2010 11:56:08 -0700 Subject: Fix for the last part of EXT-7366 (Need to change camera view of avatar previews on 'Front view' while editing shapes). Reviewed by Richard. --- indra/newview/llagentcamera.cpp | 1 - 1 file changed, 1 deletion(-) (limited to 'indra') diff --git a/indra/newview/llagentcamera.cpp b/indra/newview/llagentcamera.cpp index 47f290ad3b..644363826a 100644 --- a/indra/newview/llagentcamera.cpp +++ b/indra/newview/llagentcamera.cpp @@ -2360,7 +2360,6 @@ void LLAgentCamera::changeCameraToCustomizeAvatar(BOOL avatar_animate, BOOL came mAnimationDuration = gSavedSettings.getF32("ZoomTime"); } } - setFocusGlobal(LLVector3d::zero); } else { -- cgit v1.2.3