From 7abecb48babe6a6f09bf6692ba55076546cfced9 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Mon, 1 Dec 2008 17:39:58 -0600 Subject: Second Life viewer sources 1.22.0-RC --- linden/indra/newview/llnetmap.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'linden/indra/newview/llnetmap.cpp') 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() LLGLEnable scissor(GL_SCISSOR_TEST); { - LLGLSNoTexture no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); LLLocalClipRect clip(getLocalRect()); glMatrixMode(GL_MODELVIEW); @@ -286,8 +286,8 @@ void LLNetMap::draw() // Draw using texture. - LLViewerImage::bindTexture(regionp->getLand().getSTexture()); - gGL.begin(LLVertexBuffer::QUADS); + gGL.getTexUnit(0)->bind(regionp->getLand().getSTexture()); + gGL.begin(LLRender::QUADS); gGL.texCoord2f(0.f, 1.f); gGL.vertex2f(left, top); gGL.texCoord2f(0.f, 0.f); @@ -303,8 +303,8 @@ void LLNetMap::draw() { if (regionp->getLand().getWaterTexture()) { - LLViewerImage::bindTexture(regionp->getLand().getWaterTexture()); - gGL.begin(LLVertexBuffer::QUADS); + gGL.getTexUnit(0)->bind(regionp->getLand().getWaterTexture()); + gGL.begin(LLRender::QUADS); gGL.texCoord2f(0.f, 1.f); gGL.vertex2f(left, top); gGL.texCoord2f(0.f, 0.f); @@ -350,11 +350,11 @@ void LLNetMap::draw() map_center_agent.mV[VX] *= gMiniMapScale/region_width; map_center_agent.mV[VY] *= gMiniMapScale/region_width; - LLViewerImage::bindTexture(mObjectImagep); + gGL.getTexUnit(0)->bind(mObjectImagep); F32 image_half_width = 0.5f*mObjectMapPixels; F32 image_half_height = 0.5f*mObjectMapPixels; - gGL.begin(LLVertexBuffer::QUADS); + gGL.begin(LLRender::QUADS); gGL.texCoord2f(0.f, 1.f); gGL.vertex2f(map_center_agent.mV[VX] - image_half_width, image_half_height + map_center_agent.mV[VY]); gGL.texCoord2f(0.f, 0.f); @@ -457,13 +457,13 @@ void LLNetMap::draw() F32 ctr_y = (F32)center_sw_bottom; - LLGLSNoTexture no_texture; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); if( LLNetMap::sRotateMap ) { gGL.color4fv(gFrustumMapColor.mV); - gGL.begin( LLVertexBuffer::TRIANGLES ); + gGL.begin( LLRender::TRIANGLES ); gGL.vertex2f( ctr_x, ctr_y ); gGL.vertex2f( ctr_x - half_width_pixels, ctr_y + far_clip_pixels ); gGL.vertex2f( ctr_x + half_width_pixels, ctr_y + far_clip_pixels ); @@ -477,7 +477,7 @@ void LLNetMap::draw() gGL.pushMatrix(); gGL.translatef( ctr_x, ctr_y, 0 ); glRotatef( atan2( LLViewerCamera::getInstance()->getAtAxis().mV[VX], LLViewerCamera::getInstance()->getAtAxis().mV[VY] ) * RAD_TO_DEG, 0.f, 0.f, -1.f); - gGL.begin( LLVertexBuffer::TRIANGLES ); + gGL.begin( LLRender::TRIANGLES ); gGL.vertex2f( 0, 0 ); gGL.vertex2f( -half_width_pixels, far_clip_pixels ); gGL.vertex2f( half_width_pixels, far_clip_pixels ); @@ -642,7 +642,11 @@ void LLNetMap::renderScaledPointGlobal( const LLVector3d& pos, const LLColor4U & LLVector3 local_pos; local_pos.setVec( pos - mObjectImageCenterGlobal ); - S32 diameter_pixels = llround(2 * radius_meters * mObjectMapTPM); + // DEV-17370 - megaprims of size > 4096 cause lag. (go figger.) + const F32 MAX_RADIUS = 256.0f; + F32 radius_clamped = llmin(radius_meters, MAX_RADIUS); + + S32 diameter_pixels = llround(2 * radius_clamped * mObjectMapTPM); renderPoint( local_pos, color, diameter_pixels ); } -- cgit v1.1 From a87e38229921b48c32187c672a942516722f1b52 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Sun, 11 Jan 2009 16:10:39 -0600 Subject: Second Life viewer sources 1.22.5-RC --- linden/indra/newview/llnetmap.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview/llnetmap.cpp') diff --git a/linden/indra/newview/llnetmap.cpp b/linden/indra/newview/llnetmap.cpp index 36b6863..c96754f 100644 --- a/linden/indra/newview/llnetmap.cpp +++ b/linden/indra/newview/llnetmap.cpp @@ -5,7 +5,7 @@ * * $LicenseInfo:firstyear=2001&license=viewergpl$ * - * Copyright (c) 2001-2008, Linden Research, Inc. + * Copyright (c) 2001-2009, Linden Research, Inc. * * Second Life Viewer Source Code * The source code in this file ("Source Code") is provided by Linden Lab -- cgit v1.1