diff options
Diffstat (limited to 'linden/indra/newview/llselectmgr.cpp')
-rw-r--r-- | linden/indra/newview/llselectmgr.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index fe1755b..998cc50 100644 --- a/linden/indra/newview/llselectmgr.cpp +++ b/linden/indra/newview/llselectmgr.cpp | |||
@@ -4,7 +4,7 @@ | |||
4 | * | 4 | * |
5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ | 5 | * $LicenseInfo:firstyear=2001&license=viewergpl$ |
6 | * | 6 | * |
7 | * Copyright (c) 2001-2008, Linden Research, Inc. | 7 | * Copyright (c) 2001-2009, Linden Research, Inc. |
8 | * | 8 | * |
9 | * Second Life Viewer Source Code | 9 | * Second Life Viewer Source Code |
10 | * The source code in this file ("Source Code") is provided by Linden Lab | 10 | * The source code in this file ("Source Code") is provided by Linden Lab |
@@ -106,6 +106,7 @@ BOOL gHideSelectedObjects = FALSE; | |||
106 | BOOL gAllowSelectAvatar = FALSE; | 106 | BOOL gAllowSelectAvatar = FALSE; |
107 | 107 | ||
108 | BOOL LLSelectMgr::sRectSelectInclusive = TRUE; | 108 | BOOL LLSelectMgr::sRectSelectInclusive = TRUE; |
109 | BOOL LLSelectMgr::sRenderSelectionHighlights = TRUE; | ||
109 | BOOL LLSelectMgr::sRenderHiddenSelections = TRUE; | 110 | BOOL LLSelectMgr::sRenderHiddenSelections = TRUE; |
110 | BOOL LLSelectMgr::sRenderLightRadius = FALSE; | 111 | BOOL LLSelectMgr::sRenderLightRadius = FALSE; |
111 | F32 LLSelectMgr::sHighlightThickness = 0.f; | 112 | F32 LLSelectMgr::sHighlightThickness = 0.f; |
@@ -4823,12 +4824,12 @@ void LLSelectMgr::updateSilhouettes() | |||
4823 | 4824 | ||
4824 | void LLSelectMgr::renderSilhouettes(BOOL for_hud) | 4825 | void LLSelectMgr::renderSilhouettes(BOOL for_hud) |
4825 | { | 4826 | { |
4826 | if (!mRenderSilhouettes) | 4827 | if (!mRenderSilhouettes || !LLSelectMgr::sRenderSelectionHighlights) |
4827 | { | 4828 | { |
4828 | return; | 4829 | return; |
4829 | } | 4830 | } |
4830 | 4831 | ||
4831 | LLViewerImage::bindTexture(mSilhouetteImagep); | 4832 | gGL.getTexUnit(0)->bind(mSilhouetteImagep.get()); |
4832 | LLGLSPipelineSelection gls_select; | 4833 | LLGLSPipelineSelection gls_select; |
4833 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); | 4834 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); |
4834 | LLGLEnable blend(GL_BLEND); | 4835 | LLGLEnable blend(GL_BLEND); |
@@ -4936,7 +4937,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) | |||
4936 | stop_glerror(); | 4937 | stop_glerror(); |
4937 | } | 4938 | } |
4938 | 4939 | ||
4939 | mSilhouetteImagep->unbindTexture(0, GL_TEXTURE_2D); | 4940 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
4940 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); | 4941 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
4941 | } | 4942 | } |
4942 | 4943 | ||
@@ -4968,6 +4969,7 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow) | |||
4968 | mSitName = LLStringUtil::null; | 4969 | mSitName = LLStringUtil::null; |
4969 | mSilhouetteExists = FALSE; | 4970 | mSilhouetteExists = FALSE; |
4970 | mDuplicated = FALSE; | 4971 | mDuplicated = FALSE; |
4972 | mCreationDate = 0; | ||
4971 | 4973 | ||
4972 | saveColors(); | 4974 | saveColors(); |
4973 | } | 4975 | } |
@@ -5005,6 +5007,7 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep) | |||
5005 | mFromTaskID = nodep.mFromTaskID; | 5007 | mFromTaskID = nodep.mFromTaskID; |
5006 | mTouchName = nodep.mTouchName; | 5008 | mTouchName = nodep.mTouchName; |
5007 | mSitName = nodep.mSitName; | 5009 | mSitName = nodep.mSitName; |
5010 | mCreationDate = nodep.mCreationDate; | ||
5008 | 5011 | ||
5009 | mSilhouetteVertices = nodep.mSilhouetteVertices; | 5012 | mSilhouetteVertices = nodep.mSilhouetteVertices; |
5010 | mSilhouetteNormals = nodep.mSilhouetteNormals; | 5013 | mSilhouetteNormals = nodep.mSilhouetteNormals; |
@@ -5313,7 +5316,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5313 | 5316 | ||
5314 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); | 5317 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); |
5315 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); | 5318 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
5316 | gGL.begin(LLVertexBuffer::LINES); | 5319 | gGL.begin(LLRender::LINES); |
5317 | { | 5320 | { |
5318 | S32 i = 0; | 5321 | S32 i = 0; |
5319 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) | 5322 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) |
@@ -5334,7 +5337,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5334 | 5337 | ||
5335 | gGL.flush(); | 5338 | gGL.flush(); |
5336 | gGL.setSceneBlendType(LLRender::BT_ALPHA); | 5339 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
5337 | gGL.begin(LLVertexBuffer::TRIANGLES); | 5340 | gGL.begin(LLRender::TRIANGLES); |
5338 | { | 5341 | { |
5339 | S32 i = 0; | 5342 | S32 i = 0; |
5340 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) | 5343 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) |
@@ -5945,9 +5948,9 @@ S32 LLObjectSelection::getRootObjectCount() | |||
5945 | return count; | 5948 | return count; |
5946 | } | 5949 | } |
5947 | 5950 | ||
5948 | bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool firstonly) | 5951 | bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func) |
5949 | { | 5952 | { |
5950 | bool result = firstonly ? false : true; | 5953 | bool result = true; |
5951 | for (iterator iter = begin(); iter != end(); ) | 5954 | for (iterator iter = begin(); iter != end(); ) |
5952 | { | 5955 | { |
5953 | iterator nextiter = iter++; | 5956 | iterator nextiter = iter++; |
@@ -5955,10 +5958,7 @@ bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool first | |||
5955 | if (!object) | 5958 | if (!object) |
5956 | continue; | 5959 | continue; |
5957 | bool r = func->apply(object); | 5960 | bool r = func->apply(object); |
5958 | if (firstonly && r) | 5961 | result = result && r; |
5959 | return true; | ||
5960 | else | ||
5961 | result = result && r; | ||
5962 | } | 5962 | } |
5963 | return result; | 5963 | return result; |
5964 | } | 5964 | } |