aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/lltextureview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-04-30 13:04:20 -0500
committerJacek Antonelli2009-04-30 13:07:16 -0500
commitca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e (patch)
tree8348301d0ac44a524f1819b777686bf086907d76 /linden/indra/newview/lltextureview.cpp
parentSecond Life viewer sources 1.22.11 (diff)
downloadmeta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.zip
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.gz
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.bz2
meta-impy-ca8149ca6d157eb4b5fc8ba0e5ba3a6e56f72e7e.tar.xz
Second Life viewer sources 1.23.0-RC
Diffstat (limited to 'linden/indra/newview/lltextureview.cpp')
-rw-r--r--linden/indra/newview/lltextureview.cpp35
1 files changed, 18 insertions, 17 deletions
diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp
index 14f62dd..f00d5e5 100644
--- a/linden/indra/newview/lltextureview.cpp
+++ b/linden/indra/newview/lltextureview.cpp
@@ -17,7 +17,8 @@
17 * There are special exceptions to the terms and conditions of the GPL as 17 * There are special exceptions to the terms and conditions of the GPL as
18 * it is applied to this Source Code. View the full text of the exception 18 * it is applied to this Source Code. View the full text of the exception
19 * in the file doc/FLOSS-exception.txt in this software distribution, or 19 * in the file doc/FLOSS-exception.txt in this software distribution, or
20 * online at http://secondlifegrid.net/programs/open_source/licensing/flossexception 20 * online at
21 * http://secondlifegrid.net/programs/open_source/licensing/flossexception
21 * 22 *
22 * By copying, modifying or distributing this software, you acknowledge 23 * By copying, modifying or distributing this software, you acknowledge
23 * that you have read and understood your obligations described above, 24 * that you have read and understood your obligations described above,
@@ -208,7 +209,7 @@ void LLTextureBar::draw()
208 mImagep->mFetchPriority); 209 mImagep->mFetchPriority);
209 } 210 }
210 211
211 LLFontGL::sMonospace->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(), 212 LLFontGL::getFontMonospace()->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(),
212 color, LLFontGL::LEFT, LLFontGL::TOP); 213 color, LLFontGL::LEFT, LLFontGL::TOP);
213 214
214 // State 215 // State
@@ -234,7 +235,7 @@ void LLTextureBar::draw()
234 { "MIS", LLColor4::red }, // LAST_STATE+4 235 { "MIS", LLColor4::red }, // LAST_STATE+4
235 { "---", LLColor4::white }, // LAST_STATE+5 236 { "---", LLColor4::white }, // LAST_STATE+5
236 }; 237 };
237 const S32 fetch_state_desc_size = (S32)(sizeof(fetch_state_desc)/sizeof(fetch_state_desc[0])); 238 const S32 fetch_state_desc_size = (S32)LL_ARRAY_SIZE(fetch_state_desc);
238 S32 state = 239 S32 state =
239 mImagep->mNeedsCreateTexture ? LAST_STATE+1 : 240 mImagep->mNeedsCreateTexture ? LAST_STATE+1 :
240 mImagep->mFullyLoaded ? LAST_STATE+2 : 241 mImagep->mFullyLoaded ? LAST_STATE+2 :
@@ -244,7 +245,7 @@ void LLTextureBar::draw()
244 mImagep->mFetchState; 245 mImagep->mFetchState;
245 state = llclamp(state,0,fetch_state_desc_size-1); 246 state = llclamp(state,0,fetch_state_desc_size-1);
246 247
247 LLFontGL::sMonospace->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, getRect().getHeight(), 248 LLFontGL::getFontMonospace()->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, getRect().getHeight(),
248 fetch_state_desc[state].color, 249 fetch_state_desc[state].color,
249 LLFontGL::LEFT, LLFontGL::TOP); 250 LLFontGL::LEFT, LLFontGL::TOP);
250 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); 251 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@@ -326,7 +327,7 @@ void LLTextureBar::draw()
326 // draw the packet data 327 // draw the packet data
327// { 328// {
328// std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets); 329// std::string num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets);
329// LLFontGL::sMonospace->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color, 330// LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color,
330// LLFontGL::LEFT, LLFontGL::TOP); 331// LLFontGL::LEFT, LLFontGL::TOP);
331// } 332// }
332 333
@@ -334,7 +335,7 @@ void LLTextureBar::draw()
334 { 335 {
335 std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(), 336 std::string num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(),
336 mImagep->getDiscardLevel(), mImagep->mTextureMemory); 337 mImagep->getDiscardLevel(), mImagep->mTextureMemory);
337 LLFontGL::sMonospace->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, 338 LLFontGL::getFontMonospace()->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color,
338 LLFontGL::LEFT, LLFontGL::TOP); 339 LLFontGL::LEFT, LLFontGL::TOP);
339 } 340 }
340 } 341 }
@@ -369,7 +370,7 @@ public:
369 : LLView(name, FALSE), 370 : LLView(name, FALSE),
370 mTextureView(texview) 371 mTextureView(texview)
371 { 372 {
372 S32 line_height = (S32)(LLFontGL::sMonospace->getLineHeight() + .5f); 373 S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
373 setRect(LLRect(0,0,100,line_height * 4)); 374 setRect(LLRect(0,0,100,line_height * 4));
374 } 375 }
375 376
@@ -388,7 +389,7 @@ void LLGLTexMemBar::draw()
388 S32 total_mem = (LLViewerImage::sTotalTextureMemory >> 20); 389 S32 total_mem = (LLViewerImage::sTotalTextureMemory >> 20);
389 S32 max_total_mem = LLViewerImage::sMaxTotalTextureMem; 390 S32 max_total_mem = LLViewerImage::sMaxTotalTextureMem;
390 F32 discard_bias = LLViewerImage::sDesiredDiscardBias; 391 F32 discard_bias = LLViewerImage::sDesiredDiscardBias;
391 S32 line_height = (S32)(LLFontGL::sMonospace->getLineHeight() + .5f); 392 S32 line_height = (S32)(LLFontGL::getFontMonospace()->getLineHeight() + .5f);
392 393
393 //---------------------------------------------------------------------------- 394 //----------------------------------------------------------------------------
394 LLGLSUIDefault gls_ui; 395 LLGLSUIDefault gls_ui;
@@ -402,7 +403,7 @@ void LLGLTexMemBar::draw()
402 max_bound_mem, 403 max_bound_mem,
403 discard_bias); 404 discard_bias);
404 405
405 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*3, 406 LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*3,
406 text_color, LLFontGL::LEFT, LLFontGL::TOP); 407 text_color, LLFontGL::LEFT, LLFontGL::TOP);
407 408
408 //---------------------------------------------------------------------------- 409 //----------------------------------------------------------------------------
@@ -469,40 +470,40 @@ void LLGLTexMemBar::draw()
469 LLImageRaw::sRawImageCount, LLViewerImage::sRawCount, LLViewerImage::sAuxCount, 470 LLImageRaw::sRawImageCount, LLViewerImage::sRawCount, LLViewerImage::sAuxCount,
470 gImageList.mCallbackList.size()); 471 gImageList.mCallbackList.size());
471 472
472 LLFontGL::sMonospace->renderUTF8(text, 0, 0, line_height*2, 473 LLFontGL::getFontMonospace()->renderUTF8(text, 0, 0, line_height*2,
473 text_color, LLFontGL::LEFT, LLFontGL::TOP); 474 text_color, LLFontGL::LEFT, LLFontGL::TOP);
474 475
475 S32 dx1 = 0; 476 S32 dx1 = 0;
476 if (LLAppViewer::getTextureFetch()->mDebugPause) 477 if (LLAppViewer::getTextureFetch()->mDebugPause)
477 { 478 {
478 LLFontGL::sMonospace->renderUTF8(std::string("!"), 0, title_x1, line_height, 479 LLFontGL::getFontMonospace()->renderUTF8(std::string("!"), 0, title_x1, line_height,
479 text_color, LLFontGL::LEFT, LLFontGL::TOP); 480 text_color, LLFontGL::LEFT, LLFontGL::TOP);
480 dx1 += 8; 481 dx1 += 8;
481 } 482 }
482 if (mTextureView->mFreezeView) 483 if (mTextureView->mFreezeView)
483 { 484 {
484 LLFontGL::sMonospace->renderUTF8(std::string("*"), 0, title_x1, line_height, 485 LLFontGL::getFontMonospace()->renderUTF8(std::string("*"), 0, title_x1, line_height,
485 text_color, LLFontGL::LEFT, LLFontGL::TOP); 486 text_color, LLFontGL::LEFT, LLFontGL::TOP);
486 dx1 += 8; 487 dx1 += 8;
487 } 488 }
488 if (mTextureView->mOrderFetch) 489 if (mTextureView->mOrderFetch)
489 { 490 {
490 LLFontGL::sMonospace->renderUTF8(title_string1b, 0, title_x1+dx1, line_height, 491 LLFontGL::getFontMonospace()->renderUTF8(title_string1b, 0, title_x1+dx1, line_height,
491 text_color, LLFontGL::LEFT, LLFontGL::TOP); 492 text_color, LLFontGL::LEFT, LLFontGL::TOP);
492 } 493 }
493 else 494 else
494 { 495 {
495 LLFontGL::sMonospace->renderUTF8(title_string1a, 0, title_x1+dx1, line_height, 496 LLFontGL::getFontMonospace()->renderUTF8(title_string1a, 0, title_x1+dx1, line_height,
496 text_color, LLFontGL::LEFT, LLFontGL::TOP); 497 text_color, LLFontGL::LEFT, LLFontGL::TOP);
497 } 498 }
498 499
499 LLFontGL::sMonospace->renderUTF8(title_string2, 0, title_x2, line_height, 500 LLFontGL::getFontMonospace()->renderUTF8(title_string2, 0, title_x2, line_height,
500 text_color, LLFontGL::LEFT, LLFontGL::TOP); 501 text_color, LLFontGL::LEFT, LLFontGL::TOP);
501 502
502 LLFontGL::sMonospace->renderUTF8(title_string3, 0, title_x3, line_height, 503 LLFontGL::getFontMonospace()->renderUTF8(title_string3, 0, title_x3, line_height,
503 text_color, LLFontGL::LEFT, LLFontGL::TOP); 504 text_color, LLFontGL::LEFT, LLFontGL::TOP);
504 505
505 LLFontGL::sMonospace->renderUTF8(title_string4, 0, title_x4, line_height, 506 LLFontGL::getFontMonospace()->renderUTF8(title_string4, 0, title_x4, line_height,
506 text_color, LLFontGL::LEFT, LLFontGL::TOP); 507 text_color, LLFontGL::LEFT, LLFontGL::TOP);
507} 508}
508 509