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/llvotextbubble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview/llvotextbubble.cpp') diff --git a/linden/indra/newview/llvotextbubble.cpp b/linden/indra/newview/llvotextbubble.cpp index 5424cc8..69b57d9 100644 --- a/linden/indra/newview/llvotextbubble.cpp +++ b/linden/indra/newview/llvotextbubble.cpp @@ -126,7 +126,7 @@ void LLVOTextBubble::updateTextures(LLAgent &agent) LLVector3 position_local = getPositionAgent() - agent.getCameraPositionAgent(); F32 dot_product = position_local * agent.getFrameAgent().getAtAxis(); - F32 cos_angle = dot_product / position_local.magVec(); + F32 cos_angle = dot_product / position_local.length(); if (cos_angle > 1.f) { -- 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/llvotextbubble.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'linden/indra/newview/llvotextbubble.cpp') diff --git a/linden/indra/newview/llvotextbubble.cpp b/linden/indra/newview/llvotextbubble.cpp index 69b57d9..f9a12a4 100644 --- a/linden/indra/newview/llvotextbubble.cpp +++ b/linden/indra/newview/llvotextbubble.cpp @@ -4,7 +4,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 From 0ef11cf31364456ec247b0fc7ad8f6d1de408400 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Wed, 28 Jan 2009 20:04:52 -0600 Subject: Second Life viewer sources 1.22.6-RC --- linden/indra/newview/llvotextbubble.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'linden/indra/newview/llvotextbubble.cpp') diff --git a/linden/indra/newview/llvotextbubble.cpp b/linden/indra/newview/llvotextbubble.cpp index f9a12a4..ba53bd3 100644 --- a/linden/indra/newview/llvotextbubble.cpp +++ b/linden/indra/newview/llvotextbubble.cpp @@ -118,30 +118,16 @@ BOOL LLVOTextBubble::idleUpdate(LLAgent &agent, LLWorld &world, const F64 &time) void LLVOTextBubble::updateTextures(LLAgent &agent) { // Update the image levels of all textures... - // First we do some quick checks. - U32 i; - // This doesn't take into account whether the object is in front - // or behind... - - LLVector3 position_local = getPositionAgent() - agent.getCameraPositionAgent(); - F32 dot_product = position_local * agent.getFrameAgent().getAtAxis(); - F32 cos_angle = dot_product / position_local.length(); - - if (cos_angle > 1.f) - { - cos_angle = 1.f; - } - - for (i = 0; i < getNumTEs(); i++) + for (U32 i = 0; i < getNumTEs(); i++) { const LLTextureEntry *te = getTE(i); F32 texel_area_ratio = fabs(te->mScaleS * te->mScaleT); - + texel_area_ratio = llclamp(texel_area_ratio, .125f, 16.f); LLViewerImage *imagep = getTEImage(i); if (imagep) { - imagep->addTextureStats(mPixelArea, texel_area_ratio, cos_angle); + imagep->addTextureStats(mPixelArea / texel_area_ratio); } } } -- cgit v1.1