From 0e10a83b6bc11d0a40f09e6ba59b30c0e1e343bd Mon Sep 17 00:00:00 2001 From: Richard Linden Date: Mon, 14 Mar 2011 16:46:10 -0700 Subject: SOCIAL-695 FIX Selecting UI and then clicking on world to give focus back to viewer moves you to that location made this work when clicking on SL with another app in foreground visual feedback of ClickToWalk behavior --- indra/newview/llhudeffectblob.cpp | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) (limited to 'indra/newview/llhudeffectblob.cpp') diff --git a/indra/newview/llhudeffectblob.cpp b/indra/newview/llhudeffectblob.cpp index 6ef8fab4a6..f976a320ee 100644 --- a/indra/newview/llhudeffectblob.cpp +++ b/indra/newview/llhudeffectblob.cpp @@ -28,8 +28,15 @@ #include "llhudeffectblob.h" -LLHUDEffectBlob::LLHUDEffectBlob(const U8 type) : LLHUDEffect(type) +#include "llagent.h" +#include "llviewercamera.h" +#include "llrendersphere.h" + +LLHUDEffectBlob::LLHUDEffectBlob(const U8 type) +: LLHUDEffect(type), + mPixelSize(10) { + mTimer.start(); } LLHUDEffectBlob::~LLHUDEffectBlob() @@ -38,6 +45,31 @@ LLHUDEffectBlob::~LLHUDEffectBlob() void LLHUDEffectBlob::render() { + F32 time = mTimer.getElapsedTimeF32(); + if (mDuration < time) + { + markDead(); + } + + LLVector3 pos_agent = gAgent.getPosAgentFromGlobal(mPositionGlobal); + + LLVector3 pixel_up, pixel_right; + + LLViewerCamera::instance().getPixelVectors(pos_agent, pixel_up, pixel_right); + + LLGLSPipelineAlpha gls_pipeline_alpha; + gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); + + LLColor4U color = mColor; + color.mV[VALPHA] = clamp_rescale(time, 0.f, mDuration, 255.f, 0.f); + glColor4ubv(color.mV); + + glPushMatrix(); + glTranslatef(pos_agent.mV[0], pos_agent.mV[1], pos_agent.mV[2]); + F32 scale = pixel_up.magVec() * (F32)mPixelSize; + glScalef(scale, scale, scale); + gSphere.render(0); + glPopMatrix(); } void LLHUDEffectBlob::renderForTimer() -- cgit v1.2.3