summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateravatarpicker.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2019-11-11 20:38:52 +0200
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2020-06-23 14:50:59 +0300
commit0d78aa31e2bd2cf55c83a4447027a94b0939ae26 (patch)
tree538bab919c7a562a27294fb07cdb5ec7a4271306 /indra/newview/llfloateravatarpicker.cpp
parent2022c91e2d1b3d3cbb642c1669d4ac524f31af28 (diff)
SL-6109 Removed LLDrawFrustum and used changes from EEP to prevent merge conflicts
Diffstat (limited to 'indra/newview/llfloateravatarpicker.cpp')
-rw-r--r--indra/newview/llfloateravatarpicker.cpp55
1 files changed, 2 insertions, 53 deletions
diff --git a/indra/newview/llfloateravatarpicker.cpp b/indra/newview/llfloateravatarpicker.cpp
index 33099db1b9..ab95bc06b8 100644
--- a/indra/newview/llfloateravatarpicker.cpp
+++ b/indra/newview/llfloateravatarpicker.cpp
@@ -361,59 +361,8 @@ void LLFloaterAvatarPicker::populateFriend()
void LLFloaterAvatarPicker::drawFrustum()
{
- if(mFrustumOrigin.get())
- {
- LLView * frustumOrigin = mFrustumOrigin.get();
- LLRect origin_rect;
- frustumOrigin->localRectToOtherView(frustumOrigin->getLocalRect(), &origin_rect, this);
- // draw context cone connecting color picker with color swatch in parent floater
- LLRect local_rect = getLocalRect();
- if (hasFocus() && frustumOrigin->isInVisibleChain() && mContextConeOpacity > 0.001f)
- {
- gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
- LLGLEnable(GL_CULL_FACE);
- gGL.begin(LLRender::QUADS);
- {
- gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
- gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
- gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
- gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
- gGL.vertex2i(local_rect.mRight, local_rect.mTop);
- gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
-
- gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
- gGL.vertex2i(local_rect.mLeft, local_rect.mTop);
- gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
- gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
- gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
- gGL.vertex2i(origin_rect.mLeft, origin_rect.mTop);
-
- gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
- gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
- gGL.vertex2i(local_rect.mRight, local_rect.mTop);
- gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
- gGL.vertex2i(origin_rect.mRight, origin_rect.mTop);
- gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
-
- gGL.color4f(0.f, 0.f, 0.f, mContextConeOutAlpha * mContextConeOpacity);
- gGL.vertex2i(local_rect.mLeft, local_rect.mBottom);
- gGL.vertex2i(local_rect.mRight, local_rect.mBottom);
- gGL.color4f(0.f, 0.f, 0.f, mContextConeInAlpha * mContextConeOpacity);
- gGL.vertex2i(origin_rect.mRight, origin_rect.mBottom);
- gGL.vertex2i(origin_rect.mLeft, origin_rect.mBottom);
- }
- gGL.end();
- }
-
- if (gFocusMgr.childHasMouseCapture(getDragHandle()))
- {
- mContextConeOpacity = lerp(mContextConeOpacity, gSavedSettings.getF32("PickerContextOpacity"), LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
- }
- else
- {
- mContextConeOpacity = lerp(mContextConeOpacity, 0.f, LLSmoothInterpolation::getInterpolant(mContextConeFadeTime));
- }
- }
+ static LLCachedControl<F32> max_opacity(gSavedSettings, "PickerContextOpacity", 0.4f);
+ drawConeToOwner(mContextConeOpacity, max_opacity, mFrustumOrigin.get(), mContextConeFadeTime, mContextConeInAlpha, mContextConeOutAlpha);
}
void LLFloaterAvatarPicker::draw()