diff options
Diffstat (limited to 'linden/indra/newview/llselectmgr.cpp')
-rw-r--r-- | linden/indra/newview/llselectmgr.cpp | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/linden/indra/newview/llselectmgr.cpp b/linden/indra/newview/llselectmgr.cpp index fe1755b..7afe073 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 |
@@ -4828,7 +4828,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) | |||
4828 | return; | 4828 | return; |
4829 | } | 4829 | } |
4830 | 4830 | ||
4831 | LLViewerImage::bindTexture(mSilhouetteImagep); | 4831 | gGL.getTexUnit(0)->bind(mSilhouetteImagep.get()); |
4832 | LLGLSPipelineSelection gls_select; | 4832 | LLGLSPipelineSelection gls_select; |
4833 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); | 4833 | gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.f); |
4834 | LLGLEnable blend(GL_BLEND); | 4834 | LLGLEnable blend(GL_BLEND); |
@@ -4936,7 +4936,7 @@ void LLSelectMgr::renderSilhouettes(BOOL for_hud) | |||
4936 | stop_glerror(); | 4936 | stop_glerror(); |
4937 | } | 4937 | } |
4938 | 4938 | ||
4939 | mSilhouetteImagep->unbindTexture(0, GL_TEXTURE_2D); | 4939 | gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); |
4940 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); | 4940 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
4941 | } | 4941 | } |
4942 | 4942 | ||
@@ -4968,6 +4968,7 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow) | |||
4968 | mSitName = LLStringUtil::null; | 4968 | mSitName = LLStringUtil::null; |
4969 | mSilhouetteExists = FALSE; | 4969 | mSilhouetteExists = FALSE; |
4970 | mDuplicated = FALSE; | 4970 | mDuplicated = FALSE; |
4971 | mCreationDate = 0; | ||
4971 | 4972 | ||
4972 | saveColors(); | 4973 | saveColors(); |
4973 | } | 4974 | } |
@@ -5005,6 +5006,7 @@ LLSelectNode::LLSelectNode(const LLSelectNode& nodep) | |||
5005 | mFromTaskID = nodep.mFromTaskID; | 5006 | mFromTaskID = nodep.mFromTaskID; |
5006 | mTouchName = nodep.mTouchName; | 5007 | mTouchName = nodep.mTouchName; |
5007 | mSitName = nodep.mSitName; | 5008 | mSitName = nodep.mSitName; |
5009 | mCreationDate = nodep.mCreationDate; | ||
5008 | 5010 | ||
5009 | mSilhouetteVertices = nodep.mSilhouetteVertices; | 5011 | mSilhouetteVertices = nodep.mSilhouetteVertices; |
5010 | mSilhouetteNormals = nodep.mSilhouetteNormals; | 5012 | mSilhouetteNormals = nodep.mSilhouetteNormals; |
@@ -5313,7 +5315,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5313 | 5315 | ||
5314 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); | 5316 | LLGLDepthTest gls_depth(GL_TRUE, GL_FALSE, GL_GEQUAL); |
5315 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); | 5317 | gGL.setAlphaRejectSettings(LLRender::CF_DEFAULT); |
5316 | gGL.begin(LLVertexBuffer::LINES); | 5318 | gGL.begin(LLRender::LINES); |
5317 | { | 5319 | { |
5318 | S32 i = 0; | 5320 | S32 i = 0; |
5319 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) | 5321 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) |
@@ -5334,7 +5336,7 @@ void LLSelectNode::renderOneSilhouette(const LLColor4 &color) | |||
5334 | 5336 | ||
5335 | gGL.flush(); | 5337 | gGL.flush(); |
5336 | gGL.setSceneBlendType(LLRender::BT_ALPHA); | 5338 | gGL.setSceneBlendType(LLRender::BT_ALPHA); |
5337 | gGL.begin(LLVertexBuffer::TRIANGLES); | 5339 | gGL.begin(LLRender::TRIANGLES); |
5338 | { | 5340 | { |
5339 | S32 i = 0; | 5341 | S32 i = 0; |
5340 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) | 5342 | for (S32 seg_num = 0; seg_num < (S32)mSilhouetteSegments.size(); seg_num++) |
@@ -5945,9 +5947,9 @@ S32 LLObjectSelection::getRootObjectCount() | |||
5945 | return count; | 5947 | return count; |
5946 | } | 5948 | } |
5947 | 5949 | ||
5948 | bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool firstonly) | 5950 | bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func) |
5949 | { | 5951 | { |
5950 | bool result = firstonly ? false : true; | 5952 | bool result = true; |
5951 | for (iterator iter = begin(); iter != end(); ) | 5953 | for (iterator iter = begin(); iter != end(); ) |
5952 | { | 5954 | { |
5953 | iterator nextiter = iter++; | 5955 | iterator nextiter = iter++; |
@@ -5955,10 +5957,7 @@ bool LLObjectSelection::applyToObjects(LLSelectedObjectFunctor* func, bool first | |||
5955 | if (!object) | 5957 | if (!object) |
5956 | continue; | 5958 | continue; |
5957 | bool r = func->apply(object); | 5959 | bool r = func->apply(object); |
5958 | if (firstonly && r) | 5960 | result = result && r; |
5959 | return true; | ||
5960 | else | ||
5961 | result = result && r; | ||
5962 | } | 5961 | } |
5963 | return result; | 5962 | return result; |
5964 | } | 5963 | } |