aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llworldmapview.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2009-06-08 00:41:31 -0500
committerJacek Antonelli2009-06-08 00:41:31 -0500
commit0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa (patch)
tree2c93d38e210832e737d09cff7561373d8d5453b2 /linden/indra/newview/llworldmapview.cpp
parentImprudence 1.1.0 released. (diff)
parentUpdated Imprudence to be based on SL 1.22.11. (ChangeLog Entry) (diff)
downloadmeta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.zip
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.gz
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.bz2
meta-impy-0e5df9bdf8d6b418bb6e25615e2ffc922d0f02aa.tar.xz
Merge branch 'sl-base-1.22' into next
Conflicts: linden/indra/newview/English.lproj/InfoPlist.strings linden/indra/newview/skins/default/xui/en-us/panel_chat_bar.xml
Diffstat (limited to 'linden/indra/newview/llworldmapview.cpp')
-rw-r--r--linden/indra/newview/llworldmapview.cpp42
1 files changed, 21 insertions, 21 deletions
diff --git a/linden/indra/newview/llworldmapview.cpp b/linden/indra/newview/llworldmapview.cpp
index 0d266dd..244ee22 100644
--- a/linden/indra/newview/llworldmapview.cpp
+++ b/linden/indra/newview/llworldmapview.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
@@ -303,7 +303,7 @@ void LLWorldMapView::draw()
303 303
304 LLLocalClipRect clip(getLocalRect()); 304 LLLocalClipRect clip(getLocalRect());
305 { 305 {
306 LLGLSNoTexture no_texture; 306 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
307 307
308 glMatrixMode(GL_MODELVIEW); 308 glMatrixMode(GL_MODELVIEW);
309 309
@@ -379,7 +379,7 @@ void LLWorldMapView::draw()
379 379
380 // Draw using the texture. If we don't clamp we get artifact at 380 // Draw using the texture. If we don't clamp we get artifact at
381 // the edge. 381 // the edge.
382 LLViewerImage::bindTexture(current_image); 382 gGL.getTexUnit(0)->bind(current_image);
383 383
384 // Draw map image into RGB 384 // Draw map image into RGB
385 //gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); 385 //gGL.blendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
@@ -387,7 +387,7 @@ void LLWorldMapView::draw()
387 gGL.setColorMask(true, false); 387 gGL.setColorMask(true, false);
388 gGL.color4f(1.f, 1.f, 1.f, layer_alpha); 388 gGL.color4f(1.f, 1.f, 1.f, layer_alpha);
389 389
390 gGL.begin(LLVertexBuffer::QUADS); 390 gGL.begin(LLRender::QUADS);
391 gGL.texCoord2f(0.0f, 1.0f); 391 gGL.texCoord2f(0.0f, 1.0f);
392 gGL.vertex3f(left, top, -1.0f); 392 gGL.vertex3f(left, top, -1.0f);
393 gGL.texCoord2f(0.0f, 0.0f); 393 gGL.texCoord2f(0.0f, 0.0f);
@@ -403,7 +403,7 @@ void LLWorldMapView::draw()
403 gGL.setColorMask(false, true); 403 gGL.setColorMask(false, true);
404 gGL.color4f(1.f, 1.f, 1.f, 1.f); 404 gGL.color4f(1.f, 1.f, 1.f, 1.f);
405 405
406 gGL.begin(LLVertexBuffer::QUADS); 406 gGL.begin(LLRender::QUADS);
407 gGL.texCoord2f(0.0f, 1.0f); 407 gGL.texCoord2f(0.0f, 1.0f);
408 gGL.vertex2f(left, top); 408 gGL.vertex2f(left, top);
409 gGL.texCoord2f(0.0f, 0.0f); 409 gGL.texCoord2f(0.0f, 0.0f);
@@ -436,7 +436,7 @@ void LLWorldMapView::draw()
436 if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull()) 436 if (info->mOverlayImage.isNull() && info->mMapImageID[2].notNull())
437 { 437 {
438 info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE); 438 info->mOverlayImage = gImageList.getImage(info->mMapImageID[2], MIPMAP_TRUE, FALSE);
439 info->mOverlayImage->bind(0); 439 gGL.getTexUnit(0)->bind(info->mOverlayImage.get());
440 info->mOverlayImage->setClamp(TRUE, TRUE); 440 info->mOverlayImage->setClamp(TRUE, TRUE);
441 } 441 }
442 442
@@ -538,13 +538,13 @@ void LLWorldMapView::draw()
538 // Draw using the texture. If we don't clamp we get artifact at 538 // Draw using the texture. If we don't clamp we get artifact at
539 // the edge. 539 // the edge.
540 LLGLSUIDefault gls_ui; 540 LLGLSUIDefault gls_ui;
541 LLViewerImage::bindTexture(simimage); 541 gGL.getTexUnit(0)->bind(simimage);
542 542
543 gGL.setSceneBlendType(LLRender::BT_ALPHA); 543 gGL.setSceneBlendType(LLRender::BT_ALPHA);
544 F32 alpha = sim_alpha * info->mAlpha; 544 F32 alpha = sim_alpha * info->mAlpha;
545 gGL.color4f(1.f, 1.0f, 1.0f, alpha); 545 gGL.color4f(1.f, 1.0f, 1.0f, alpha);
546 546
547 gGL.begin(LLVertexBuffer::QUADS); 547 gGL.begin(LLRender::QUADS);
548 gGL.texCoord2f(0.f, 1.f); 548 gGL.texCoord2f(0.f, 1.f);
549 gGL.vertex3f(left, top, 0.f); 549 gGL.vertex3f(left, top, 0.f);
550 gGL.texCoord2f(0.f, 0.f); 550 gGL.texCoord2f(0.f, 0.f);
@@ -557,9 +557,9 @@ void LLWorldMapView::draw()
557 557
558 if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->getHasGLTexture()) 558 if (gSavedSettings.getBOOL("MapShowLandForSale") && overlayimage && overlayimage->getHasGLTexture())
559 { 559 {
560 LLViewerImage::bindTexture(overlayimage); 560 gGL.getTexUnit(0)->bind(overlayimage);
561 gGL.color4f(1.f, 1.f, 1.f, alpha); 561 gGL.color4f(1.f, 1.f, 1.f, alpha);
562 gGL.begin(LLVertexBuffer::QUADS); 562 gGL.begin(LLRender::QUADS);
563 gGL.texCoord2f(0.f, 1.f); 563 gGL.texCoord2f(0.f, 1.f);
564 gGL.vertex3f(left, top, -0.5f); 564 gGL.vertex3f(left, top, -0.5f);
565 gGL.texCoord2f(0.f, 0.f); 565 gGL.texCoord2f(0.f, 0.f);
@@ -579,8 +579,8 @@ void LLWorldMapView::draw()
579 gGL.setColorMask(false, true); 579 gGL.setColorMask(false, true);
580 gGL.color4f(1.f, 1.f, 1.f, 1.f); 580 gGL.color4f(1.f, 1.f, 1.f, 1.f);
581 581
582 LLGLSNoTexture gls_no_texture; 582 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
583 gGL.begin(LLVertexBuffer::QUADS); 583 gGL.begin(LLRender::QUADS);
584 gGL.vertex2f(left, top); 584 gGL.vertex2f(left, top);
585 gGL.vertex2f(left, bottom); 585 gGL.vertex2f(left, bottom);
586 gGL.vertex2f(right, bottom); 586 gGL.vertex2f(right, bottom);
@@ -598,8 +598,8 @@ void LLWorldMapView::draw()
598 gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA); 598 gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_SOURCE_ALPHA);
599 gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f); 599 gGL.color4f(0.2f, 0.0f, 0.0f, 0.4f);
600 600
601 LLGLSNoTexture gls_no_texture; 601 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
602 gGL.begin(LLVertexBuffer::QUADS); 602 gGL.begin(LLRender::QUADS);
603 gGL.vertex2f(left, top); 603 gGL.vertex2f(left, top);
604 gGL.vertex2f(left, bottom); 604 gGL.vertex2f(left, bottom);
605 gGL.vertex2f(right, bottom); 605 gGL.vertex2f(right, bottom);
@@ -614,9 +614,9 @@ void LLWorldMapView::draw()
614 { 614 {
615 gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO); 615 gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ZERO);
616 616
617 LLGLSNoTexture gls_no_texture; 617 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
618 gGL.color3f(1.f, 0.f, 0.f); 618 gGL.color3f(1.f, 0.f, 0.f);
619 gGL.begin(LLVertexBuffer::LINES); 619 gGL.begin(LLRender::LINES);
620 gGL.vertex2f(left, top); 620 gGL.vertex2f(left, top);
621 gGL.vertex2f(right, bottom); 621 gGL.vertex2f(right, bottom);
622 gGL.vertex2f(left, bottom); 622 gGL.vertex2f(left, bottom);
@@ -685,7 +685,7 @@ void LLWorldMapView::draw()
685 // Draw background rectangle 685 // Draw background rectangle
686 LLGLSUIDefault gls_ui; 686 LLGLSUIDefault gls_ui;
687 { 687 {
688 LLGLSNoTexture gls_no_texture; 688 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
689 gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f); 689 gGL.setAlphaRejectSettings(LLRender::CF_GREATER_EQUAL, 0.f);
690 gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA); 690 gGL.blendFunc(LLRender::BF_ONE_MINUS_DEST_ALPHA, LLRender::BF_DEST_ALPHA);
691 gGL.color4fv( mBackgroundColor.mV ); 691 gGL.color4fv( mBackgroundColor.mV );
@@ -971,7 +971,7 @@ void LLWorldMapView::drawFrustum()
971 F32 ctr_x = getRect().getWidth() * 0.5f + sPanX; 971 F32 ctr_x = getRect().getWidth() * 0.5f + sPanX;
972 F32 ctr_y = getRect().getHeight() * 0.5f + sPanY; 972 F32 ctr_y = getRect().getHeight() * 0.5f + sPanY;
973 973
974 LLGLSNoTexture gls_no_texture; 974 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
975 975
976 // Since we don't rotate the map, we have to rotate the frustum. 976 // Since we don't rotate the map, we have to rotate the frustum.
977 gGL.pushMatrix(); 977 gGL.pushMatrix();
@@ -980,7 +980,7 @@ void LLWorldMapView::drawFrustum()
980 980
981 // Draw triangle with more alpha in far pixels to make it 981 // Draw triangle with more alpha in far pixels to make it
982 // fade out in distance. 982 // fade out in distance.
983 gGL.begin( LLVertexBuffer::TRIANGLES ); 983 gGL.begin( LLRender::TRIANGLES );
984 gGL.color4f(1.f, 1.f, 1.f, 0.25f); 984 gGL.color4f(1.f, 1.f, 1.f, 0.25f);
985 gGL.vertex2f( 0, 0 ); 985 gGL.vertex2f( 0, 0 );
986 986
@@ -1186,11 +1186,11 @@ static void drawDot(F32 x_pixels, F32 y_pixels,
1186 F32 top = y_pixels + dot_radius; 1186 F32 top = y_pixels + dot_radius;
1187 F32 bottom = y_pixels - dot_radius; 1187 F32 bottom = y_pixels - dot_radius;
1188 1188
1189 LLGLSNoTexture gls_no_texture; 1189 gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
1190 gGL.color4fv( color.mV ); 1190 gGL.color4fv( color.mV );
1191 LLUI::setLineWidth(1.5f); 1191 LLUI::setLineWidth(1.5f);
1192 F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y 1192 F32 h_bar = relative_z > HEIGHT_THRESHOLD ? top : bottom; // horizontal bar Y
1193 gGL.begin( LLVertexBuffer::LINES ); 1193 gGL.begin( LLRender::LINES );
1194 gGL.vertex2f(center, top); 1194 gGL.vertex2f(center, top);
1195 gGL.vertex2f(left, h_bar); 1195 gGL.vertex2f(left, h_bar);
1196 gGL.vertex2f(right, h_bar); 1196 gGL.vertex2f(right, h_bar);