diff options
Diffstat (limited to 'linden/indra/newview/llworldmapview.cpp')
-rw-r--r-- | linden/indra/newview/llworldmapview.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp index 92d9588..3fd1d11 100644 --- a/linden/indra/newview/llworldmapview.cpp +++ b/linden/indra/newview/llworldmapview.cpp | |||
@@ -301,7 +301,7 @@ void LLWorldMapView::draw() | |||
301 | 301 | ||
302 | LLLocalClipRect clip(getLocalRect()); | 302 | LLLocalClipRect clip(getLocalRect()); |
303 | { | 303 | { |
304 | LLGLSNoTexture no_texture; | 304 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
305 | 305 | ||
306 | glMatrixMode(GL_MODELVIEW); | 306 | glMatrixMode(GL_MODELVIEW); |
307 | 307 | ||
@@ -377,7 +377,7 @@ void LLWorldMapView::draw() | |||
377 | 377 | ||
378 | // Draw using the texture. If we don't clamp we get artifact at | 378 | // Draw using the texture. If we don't clamp we get artifact at |
379 | // the edge. | 379 | // the edge. |
380 | LLViewerImage::bindTexture(current_image); | 380 | gGL.getTexUnit(0)->bind(current_image); |
381 | 381 | ||
382 | // Draw map image into RGB | 382 | // Draw map image into RGB |
383 | //gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); | 383 | //gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); |
@@ -385,7 +385,7 @@ void LLWorldMapView::draw() | |||
385 | gGL.setColorMask(true, false); | 385 | gGL.setColorMask(true, false); |
386 | gGL.color4f(1.f, 1.f, 1.f, layer_alpha); | 386 | gGL.color4f(1.f, 1.f, 1.f, layer_alpha); |
387 | 387 | ||
388 | gGL.begin(LLVertexBuffer::QUADS); | 388 | gGL.begin(LLRender::QUADS); |
389 | gGL.texCoord2f(0.0f, 1.0f); | 389 | gGL.texCoord2f(0.0f, 1.0f); |
390 | gGL.vertex3f(left, top, -1.0f); | 390 | gGL.vertex3f(left, top, -1.0f); |
391 | gGL.texCoord2f(0.0f, 0.0f); | 391 | gGL.texCoord2f(0.0f, 0.0f); |
@@ -401,7 +401,7 @@ void LLWorldMapView::draw() | |||
401 | gGL.setColorMask(false, true); | 401 | gGL.setColorMask(false, true); |
402 | gGL.color4f(1.f, 1.f, 1.f, 1.f); | 402 | gGL.color4f(1.f, 1.f, 1.f, 1.f); |
403 | 403 | ||
404 | gGL.begin(LLVertexBuffer::QUADS); | 404 | gGL.begin(LLRender::QUADS); |
405 | gGL.texCoord2f(0.0f, 1.0f); | 405 | gGL.texCoord2f(0.0f, 1.0f); |
406 | gGL.vertex2f(left, top); | 406 | gGL.vertex2f(left, top); |
407 | gGL.texCoord2f(0.0f, 0.0f); | 407 | gGL.texCoord2f(0.0f, 0.0f); |
@@ -434,7 +434,7 @@ void LLWorldMapView::draw() | |||
434 | if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull()) | 434 | if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull()) |
435 | { | 435 | { |
436 | info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE); | 436 | info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE); |
437 | info->mOverlayImage->bind(0); | 437 | gGL.getTexUnit(0)->bind(info->mOverlayImage.get()); |
438 | info->mOverlayImage->setClamp(TRUE, TRUE); | 438 | info->mOverlayImage->setClamp(TRUE, TRUE); |
439 | } | 439 | } |
440 | 440 | ||
@@ -536,13 +536,13 @@ void LLWorldMapView::draw() | |||
536 | // Draw using the texture. If we don't clamp we get artifact at | 536 | // Draw using the texture. If we don't clamp we get artifact at |
537 | // the edge. | 537 | // the edge. |
538 | LLGLSUIDefault gls_ui; | 538 | LLGLSUIDefault gls_ui; |
539 | LLViewerImage::bindTexture(simimage); | 539 | gGL.getTexUnit(0)->bind(simimage); |
540 | 540 | ||
541 | gGL.setSceneBlendType(LLRender::BT_ALPHA); | 541 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
542 | F32 alpha = sim_alpha * info->mAlpha; | 542 | F32 alpha = sim_alpha * info->mAlpha; |
543 | gGL.color4f(1.f, 1.0f, 1.0f, alpha); | 543 | gGL.color4f(1.f, 1.0f, 1.0f, alpha); |
544 | 544 | ||
545 | gGL.begin(LLVertexBuffer::QUADS); | 545 | gGL.begin(LLRender::QUADS); |
546 | gGL.texCoord2f(0.f, 1.f); | 546 | gGL.texCoord2f(0.f, 1.f); |
547 | gGL.vertex3f(left, top, 0.f); | 547 | gGL.vertex3f(left, top, 0.f); |
548 | gGL.texCoord2f(0.f, 0.f); | 548 | gGL.texCoord2f(0.f, 0.f); |
@@ -555,9 +555,9 @@ void LLWorldMapView::draw() | |||
555 | 555 | ||
556 | if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->getHasGLTexture()) | 556 | if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->getHasGLTexture()) |
557 | { | 557 | { |
558 | LLViewerImage::bindTexture(overlayimage); | 558 | gGL.getTexUnit(0)->bind(overlayimage); |
559 | gGL.color4f(1.f, 1.f, 1.f, alpha); | 559 | gGL.color4f(1.f, 1.f, 1.f, alpha); |
560 | gGL.begin(LLVertexBuffer::QUADS); | 560 | gGL.begin(LLRender::QUADS); |
561 | gGL.texCoord2f(0.f, 1.f); | 561 | gGL.texCoord2f(0.f, 1.f); |
562 | gGL.vertex3f(left, top, -0.5f); | 562 | gGL.vertex3f(left, top, -0.5f); |
563 | gGL.texCoord2f(0.f, 0.f); | 563 | gGL.texCoord2f(0.f, 0.f); |
@@ -577,8 +577,8 @@ void LLWorldMapView::draw() | |||
577 | gGL.setColorMask(false, true); | 577 | gGL.setColorMask(false, true); |
578 | gGL.color4f(1.f, 1.f, 1.f, 1.f); | 578 | gGL.color4f(1.f, 1.f, 1.f, 1.f); |
579 | 579 | ||
580 | LLGLSNoTexture gls_no_texture; | 580 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
581 | gGL.begin(LLVertexBuffer::QUADS); | 581 | gGL.begin(LLRender::QUADS); |
582 | gGL.vertex2f(left, top); | 582 | gGL.vertex2f(left, top); |
583 | gGL.vertex2f(left, bottom); | 583 | gGL.vertex2f(left, bottom); |
584 | gGL.vertex2f(right, bottom); | 584 | gGL.vertex2f(right, bottom); |
@@ -596,8 +596,8 @@ void LLWorldMapView::draw() | |||
596 | gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA); | 596 | gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA); |
597 | gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); | 597 | gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); |
598 | 598 | ||
599 | LLGLSNoTexture gls_no_texture; | 599 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
600 | gGL.begin(LLVertexBuffer::QUADS); | 600 | gGL.begin(LLRender::QUADS); |
601 | gGL.vertex2f(left, top); | 601 | gGL.vertex2f(left, top); |
602 | gGL.vertex2f(left, bottom); | 602 | gGL.vertex2f(left, bottom); |
603 | gGL.vertex2f(right, bottom); | 603 | gGL.vertex2f(right, bottom); |
@@ -612,9 +612,9 @@ void LLWorldMapView::draw() | |||
612 | { | 612 | { |
613 | gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); | 613 | gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); |
614 | 614 | ||
615 | LLGLSNoTexture gls_no_texture; | 615 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
616 | gGL.color3f(1.f, 0.f, 0.f); | 616 | gGL.color3f(1.f, 0.f, 0.f); |
617 | gGL.begin(LLVertexBuffer::LINES); | 617 | gGL.begin(LLRender::LINES); |
618 | gGL.vertex2f(left, top); | 618 | gGL.vertex2f(left, top); |
619 | gGL.vertex2f(right, bottom); | 619 | gGL.vertex2f(right, bottom); |
620 | gGL.vertex2f(left, bottom); | 620 | gGL.vertex2f(left, bottom); |
@@ -683,7 +683,7 @@ void LLWorldMapView::draw() | |||
683 | // Draw background rectangle | 683 | // Draw background rectangle |
684 | LLGLSUIDefault gls_ui; | 684 | LLGLSUIDefault gls_ui; |
685 | { | 685 | { |
686 | LLGLSNoTexture gls_no_texture; | 686 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
687 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); | 687 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); |
688 | gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA); | 688 | gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA); |
689 | gGL.color4fv( mBackgroundColor.mV ); | 689 | gGL.color4fv( mBackgroundColor.mV ); |
@@ -969,7 +969,7 @@ void LLWorldMapView::drawFrustum() | |||
969 | F32 ctr_x = getRect().getWidth() * 0.5f + sPanX; | 969 | F32 ctr_x = getRect().getWidth() * 0.5f + sPanX; |
970 | F32 ctr_y = getRect().getHeight() * 0.5f + sPanY; | 970 | F32 ctr_y = getRect().getHeight() * 0.5f + sPanY; |
971 | 971 | ||
972 | LLGLSNoTexture gls_no_texture; | 972 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
973 | 973 | ||
974 | // Since we don't rotate the map, we have to rotate the frustum. | 974 | // Since we don't rotate the map, we have to rotate the frustum. |
975 | gGL.pushMatrix(); | 975 | gGL.pushMatrix(); |
@@ -978,7 +978,7 @@ void LLWorldMapView::drawFrustum() | |||
978 | 978 | ||
979 | // Draw triangle with more alpha in far pixels to make it | 979 | // Draw triangle with more alpha in far pixels to make it |
980 | // fade out in distance. | 980 | // fade out in distance. |
981 | gGL.begin( LLVertexBuffer::TRIANGLES ); | 981 | gGL.begin( LLRender::TRIANGLES ); |
982 | gGL.color4f(1.f, 1.f, 1.f, 0.25f); | 982 | gGL.color4f(1.f, 1.f, 1.f, 0.25f); |
983 | gGL.vertex2f( 0, 0 ); | 983 | gGL.vertex2f( 0, 0 ); |
984 | 984 | ||
@@ -1184,11 +1184,11 @@ static void drawDot(F32 x_pixels, F32 y_pixels, | |||
1184 | F32 top = y_pixels + dot_radius; | 1184 | F32 top = y_pixels + dot_radius; |
1185 | F32 bottom = y_pixels - dot_radius; | 1185 | F32 bottom = y_pixels - dot_radius; |
1186 | 1186 | ||
1187 | LLGLSNoTexture gls_no_texture; | 1187 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
1188 | gGL.color4fv( color.mV ); | 1188 | gGL.color4fv( color.mV ); |
1189 | LLUI::setLineWidth(1.5f); | 1189 | LLUI::setLineWidth(1.5f); |
1190 | F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y | 1190 | F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y |
1191 | gGL.begin( LLVertexBuffer::LINES ); | 1191 | gGL.begin( LLRender::LINES ); |
1192 | gGL.vertex2f(center, top); | 1192 | gGL.vertex2f(center, top); |
1193 | gGL.vertex2f(left, h_bar); | 1193 | gGL.vertex2f(left, h_bar); |
1194 | gGL.vertex2f(right, h_bar); | 1194 | gGL.vertex2f(right, h_bar); |