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/lltextureview.cpp | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltextureview.cpp') 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 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/lltextureview.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'indra/newview/lltextureview.cpp') 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; } -- cgit v1.2.3