aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/lltextureview.cpp21
1 files changed, 11 insertions, 10 deletions
diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp
index 49bc968..14f62dd 100644
--- a/linden/indra/newview/lltextureview.cpp
+++ b/linden/indra/newview/lltextureview.cpp
@@ -4,7 +4,7 @@
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$ 5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 * 6 *
7 * Copyright (c) 2001-2008, Linden Research, Inc. 7 * Copyright (c) 2001-2009, Linden Research, Inc.
8 * 8 *
9 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
10 * The source code in this file ("Source Code") is provided by Linden Lab 10 * The source code in this file ("Source Code") is provided by Linden Lab
@@ -162,7 +162,7 @@ void LLTextureBar::draw()
162 { 162 {
163 color = LLColor4::magenta; 163 color = LLColor4::magenta;
164 } 164 }
165 else if (mImagep->getDecodePriority() == 0.0f) 165 else if (mImagep->getDecodePriority() <= 0.0f)
166 { 166 {
167 color = LLColor4::grey; color[VALPHA] = .7f; 167 color = LLColor4::grey; color[VALPHA] = .7f;
168 } 168 }
@@ -247,7 +247,7 @@ void LLTextureBar::draw()
247 LLFontGL::sMonospace->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, getRect().getHeight(), 247 LLFontGL::sMonospace->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, getRect().getHeight(),
248 fetch_state_desc[state].color, 248 fetch_state_desc[state].color,
249 LLFontGL::LEFT, LLFontGL::TOP); 249 LLFontGL::LEFT, LLFontGL::TOP);
250 LLGLSNoTexture gls_no_texture; 250 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
251 251
252 // Draw the progress bar. 252 // Draw the progress bar.
253 S32 bar_width = 100; 253 S32 bar_width = 100;
@@ -383,9 +383,9 @@ private:
383 383
384void LLGLTexMemBar::draw() 384void LLGLTexMemBar::draw()
385{ 385{
386 S32 bound_mem = LLViewerImage::sBoundTextureMemory; 386 S32 bound_mem = (LLViewerImage::sBoundTextureMemory >> 20);
387 S32 max_bound_mem = LLViewerImage::sMaxBoundTextureMem; 387 S32 max_bound_mem = LLViewerImage::sMaxBoundTextureMem;
388 S32 total_mem = LLViewerImage::sTotalTextureMemory; 388 S32 total_mem = (LLViewerImage::sTotalTextureMemory >> 20);
389 S32 max_total_mem = LLViewerImage::sMaxTotalTextureMem; 389 S32 max_total_mem = LLViewerImage::sMaxTotalTextureMem;
390 F32 discard_bias = LLViewerImage::sDesiredDiscardBias; 390 F32 discard_bias = LLViewerImage::sDesiredDiscardBias;
391 S32 line_height = (S32)(LLFontGL::sMonospace->getLineHeight() + .5f); 391 S32 line_height = (S32)(LLFontGL::sMonospace->getLineHeight() + .5f);
@@ -396,10 +396,10 @@ void LLGLTexMemBar::draw()
396 396
397 std::string text; 397 std::string text;
398 text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Discard Bias: %.2f", 398 text = llformat("GL Tot: %d/%d MB Bound: %d/%d MB Discard Bias: %.2f",
399 total_mem/(1024*1024), 399 total_mem,
400 max_total_mem/(1024*1024), 400 max_total_mem,
401 bound_mem/(1024*1024), 401 bound_mem,
402 max_bound_mem/(1024*1024), 402 max_bound_mem,
403 discard_bias); 403 discard_bias);
404 404
405 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*3, 405 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*3,
@@ -415,7 +415,7 @@ void LLGLTexMemBar::draw()
415 415
416 F32 bar_scale = (F32)bar_width / (max_bound_mem * 1.5f); 416 F32 bar_scale = (F32)bar_width / (max_bound_mem * 1.5f);
417 417
418 LLGLSNoTexture gls_no_texture; 418 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
419 419
420 gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f); 420 gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f);
421 gl_rect_2d(left, top, right, bottom); 421 gl_rect_2d(left, top, right, bottom);
@@ -612,6 +612,7 @@ void LLTextureView::draw()
612 { 612 {
613 pri = imagep->getDecodePriority(); 613 pri = imagep->getDecodePriority();
614 } 614 }
615 pri = llclamp(pri, 0.0f, HIGH_PRIORITY-1.f);
615 616
616 if (sDebugImages.find(imagep) != sDebugImages.end()) 617 if (sDebugImages.find(imagep) != sDebugImages.end())
617 { 618 {