aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-12-01 17:39:58 -0600
committerJacek Antonelli2008-12-01 17:40:06 -0600
commit7abecb48babe6a6f09bf6692ba55076546cfced9 (patch)
tree8d18a88513fb97adf32c10aae78f4be1984942db /linden/indra/newview/lltextureview.cpp
parentSecond Life viewer sources 1.21.6 (diff)
downloadmeta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.zip
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.gz
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.bz2
meta-impy-7abecb48babe6a6f09bf6692ba55076546cfced9.tar.xz
Second Life viewer sources 1.22.0-RC
Diffstat (limited to 'linden/indra/newview/lltextureview.cpp')
-rw-r--r--linden/indra/newview/lltextureview.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp
index 49bc968..c5da2cf 100644
--- a/linden/indra/newview/lltextureview.cpp
+++ b/linden/indra/newview/lltextureview.cpp
@@ -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);