diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/pipeline.cpp | 61 |
1 files changed, 61 insertions, 0 deletions
diff --git a/linden/indra/newview/pipeline.cpp b/linden/indra/newview/pipeline.cpp index cd9b3be..61ad8b7 100644 --- a/linden/indra/newview/pipeline.cpp +++ b/linden/indra/newview/pipeline.cpp | |||
@@ -232,6 +232,7 @@ BOOL LLPipeline::sPickAvatar = TRUE; | |||
232 | BOOL LLPipeline::sDynamicLOD = TRUE; | 232 | BOOL LLPipeline::sDynamicLOD = TRUE; |
233 | BOOL LLPipeline::sShowHUDAttachments = TRUE; | 233 | BOOL LLPipeline::sShowHUDAttachments = TRUE; |
234 | BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; | 234 | BOOL LLPipeline::sRenderPhysicalBeacons = TRUE; |
235 | BOOL LLPipeline::sRenderMOAPBeacons = FALSE; | ||
235 | BOOL LLPipeline::sRenderScriptedBeacons = FALSE; | 236 | BOOL LLPipeline::sRenderScriptedBeacons = FALSE; |
236 | BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; | 237 | BOOL LLPipeline::sRenderScriptedTouchBeacons = TRUE; |
237 | BOOL LLPipeline::sRenderParticleBeacons = FALSE; | 238 | BOOL LLPipeline::sRenderParticleBeacons = FALSE; |
@@ -2149,6 +2150,43 @@ void renderPhysicalBeacons(LLDrawable* drawablep) | |||
2149 | } | 2150 | } |
2150 | } | 2151 | } |
2151 | 2152 | ||
2153 | void renderMOAPBeacons(LLDrawable* drawablep) | ||
2154 | { | ||
2155 | LLViewerObject *vobj = drawablep->getVObj(); | ||
2156 | |||
2157 | if(!vobj || vobj->isAvatar()) | ||
2158 | return; | ||
2159 | |||
2160 | BOOL beacon=FALSE; | ||
2161 | U8 tecount=vobj->getNumTEs(); | ||
2162 | for(int x=0;x<tecount;x++) | ||
2163 | { | ||
2164 | if(vobj->getTE(x)->hasMedia()) | ||
2165 | { | ||
2166 | beacon=TRUE; | ||
2167 | break; | ||
2168 | } | ||
2169 | } | ||
2170 | if(beacon==TRUE) | ||
2171 | { | ||
2172 | if (gPipeline.sRenderBeacons) | ||
2173 | { | ||
2174 | gObjectList.addDebugBeacon(vobj->getPositionAgent(), "", LLColor4(0.f, 1.f, 0.f, 0.5f), LLColor4(1.f, 1.f, 1.f, 0.5f), gSavedSettings.getS32("DebugBeaconLineWidth")); | ||
2175 | } | ||
2176 | |||
2177 | if (gPipeline.sRenderHighlight) | ||
2178 | { | ||
2179 | S32 face_id; | ||
2180 | S32 count = drawablep->getNumFaces(); | ||
2181 | for (face_id = 0; face_id < count; face_id++) | ||
2182 | { | ||
2183 | gPipeline.mHighlightFaces.push_back(drawablep->getFace(face_id) ); | ||
2184 | } | ||
2185 | } | ||
2186 | } | ||
2187 | } | ||
2188 | |||
2189 | |||
2152 | void renderParticleBeacons(LLDrawable* drawablep) | 2190 | void renderParticleBeacons(LLDrawable* drawablep) |
2153 | { | 2191 | { |
2154 | // Look for attachments, objects, etc. | 2192 | // Look for attachments, objects, etc. |
@@ -2329,6 +2367,11 @@ void LLPipeline::postSort(LLCamera& camera) | |||
2329 | forAllVisibleDrawables(renderPhysicalBeacons); | 2367 | forAllVisibleDrawables(renderPhysicalBeacons); |
2330 | } | 2368 | } |
2331 | 2369 | ||
2370 | if(sRenderMOAPBeacons) | ||
2371 | { | ||
2372 | forAllVisibleDrawables(renderMOAPBeacons); | ||
2373 | } | ||
2374 | |||
2332 | if (sRenderParticleBeacons) | 2375 | if (sRenderParticleBeacons) |
2333 | { | 2376 | { |
2334 | forAllVisibleDrawables(renderParticleBeacons); | 2377 | forAllVisibleDrawables(renderParticleBeacons); |
@@ -4563,6 +4606,24 @@ BOOL LLPipeline::getRenderScriptedTouchBeacons(void*) | |||
4563 | } | 4606 | } |
4564 | 4607 | ||
4565 | // static | 4608 | // static |
4609 | void LLPipeline::setRenderMOAPBeacons(BOOL val) | ||
4610 | { | ||
4611 | sRenderMOAPBeacons = val; | ||
4612 | } | ||
4613 | |||
4614 | // static | ||
4615 | void LLPipeline::toggleRenderMOAPBeacons(void*) | ||
4616 | { | ||
4617 | sRenderMOAPBeacons = !sRenderMOAPBeacons; | ||
4618 | } | ||
4619 | |||
4620 | // static | ||
4621 | BOOL LLPipeline::getRenderMOAPBeacons(void*) | ||
4622 | { | ||
4623 | return sRenderMOAPBeacons; | ||
4624 | } | ||
4625 | |||
4626 | // static | ||
4566 | void LLPipeline::setRenderPhysicalBeacons(BOOL val) | 4627 | void LLPipeline::setRenderPhysicalBeacons(BOOL val) |
4567 | { | 4628 | { |
4568 | sRenderPhysicalBeacons = val; | 4629 | sRenderPhysicalBeacons = val; |