diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llnetmap.cpp | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index b277998..36b6863 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp | |||
@@ -226,7 +226,7 @@ void LLNetMap::draw() | |||
226 | LLGLEnable scissor(GL_SCISSOR_TEST); | 226 | LLGLEnable scissor(GL_SCISSOR_TEST); |
227 | 227 | ||
228 | { | 228 | { |
229 | LLGLSNoTexture no_texture; | 229 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
230 | LLLocalClipRect clip(getLocalRect()); | 230 | LLLocalClipRect clip(getLocalRect()); |
231 | 231 | ||
232 | glMatrixMode(GL_MODELVIEW); | 232 | glMatrixMode(GL_MODELVIEW); |
@@ -286,8 +286,8 @@ void LLNetMap::draw() | |||
286 | 286 | ||
287 | 287 | ||
288 | // Draw using texture. | 288 | // Draw using texture. |
289 | LLViewerImage::bindTexture(regionp->getLand().getSTexture()); | 289 | gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); |
290 | gGL.begin(LLVertexBuffer::QUADS); | 290 | gGL.begin(LLRender::QUADS); |
291 | gGL.texCoord2f(0.f, 1.f); | 291 | gGL.texCoord2f(0.f, 1.f); |
292 | gGL.vertex2f(left, top); | 292 | gGL.vertex2f(left, top); |
293 | gGL.texCoord2f(0.f, 0.f); | 293 | gGL.texCoord2f(0.f, 0.f); |
@@ -303,8 +303,8 @@ void LLNetMap::draw() | |||
303 | { | 303 | { |
304 | if (regionp->getLand().getWaterTexture()) | 304 | if (regionp->getLand().getWaterTexture()) |
305 | { | 305 | { |
306 | LLViewerImage::bindTexture(regionp->getLand().getWaterTexture()); | 306 | gGL.getTexUnit(0)->bind(regionp->getLand().getWaterTexture()); |
307 | gGL.begin(LLVertexBuffer::QUADS); | 307 | gGL.begin(LLRender::QUADS); |
308 | gGL.texCoord2f(0.f, 1.f); | 308 | gGL.texCoord2f(0.f, 1.f); |
309 | gGL.vertex2f(left, top); | 309 | gGL.vertex2f(left, top); |
310 | gGL.texCoord2f(0.f, 0.f); | 310 | gGL.texCoord2f(0.f, 0.f); |
@@ -350,11 +350,11 @@ void LLNetMap::draw() | |||
350 | map_center_agent.mV[VX] *= gMiniMapScale/region_width; | 350 | map_center_agent.mV[VX] *= gMiniMapScale/region_width; |
351 | map_center_agent.mV[VY] *= gMiniMapScale/region_width; | 351 | map_center_agent.mV[VY] *= gMiniMapScale/region_width; |
352 | 352 | ||
353 | LLViewerImage::bindTexture(mObjectImagep); | 353 | gGL.getTexUnit(0)->bind(mObjectImagep); |
354 | F32 image_half_width = 0.5f*mObjectMapPixels; | 354 | F32 image_half_width = 0.5f*mObjectMapPixels; |
355 | F32 image_half_height = 0.5f*mObjectMapPixels; | 355 | F32 image_half_height = 0.5f*mObjectMapPixels; |
356 | 356 | ||
357 | gGL.begin(LLVertexBuffer::QUADS); | 357 | gGL.begin(LLRender::QUADS); |
358 | gGL.texCoord2f(0.f, 1.f); | 358 | gGL.texCoord2f(0.f, 1.f); |
359 | gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); | 359 | gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); |
360 | gGL.texCoord2f(0.f, 0.f); | 360 | gGL.texCoord2f(0.f, 0.f); |
@@ -457,13 +457,13 @@ void LLNetMap::draw() | |||
457 | F32 ctr_y = (F32)center_sw_bottom; | 457 | F32 ctr_y = (F32)center_sw_bottom; |
458 | 458 | ||
459 | 459 | ||
460 | LLGLSNoTexture no_texture; | 460 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
461 | 461 | ||
462 | if( LLNetMap::sRotateMap ) | 462 | if( LLNetMap::sRotateMap ) |
463 | { | 463 | { |
464 | gGL.color4fv(gFrustumMapColor.mV); | 464 | gGL.color4fv(gFrustumMapColor.mV); |
465 | 465 | ||
466 | gGL.begin( LLVertexBuffer::TRIANGLES ); | 466 | gGL.begin( LLRender::TRIANGLES ); |
467 | gGL.vertex2f( ctr_x, ctr_y ); | 467 | gGL.vertex2f( ctr_x, ctr_y ); |
468 | gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels ); | 468 | gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels ); |
469 | gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels ); | 469 | gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels ); |
@@ -477,7 +477,7 @@ void LLNetMap::draw() | |||
477 | gGL.pushMatrix(); | 477 | gGL.pushMatrix(); |
478 | gGL.translatef( ctr_x, ctr_y, 0 ); | 478 | gGL.translatef( ctr_x, ctr_y, 0 ); |
479 | glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); | 479 | glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); |
480 | gGL.begin( LLVertexBuffer::TRIANGLES ); | 480 | gGL.begin( LLRender::TRIANGLES ); |
481 | gGL.vertex2f( 0, 0 ); | 481 | gGL.vertex2f( 0, 0 ); |
482 | gGL.vertex2f( -half_width_pixels, far_clip_pixels ); | 482 | gGL.vertex2f( -half_width_pixels, far_clip_pixels ); |
483 | gGL.vertex2f( half_width_pixels, far_clip_pixels ); | 483 | gGL.vertex2f( half_width_pixels, far_clip_pixels ); |
@@ -642,7 +642,11 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & | |||
642 | LLVector3 local_pos; | 642 | LLVector3 local_pos; |
643 | local_pos.setVec( pos - mObjectImageCenterGlobal ); | 643 | local_pos.setVec( pos - mObjectImageCenterGlobal ); |
644 | 644 | ||
645 | S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); | 645 | // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.) |
646 | const F32 MAX_RADIUS = 256.0f; | ||
647 | F32 radius_clamped = llmin(radius_meters, MAX_RADIUS); | ||
648 | |||
649 | S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM); | ||
646 | renderPoint( local_pos, color, diameter_pixels ); | 650 | renderPoint( local_pos, color, diameter_pixels ); |
647 | } | 651 | } |
648 | 652 | ||