diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/lltextureview.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/linden/indra/newview/lltextureview.cpp b/linden/indra/newview/lltextureview.cpp index 96a6127..09392f4 100644 --- a/linden/indra/newview/lltextureview.cpp +++ b/linden/indra/newview/lltextureview.cpp | |||
@@ -40,6 +40,7 @@ | |||
40 | #include "lllfsthread.h" | 40 | #include "lllfsthread.h" |
41 | #include "llui.h" | 41 | #include "llui.h" |
42 | #include "llimageworker.h" | 42 | #include "llimageworker.h" |
43 | #include "llglimmediate.h" | ||
43 | 44 | ||
44 | #include "llhoverview.h" | 45 | #include "llhoverview.h" |
45 | #include "llselectmgr.h" | 46 | #include "llselectmgr.h" |
@@ -210,7 +211,7 @@ void LLTextureBar::draw() | |||
210 | mImagep->mFetchPriority); | 211 | mImagep->mFetchPriority); |
211 | } | 212 | } |
212 | 213 | ||
213 | LLFontGL::sMonospace->renderUTF8(tex_str, 0, title_x1, mRect.getHeight(), | 214 | LLFontGL::sMonospace->renderUTF8(tex_str, 0, title_x1, getRect().getHeight(), |
214 | color, LLFontGL::LEFT, LLFontGL::TOP); | 215 | color, LLFontGL::LEFT, LLFontGL::TOP); |
215 | 216 | ||
216 | // State | 217 | // State |
@@ -246,7 +247,7 @@ void LLTextureBar::draw() | |||
246 | mImagep->mFetchState; | 247 | mImagep->mFetchState; |
247 | state = llclamp(state,0,fetch_state_desc_size-1); | 248 | state = llclamp(state,0,fetch_state_desc_size-1); |
248 | 249 | ||
249 | LLFontGL::sMonospace->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, mRect.getHeight(), | 250 | LLFontGL::sMonospace->renderUTF8(fetch_state_desc[state].desc, 0, title_x2, getRect().getHeight(), |
250 | fetch_state_desc[state].color, | 251 | fetch_state_desc[state].color, |
251 | LLFontGL::LEFT, LLFontGL::TOP); | 252 | LLFontGL::LEFT, LLFontGL::TOP); |
252 | LLGLSNoTexture gls_no_texture; | 253 | LLGLSNoTexture gls_no_texture; |
@@ -257,7 +258,7 @@ void LLTextureBar::draw() | |||
257 | left = bar_left; | 258 | left = bar_left; |
258 | right = left + bar_width; | 259 | right = left + bar_width; |
259 | 260 | ||
260 | glColor4f(0.f, 0.f, 0.f, 0.75f); | 261 | gGL.color4f(0.f, 0.f, 0.f, 0.75f); |
261 | gl_rect_2d(left, top, right, bottom); | 262 | gl_rect_2d(left, top, right, bottom); |
262 | 263 | ||
263 | F32 data_progress = mImagep->mDownloadProgress; | 264 | F32 data_progress = mImagep->mDownloadProgress; |
@@ -268,7 +269,7 @@ void LLTextureBar::draw() | |||
268 | right = left + llfloor(data_progress * (F32)bar_width); | 269 | right = left + llfloor(data_progress * (F32)bar_width); |
269 | if (right > left) | 270 | if (right > left) |
270 | { | 271 | { |
271 | glColor4f(0.f, 0.f, 1.f, 0.75f); | 272 | gGL.color4f(0.f, 0.f, 1.f, 0.75f); |
272 | gl_rect_2d(left, top, right, bottom); | 273 | gl_rect_2d(left, top, right, bottom); |
273 | } | 274 | } |
274 | } | 275 | } |
@@ -302,7 +303,7 @@ void LLTextureBar::draw() | |||
302 | if (last_event < 1.f) | 303 | if (last_event < 1.f) |
303 | { | 304 | { |
304 | clr.setAlpha(1.f - last_event); | 305 | clr.setAlpha(1.f - last_event); |
305 | glColor4fv(clr.mV); | 306 | gGL.color4fv(clr.mV); |
306 | gl_rect_2d(pip_x, top, pip_x + pip_width, bottom); | 307 | gl_rect_2d(pip_x, top, pip_x + pip_width, bottom); |
307 | } | 308 | } |
308 | pip_x += pip_width + pip_space; | 309 | pip_x += pip_width + pip_space; |
@@ -316,7 +317,7 @@ void LLTextureBar::draw() | |||
316 | { | 317 | { |
317 | clr = mImagep->getMissed() ? LLColor4::red : LLColor4::magenta1; | 318 | clr = mImagep->getMissed() ? LLColor4::red : LLColor4::magenta1; |
318 | clr.setAlpha(1.f - last_event); | 319 | clr.setAlpha(1.f - last_event); |
319 | glColor4fv(clr.mV); | 320 | gGL.color4fv(clr.mV); |
320 | gl_rect_2d(pip_x, top, pip_x + pip_width, bottom); | 321 | gl_rect_2d(pip_x, top, pip_x + pip_width, bottom); |
321 | } | 322 | } |
322 | } | 323 | } |
@@ -328,7 +329,7 @@ void LLTextureBar::draw() | |||
328 | // draw the packet data | 329 | // draw the packet data |
329 | // { | 330 | // { |
330 | // LLString num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets); | 331 | // LLString num_str = llformat("%3d/%3d", mImagep->mLastPacket+1, mImagep->mPackets); |
331 | // LLFontGL::sMonospace->renderUTF8(num_str, 0, bar_left + 100, mRect.getHeight(), color, | 332 | // LLFontGL::sMonospace->renderUTF8(num_str, 0, bar_left + 100, getRect().getHeight(), color, |
332 | // LLFontGL::LEFT, LLFontGL::TOP); | 333 | // LLFontGL::LEFT, LLFontGL::TOP); |
333 | // } | 334 | // } |
334 | 335 | ||
@@ -336,7 +337,7 @@ void LLTextureBar::draw() | |||
336 | { | 337 | { |
337 | LLString num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(), | 338 | LLString num_str = llformat("%3dx%3d (%d) %7d", mImagep->getWidth(), mImagep->getHeight(), |
338 | mImagep->getDiscardLevel(), mImagep->mTextureMemory); | 339 | mImagep->getDiscardLevel(), mImagep->mTextureMemory); |
339 | LLFontGL::sMonospace->renderUTF8(num_str, 0, title_x4, mRect.getHeight(), color, | 340 | LLFontGL::sMonospace->renderUTF8(num_str, 0, title_x4, getRect().getHeight(), color, |
340 | LLFontGL::LEFT, LLFontGL::TOP); | 341 | LLFontGL::LEFT, LLFontGL::TOP); |
341 | } | 342 | } |
342 | } | 343 | } |
@@ -422,7 +423,7 @@ void LLGLTexMemBar::draw() | |||
422 | 423 | ||
423 | LLGLSNoTexture gls_no_texture; | 424 | LLGLSNoTexture gls_no_texture; |
424 | 425 | ||
425 | glColor4f(0.5f, 0.5f, 0.5f, 0.75f); | 426 | gGL.color4f(0.5f, 0.5f, 0.5f, 0.75f); |
426 | gl_rect_2d(left, top, right, bottom); | 427 | gl_rect_2d(left, top, right, bottom); |
427 | 428 | ||
428 | 429 | ||
@@ -430,15 +431,15 @@ void LLGLTexMemBar::draw() | |||
430 | right = left + llfloor(bound_mem * bar_scale); | 431 | right = left + llfloor(bound_mem * bar_scale); |
431 | if (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) | 432 | if (bound_mem < llfloor(max_bound_mem * texmem_lower_bound_scale)) |
432 | { | 433 | { |
433 | glColor4f(0.f, 1.f, 0.f, 0.75f); | 434 | gGL.color4f(0.f, 1.f, 0.f, 0.75f); |
434 | } | 435 | } |
435 | else if (bound_mem < max_bound_mem) | 436 | else if (bound_mem < max_bound_mem) |
436 | { | 437 | { |
437 | glColor4f(1.f, 1.f, 0.f, 0.75f); | 438 | gGL.color4f(1.f, 1.f, 0.f, 0.75f); |
438 | } | 439 | } |
439 | else | 440 | else |
440 | { | 441 | { |
441 | glColor4f(1.f, 0.f, 0.f, 0.75f); | 442 | gGL.color4f(1.f, 0.f, 0.f, 0.75f); |
442 | } | 443 | } |
443 | gl_rect_2d(left, top, right, bottom); | 444 | gl_rect_2d(left, top, right, bottom); |
444 | 445 | ||
@@ -450,22 +451,20 @@ void LLGLTexMemBar::draw() | |||
450 | right = left + llfloor(total_mem * bar_scale); | 451 | right = left + llfloor(total_mem * bar_scale); |
451 | if (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) | 452 | if (total_mem < llfloor(max_total_mem * texmem_lower_bound_scale)) |
452 | { | 453 | { |
453 | glColor4f(0.f, 1.f, 0.f, 0.75f); | 454 | gGL.color4f(0.f, 1.f, 0.f, 0.75f); |
454 | } | 455 | } |
455 | else if (total_mem < max_total_mem) | 456 | else if (total_mem < max_total_mem) |
456 | { | 457 | { |
457 | glColor4f(1.f, 1.f, 0.f, 0.75f); | 458 | gGL.color4f(1.f, 1.f, 0.f, 0.75f); |
458 | } | 459 | } |
459 | else | 460 | else |
460 | { | 461 | { |
461 | glColor4f(1.f, 0.f, 0.f, 0.75f); | 462 | gGL.color4f(1.f, 0.f, 0.f, 0.75f); |
462 | } | 463 | } |
463 | gl_rect_2d(left, top, right, bottom); | 464 | gl_rect_2d(left, top, right, bottom); |
464 | 465 | ||
465 | //---------------------------------------------------------------------------- | 466 | //---------------------------------------------------------------------------- |
466 | 467 | ||
467 | LLGLEnable tex(GL_TEXTURE_2D); | ||
468 | |||
469 | text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d", | 468 | text = llformat("Textures: Count: %d Fetch: %d(%d) Pkts:%d(%d) Cache R/W: %d/%d LFS:%d IW:%d(%d) RAW:%d", |
470 | gImageList.getNumImages(), | 469 | gImageList.getNumImages(), |
471 | LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), | 470 | LLAppViewer::getTextureFetch()->getNumRequests(), LLAppViewer::getTextureFetch()->getNumDeletes(), |
@@ -727,7 +726,7 @@ void LLTextureView::draw() | |||
727 | mGLTexMemBar = new LLGLTexMemBar("gl texmem bar", this); | 726 | mGLTexMemBar = new LLGLTexMemBar("gl texmem bar", this); |
728 | addChild(mGLTexMemBar); | 727 | addChild(mGLTexMemBar); |
729 | 728 | ||
730 | reshape(mRect.getWidth(), mRect.getHeight(), TRUE); | 729 | reshape(getRect().getWidth(), getRect().getHeight(), TRUE); |
731 | 730 | ||
732 | /* | 731 | /* |
733 | count = gImageList.getNumImages(); | 732 | count = gImageList.getNumImages(); |
@@ -806,3 +805,4 @@ BOOL LLTextureView::handleKey(KEY key, MASK mask, BOOL called_from_parent) | |||
806 | return FALSE; | 805 | return FALSE; |
807 | } | 806 | } |
808 | 807 | ||
808 | |||